]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Move reply_findclose() from trans2.c to smb1_reply.c
authorJeremy Allison <jra@samba.org>
Tue, 5 Apr 2022 02:48:25 +0000 (19:48 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 7 Apr 2022 17:37:30 +0000 (17:37 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Mulder <dmulder@suse.com>
source3/smbd/proto.h
source3/smbd/smb1_reply.c
source3/smbd/smb1_reply.h
source3/smbd/trans2.c

index b03ecc77915363eaca7de6e15fb69a3b5f6bde68..64d74ad0c4d0eff61380f6c95e6bba7fbf57a992 100644 (file)
@@ -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_findclose(struct smb_request *req);
 void reply_findnclose(struct smb_request *req);
 
 enum perm_type {
index a790b4bcfb8344e9ec73584dd333e1de45a4fdc3..82da0257ba96958e016e52e7688383dc0879b138 100644 (file)
@@ -6641,3 +6641,47 @@ void reply_getattrE(struct smb_request *req)
        END_PROFILE(SMBgetattrE);
        return;
 }
+
+/****************************************************************************
+ Reply to a SMBfindclose (stop trans2 directory search).
+****************************************************************************/
+
+void reply_findclose(struct smb_request *req)
+{
+       int dptr_num;
+       struct smbd_server_connection *sconn = req->sconn;
+       files_struct *fsp = NULL;
+
+       START_PROFILE(SMBfindclose);
+
+       if (req->wct < 1) {
+               reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
+               END_PROFILE(SMBfindclose);
+               return;
+       }
+
+       dptr_num = SVALS(req->vwv+0, 0);
+
+       DEBUG(3,("reply_findclose, dptr_num = %d\n", dptr_num));
+
+       /*
+        * OS/2 seems to use -1 to indicate "close all directories"
+        * This has to mean on this specific connection struct.
+        */
+       if (dptr_num == -1) {
+               dptr_closecnum(req->conn);
+       } else {
+               fsp = dptr_fetch_lanman2_fsp(sconn, dptr_num);
+               dptr_num = -1;
+               if (fsp != NULL) {
+                       close_file_free(NULL, &fsp, NORMAL_CLOSE);
+               }
+       }
+
+       reply_outbuf(req, 0, 0);
+
+       DEBUG(3,("SMBfindclose dptr_num = %d\n", dptr_num));
+
+       END_PROFILE(SMBfindclose);
+       return;
+}
index c306d1d726a81541d64f84b7f95d84b18ea40eb9..e66e9603cce078191ff0dc14e0a63cf4740ac2f8 100644 (file)
@@ -76,3 +76,4 @@ void reply_setattrE(struct smb_request *req);
 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);
index 27bda1555f5a097cc9c1195f3192e71290240c95..53d165b707179a114d1a7b0b8f4c0e7204b42ecf 100644 (file)
@@ -6947,50 +6947,6 @@ NTSTATUS smbd_do_setfilepathinfo(connection_struct *conn,
        return NT_STATUS_OK;
 }
 
-/****************************************************************************
- Reply to a SMBfindclose (stop trans2 directory search).
-****************************************************************************/
-
-void reply_findclose(struct smb_request *req)
-{
-       int dptr_num;
-       struct smbd_server_connection *sconn = req->sconn;
-       files_struct *fsp = NULL;
-
-       START_PROFILE(SMBfindclose);
-
-       if (req->wct < 1) {
-               reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
-               END_PROFILE(SMBfindclose);
-               return;
-       }
-
-       dptr_num = SVALS(req->vwv+0, 0);
-
-       DEBUG(3,("reply_findclose, dptr_num = %d\n", dptr_num));
-
-       /*
-        * OS/2 seems to use -1 to indicate "close all directories"
-        * This has to mean on this specific connection struct.
-        */
-       if (dptr_num == -1) {
-               dptr_closecnum(req->conn);
-       } else {
-               fsp = dptr_fetch_lanman2_fsp(sconn, dptr_num);
-               dptr_num = -1;
-               if (fsp != NULL) {
-                       close_file_free(NULL, &fsp, NORMAL_CLOSE);
-               }
-       }
-
-       reply_outbuf(req, 0, 0);
-
-       DEBUG(3,("SMBfindclose dptr_num = %d\n", dptr_num));
-
-       END_PROFILE(SMBfindclose);
-       return;
-}
-
 /****************************************************************************
  Reply to a SMBfindnclose (stop FINDNOTIFYFIRST directory search).
 ****************************************************************************/