smbd: Move nttrans.c -> smb1_nttrans.c
authorDavid Mulder <dmulder@suse.com>
Fri, 11 Mar 2022 19:20:52 +0000 (12:20 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 7 Apr 2022 17:37:29 +0000 (17:37 +0000)
nttrans.c now contians only smb1 code

Signed-off-by: David Mulder <dmulder@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/proto.h
source3/smbd/smb1_nttrans.c [moved from source3/smbd/nttrans.c with 100% similarity]
source3/smbd/smb1_nttrans.h [new file with mode: 0644]
source3/smbd/smbd.h
source3/wscript_build

index 5cfaef92387ae8f402663d1b57f681b4ba79988a..3a014923b5fc126231d903e4cb0fccefd32a4aab 100644 (file)
@@ -672,15 +672,6 @@ int vfs_set_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, struct dom_sid
 int vfs_get_user_ntquota_list(files_struct *fsp, SMB_NTQUOTA_LIST **qt_list);
 void *init_quota_handle(TALLOC_CTX *mem_ctx);
 
-/* The following definitions come from smbd/nttrans.c  */
-
-void reply_ntcreate_and_X(struct smb_request *req);
-struct ea_list *read_nttrans_ea_list(TALLOC_CTX *ctx, const char *pdata, size_t data_size);
-void reply_ntcancel(struct smb_request *req);
-void reply_ntrename(struct smb_request *req);
-void reply_nttrans(struct smb_request *req);
-void reply_nttranss(struct smb_request *req);
-
 /* The following definitions come from smbd/smb2_nttrans.c  */
 
 NTSTATUS set_sd(files_struct *fsp, struct security_descriptor *psd,
diff --git a/source3/smbd/smb1_nttrans.h b/source3/smbd/smb1_nttrans.h
new file mode 100644 (file)
index 0000000..fa2f195
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+   Unix SMB/CIFS implementation.
+   SMB NT transaction handling
+   Copyright (C) Jeremy Allison                        1994-2007
+   Copyright (C) Stefan (metze) Metzmacher     2003
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+void reply_ntcreate_and_X(struct smb_request *req);
+struct ea_list *read_nttrans_ea_list(TALLOC_CTX *ctx, const char *pdata, size_t data_size);
+void reply_ntcancel(struct smb_request *req);
+void reply_ntrename(struct smb_request *req);
+void reply_nttrans(struct smb_request *req);
+void reply_nttranss(struct smb_request *req);
index 2b63da4a798a764794a66756472c7e70a297a531..73e325251dc923a1c78dbec01c73f6a058172808 100644 (file)
@@ -33,6 +33,7 @@ struct dptr_struct;
 #include "smbd/smb1_aio.h"
 #include "smbd/smb1_ipc.h"
 #include "smbd/smb1_negprot.h"
+#include "smbd/smb1_nttrans.h"
 #endif
 
 struct trans_state {
index 5335a24cfea46107ec7597f8358d8223235f9c62..8eb95c9642c93376e6897f32a60c1249237cc050 100644 (file)
@@ -606,6 +606,7 @@ if bld.CONFIG_SET('WITH_SMB1SERVER'):
                    smbd/smb1_aio.c
                    smbd/smb1_ipc.c
                    smbd/smb1_negprot.c
+                   smbd/smb1_nttrans.c
     '''
 else:
     SMB1_SOURCES = ''
@@ -625,7 +626,6 @@ bld.SAMBA3_LIBRARY('smbd_base',
                           smbd/share_access.c
                           smbd/fileio.c
                           smbd/smb2_ipc.c
-                          smbd/nttrans.c
                           smbd/smb2_nttrans.c
                           smbd/pipes.c
                           smbd/reply.c