libcli/smb: move smb2_signing.c to the toplevel
authorStefan Metzmacher <metze@samba.org>
Tue, 30 Aug 2011 23:42:09 +0000 (01:42 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 5 Sep 2011 11:17:32 +0000 (13:17 +0200)
metze

libcli/smb/smb2_signing.c [moved from source3/smbd/smb2_signing.c with 98% similarity]
libcli/smb/smb2_signing.h [new file with mode: 0644]
libcli/smb/smb_common.h
libcli/smb/wscript_build
source3/Makefile.in
source3/smbd/globals.h
source3/wscript_build

similarity index 98%
rename from source3/smbd/smb2_signing.c
rename to libcli/smb/smb2_signing.c
index 1c0dd5ef68d0422b582c0146af1ce339144e6571..3687ace9b46b75ef56574b3a20684d591c163cac 100644 (file)
@@ -19,8 +19,7 @@
 */
 
 #include "includes.h"
-#include "smbd/smbd.h"
-#include "smbd/globals.h"
+#include "system/filesys.h"
 #include "../libcli/smb/smb_common.h"
 #include "../lib/crypto/crypto.h"
 
diff --git a/libcli/smb/smb2_signing.h b/libcli/smb/smb2_signing.h
new file mode 100644 (file)
index 0000000..3c3e0c2
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+   Unix SMB/CIFS implementation.
+   SMB2 signing
+
+   Copyright (C) Stefan Metzmacher 2009
+
+   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/>.
+*/
+
+#ifndef _LIBCLI_SMB_SMB2_SIGNING_H_
+#define _LIBCLI_SMB_SMB2_SIGNING_H_
+
+struct iovec;
+
+NTSTATUS smb2_signing_sign_pdu(DATA_BLOB session_key,
+                              struct iovec *vector,
+                              int count);
+
+NTSTATUS smb2_signing_check_pdu(DATA_BLOB session_key,
+                               const struct iovec *vector,
+                               int count);
+
+#endif /* _LIBCLI_SMB_SMB2_SIGNING_H_ */
index 83f7db2dfa8bef0183fac6a4f9fdc4050e64a70e..1f21e553bae87f883a814cc83f132a186f826db3 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "libcli/smb/smb2_constants.h"
 #include "libcli/smb/smb2_create_blob.h"
+#include "libcli/smb/smb2_signing.h"
 #include "libcli/smb/smb_constants.h"
 #include "libcli/smb/smb_util.h"
 #include "libcli/smb/smb_unix_ext.h"
index 89ecf519ec6f004c12c253410138f6ae55d608a7..66319e9a5b4c4ee40107c79dea82eeeed39c05e6 100644 (file)
@@ -2,9 +2,12 @@
 
 
 bld.SAMBA_LIBRARY('cli_smb_common',
-       source='smb2_create_blob.c util.c',
+       source='smb2_create_blob.c smb2_signing.c util.c',
        autoproto='smb_common_proto.h',
+       deps='LIBCRYPTO',
        public_deps='talloc samba-util',
        private_library=True,
-       public_headers='smb_common.h smb2_constants.h smb2_create_blob.h',
+       public_headers='''smb_common.h smb2_constants.h
+                       smb2_create_blob.h smb2_signing.h
+       ''',
        )
index 923675092370a6dd8df89cb0a96859594cc37ded..bf66af4708914c4e31b85e5638b00d6123c708a3 100644 (file)
@@ -601,6 +601,7 @@ LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
             libsmb/smb2cli_tcon.o \
             libsmb/smb2cli_create.o \
             ../libcli/smb/smb2_create_blob.o \
+            ../libcli/smb/smb2_signing.o \
             libsmb/smb2cli_close.o \
             libsmb/smb2cli_flush.o \
             libsmb/smb2cli_read.o \
@@ -929,7 +930,6 @@ SMBD_OBJ_SRV = smbd/server_reload.o \
               smbd/file_access.o \
               smbd/dnsregister.o smbd/globals.o \
               smbd/smb2_server.o \
-              smbd/smb2_signing.o \
               smbd/smb2_glue.o \
               smbd/smb2_negprot.o \
               smbd/smb2_sesssetup.o \
index 35c44eebb573104fcddc2c1c8b18ca5e63d4446d..2e59d9bc5f8be552b11ec242c675c5f05c6b5f23 100644 (file)
@@ -133,13 +133,6 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn);
 void smbd_lock_socket(struct smbd_server_connection *sconn);
 void smbd_unlock_socket(struct smbd_server_connection *sconn);
 
-NTSTATUS smb2_signing_sign_pdu(DATA_BLOB session_key,
-                              struct iovec *vector,
-                              int count);
-NTSTATUS smb2_signing_check_pdu(DATA_BLOB session_key,
-                               const struct iovec *vector,
-                               int count);
-
 NTSTATUS smbd_do_locking(struct smb_request *req,
                         files_struct *fsp,
                         uint8_t type,
index a14454987024b0196b676e8c98bb3a43eac862c9..5414e6c45a1072e44c965535aeea9a6c469d229e 100755 (executable)
@@ -377,7 +377,6 @@ SMBD_SRC_SRV = '''smbd/server_reload.c smbd/files.c smbd/connection.c
                smbd/file_access.c
                smbd/dnsregister.c smbd/globals.c
                smbd/smb2_server.c
-               smbd/smb2_signing.c
                smbd/smb2_glue.c
                smbd/smb2_negprot.c
                smbd/smb2_sesssetup.c