From: Jeremy Allison Date: Thu, 28 Jul 2022 18:17:47 +0000 (-0700) Subject: s3: smbd: Add dirfsp parameter to unlink_internals(). X-Git-Tag: samba-4.17.0rc1~145 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b33ec49e385f279fbb495173017b2be45e9d206;p=thirdparty%2Fsamba.git s3: smbd: Add dirfsp parameter to unlink_internals(). Not yet used but passed to SMB_VFS_CREATE(). Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 0929e532436..a1763d030e4 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -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; diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index f59d3bcac69..f0f2b4f6e61 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -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); diff --git a/source3/smbd/smb1_reply.c b/source3/smbd/smb1_reply.c index 84196cef829..dbdc910659c 100644 --- a/source3/smbd/smb1_reply.c +++ b/source3/smbd/smb1_reply.c @@ -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. */ diff --git a/source3/smbd/smb2_reply.c b/source3/smbd/smb2_reply.c index 52c47958973..d83d2473aae 100644 --- a/source3/smbd/smb2_reply.c +++ b/source3/smbd/smb2_reply.c @@ -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 */ diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 4ac1f95ccce..118eb480911 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -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;