From: Jeremy Allison Date: Tue, 5 Apr 2022 02:50:58 +0000 (-0700) Subject: s3: smbd: Move reply_findnclose() from trans2.c to smb1_reply.c X-Git-Tag: tevent-0.12.0~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2e52ab97e0d3f542e66daa8e7466cc2ad56db21;p=thirdparty%2Fsamba.git s3: smbd: Move reply_findnclose() from trans2.c to smb1_reply.c Signed-off-by: Jeremy Allison Reviewed-by: David Mulder --- diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 64d74ad0c4d..426e7fdc2d0 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -1108,7 +1108,6 @@ NTSTATUS smb_set_file_time(connection_struct *conn, struct smb_filename *smb_fname, struct smb_file_time *ft, bool setting_write_time); -void reply_findnclose(struct smb_request *req); enum perm_type { PERM_NEW_FILE, diff --git a/source3/smbd/smb1_reply.c b/source3/smbd/smb1_reply.c index 82da0257ba9..25ff1d2e7fb 100644 --- a/source3/smbd/smb1_reply.c +++ b/source3/smbd/smb1_reply.c @@ -6685,3 +6685,35 @@ void reply_findclose(struct smb_request *req) END_PROFILE(SMBfindclose); return; } + +/**************************************************************************** + Reply to a SMBfindnclose (stop FINDNOTIFYFIRST directory search). +****************************************************************************/ + +void reply_findnclose(struct smb_request *req) +{ + int dptr_num; + + START_PROFILE(SMBfindnclose); + + if (req->wct < 1) { + reply_nterror(req, NT_STATUS_INVALID_PARAMETER); + END_PROFILE(SMBfindnclose); + return; + } + + dptr_num = SVAL(req->vwv+0, 0); + + DEBUG(3,("reply_findnclose, dptr_num = %d\n", dptr_num)); + + /* We never give out valid handles for a + findnotifyfirst - so any dptr_num is ok here. + Just ignore it. */ + + reply_outbuf(req, 0, 0); + + DEBUG(3,("SMB_findnclose dptr_num = %d\n", dptr_num)); + + END_PROFILE(SMBfindnclose); + return; +} diff --git a/source3/smbd/smb1_reply.h b/source3/smbd/smb1_reply.h index e66e9603cce..5a12f0b3592 100644 --- a/source3/smbd/smb1_reply.h +++ b/source3/smbd/smb1_reply.h @@ -77,3 +77,4 @@ void reply_writebmpx(struct smb_request *req); void reply_writebs(struct smb_request *req); void reply_getattrE(struct smb_request *req); void reply_findclose(struct smb_request *req); +void reply_findnclose(struct smb_request *req); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 53d165b7071..948dec42dfd 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -6946,35 +6946,3 @@ NTSTATUS smbd_do_setfilepathinfo(connection_struct *conn, *ret_data_size = data_return_size; return NT_STATUS_OK; } - -/**************************************************************************** - Reply to a SMBfindnclose (stop FINDNOTIFYFIRST directory search). -****************************************************************************/ - -void reply_findnclose(struct smb_request *req) -{ - int dptr_num; - - START_PROFILE(SMBfindnclose); - - if (req->wct < 1) { - reply_nterror(req, NT_STATUS_INVALID_PARAMETER); - END_PROFILE(SMBfindnclose); - return; - } - - dptr_num = SVAL(req->vwv+0, 0); - - DEBUG(3,("reply_findnclose, dptr_num = %d\n", dptr_num)); - - /* We never give out valid handles for a - findnotifyfirst - so any dptr_num is ok here. - Just ignore it. */ - - reply_outbuf(req, 0, 0); - - DEBUG(3,("SMB_findnclose dptr_num = %d\n", dptr_num)); - - END_PROFILE(SMBfindnclose); - return; -}