s3: smbd: Add dirfsp parameter to unlink_internals().
authorJeremy Allison <jra@samba.org>
Thu, 28 Jul 2022 18:17:47 +0000 (11:17 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 2 Aug 2022 19:49:32 +0000 (19:49 +0000)
Not yet used but passed to SMB_VFS_CREATE().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/printing/nt_printing.c
source3/smbd/proto.h
source3/smbd/smb1_reply.c
source3/smbd/smb2_reply.c
source3/smbd/smb2_trans2.c

index 0929e53243602509800c865efc78cb7939ec6d4e..a1763d030e4e21d316387ab5c21cd456dcde3d67 100644 (file)
@@ -2042,7 +2042,7 @@ static NTSTATUS driver_unlink_internals(connection_struct *conn,
                goto err_out;
        }
 
-       status = unlink_internals(conn, NULL, 0, smb_fname);
+       status = unlink_internals(conn, NULL, 0, NULL, smb_fname);
 err_out:
        talloc_free(tmp_ctx);
        return status;
index f59d3bcac69dea999a7f1f9154232b63898f1c60..f0f2b4f6e6166480b0bf6b73e6394308f6b4ebfb 100644 (file)
@@ -973,6 +973,7 @@ void reply_special(struct smbXsrv_connection *xconn, char *inbuf, size_t inbuf_s
 NTSTATUS unlink_internals(connection_struct *conn,
                        struct smb_request *req,
                        uint32_t dirtype,
+                       struct files_struct *dirfsp,
                        struct smb_filename *smb_fname);
 ssize_t fake_sendfile(struct smbXsrv_connection *xconn, files_struct *fsp,
                      off_t startpos, size_t nread);
index 84196cef829524bfd2ba95c6e0e214ffc7ac78c8..dbdc910659c18b795a816076f062bda54407e567 100644 (file)
@@ -2395,7 +2395,7 @@ void reply_unlink(struct smb_request *req)
 
        DEBUG(3,("reply_unlink : %s\n", smb_fname_str_dbg(smb_fname)));
 
-       status = unlink_internals(conn, req, dirtype, smb_fname);
+       status = unlink_internals(conn, req, dirtype, NULL, smb_fname);
        if (!NT_STATUS_IS_OK(status)) {
                if (open_was_deferred(req->xconn, req->mid)) {
                        /* We have re-scheduled this call. */
index 52c479589730cb0bf5a4927ab5cd3f1e786f6172..d83d2473aae2215ea744b035d030682fe380cf9b 100644 (file)
@@ -749,6 +749,7 @@ void reply_special(struct smbXsrv_connection *xconn, char *inbuf, size_t inbuf_s
 NTSTATUS unlink_internals(connection_struct *conn,
                        struct smb_request *req,
                        uint32_t dirtype,
+                       struct files_struct *dirfsp,
                        struct smb_filename *smb_fname)
 {
        uint32_t fattr;
@@ -844,7 +845,7 @@ NTSTATUS unlink_internals(connection_struct *conn,
        status = SMB_VFS_CREATE_FILE
                (conn,                  /* conn */
                 req,                   /* req */
-                NULL,                  /* dirfsp */
+                dirfsp,                        /* dirfsp */
                 smb_fname,             /* fname */
                 DELETE_ACCESS,         /* access_mask */
                 FILE_SHARE_NONE,       /* share_access */
index 4ac1f95cccea2fd486beca28316f8979cff8f961..118eb480911ed473b4e405bae34230435087c0dd 100644 (file)
@@ -4305,6 +4305,7 @@ NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
                        status = unlink_internals(conn,
                                                req,
                                                FILE_ATTRIBUTE_NORMAL,
+                                               NULL, /* new_dirfsp */
                                                smb_fname_new);
                        if (!NT_STATUS_IS_OK(status)) {
                                goto out;