diff options
Diffstat (limited to 'source4')
37 files changed, 79 insertions, 22 deletions
diff --git a/source4/include/cli_context.h b/source4/include/cli_context.h index a69cb93aa8..65128f09f5 100644 --- a/source4/include/cli_context.h +++ b/source4/include/cli_context.h @@ -30,7 +30,7 @@ struct smbcli_state { struct smbcli_transport *transport; struct smbcli_session *session; struct smbcli_tree *tree; - struct substitute_context substitute; + struct substitute_context *substitute; }; #endif /* _SMBCLI_CONTEXT_H */ diff --git a/source4/include/includes.h b/source4/include/includes.h index 86222679e4..c58cf1a5c5 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -181,6 +181,8 @@ extern int errno; #include "pstring.h" /* Lists, trees, caching, database... */ +#include "dynconfig.h" +#include "version.h" #include "xfile.h" #include "talloc.h" #include "lib/ldb/include/ldb.h" @@ -192,50 +194,32 @@ extern int errno; #include "trans2.h" #include "nterr.h" #include "charset.h" -#include "dynconfig.h" - -#include "version.h" #include "rewrite.h" #include "smb.h" #include "ads.h" #include "lib/socket/socket.h" #include "libcli/ldap/ldap.h" #include "nameserv.h" - #include "byteorder.h" - #include "module.h" - #include "mutex.h" - -#include "structs.h" #include "librpc/ndr/libndr.h" #include "librpc/ndr/ndr_sec.h" #include "librpc/gen_ndr/ndr_misc.h" #include "librpc/gen_ndr/ndr_dcerpc.h" #include "librpc/rpc/dcerpc.h" #include "librpc/gen_ndr/tables.h" - #include "smb_interfaces.h" #include "smbd/server.h" #include "smbd/service.h" #include "rpc_server/dcerpc_server.h" -#include "request.h" -#include "signing.h" -#include "smb_server/smb_server.h" +#include "structs.h" #include "ntvfs/ntvfs.h" #include "cli_context.h" - #include "libnet/libnet.h" #include "utils/net/net.h" - #include "nsswitch/winbind_client.h" -/* hmm, this really is getting ugly isn't it .... we probably need to - have some way to have subsystem includes without including it - globally */ -#include "ntvfs/posix/vfs_posix.h" - #define malloc_p(type) (type *)malloc(sizeof(type)) #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count) #define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count) diff --git a/source4/include/request.h b/source4/include/request.h index 7dae579c24..fc5fa8442a 100644 --- a/source4/include/request.h +++ b/source4/include/request.h @@ -1,3 +1,5 @@ +#ifndef _REQUEST_H +#define _REQUEST_H /* Unix SMB/CIFS implementation. SMB parameters and setup @@ -19,6 +21,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "signing.h" + /* Shared state structure between client and server, representing the basic packet. */ @@ -55,3 +59,4 @@ struct request_buffer { char *ptr; }; +#endif diff --git a/source4/include/signing.h b/source4/include/signing.h index c290f96788..dfc5a4bd7e 100644 --- a/source4/include/signing.h +++ b/source4/include/signing.h @@ -1,3 +1,5 @@ +#ifndef _SIGNING_H +#define _SIGNING_H /* Unix SMB/CIFS implementation. SMB Signing @@ -35,3 +37,4 @@ struct smb_signing_context { BOOL seen_valid; /* Have I ever seen a validly signed packet? */ }; +#endif diff --git a/source4/include/structs.h b/source4/include/structs.h index c6b8125939..a553977952 100644 --- a/source4/include/structs.h +++ b/source4/include/structs.h @@ -77,3 +77,16 @@ struct registry_value; struct rap_NetShareEnum; struct rap_NetServerEnum2; + +struct smbsrv_request; +struct smbsrv_tcon; +struct smb_signing_context; +struct smbsrv_connection; +struct auth_context; +struct request_buffer; + +struct pvfs_dir; +struct pvfs_filename; +struct pvfs_state; +struct pvfs_file; + diff --git a/source4/lib/substitute.c b/source4/lib/substitute.c index 3de2966f56..a01b90450a 100644 --- a/source4/lib/substitute.c +++ b/source4/lib/substitute.c @@ -20,6 +20,7 @@ #include "includes.h" +#include "smb_server/smb_server.h" /* oh bugger - I realy didn't want to have a top-level context anywhere, but until we change all lp_*() calls to take a context diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h index 9bbdd8a222..9b03ab713b 100644 --- a/source4/libcli/raw/libcliraw.h +++ b/source4/libcli/raw/libcliraw.h @@ -21,6 +21,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "request.h" + struct smbcli_tree; /* forward declare */ struct smbcli_request; /* forward declare */ struct smbcli_session; /* forward declare */ diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index 535b529a63..9e3c841dd3 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -27,6 +27,7 @@ #include "includes.h" #include "libcli/raw/libcliraw.h" +#include "smb_server/smb_server.h" /* this is stored in ntvfs_private */ struct cvfs_private { diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c index 8bcf0382f9..dc43dff3aa 100644 --- a/source4/ntvfs/ipc/vfs_ipc.c +++ b/source4/ntvfs/ipc/vfs_ipc.c @@ -28,6 +28,7 @@ #include "includes.h" #include "system/filesys.h" #include "dlinklist.h" +#include "smb_server/smb_server.h" /* this is the private structure used to keep the state of an open ipc$ connection. It needs to keep information about all open diff --git a/source4/ntvfs/nbench/vfs_nbench.c b/source4/ntvfs/nbench/vfs_nbench.c index eef407638b..ef435c5d75 100644 --- a/source4/ntvfs/nbench/vfs_nbench.c +++ b/source4/ntvfs/nbench/vfs_nbench.c @@ -25,6 +25,7 @@ */ #include "includes.h" +#include "smb_server/smb_server.h" /* this is stored in ntvfs_private */ struct nbench_private { diff --git a/source4/ntvfs/ntvfs_base.c b/source4/ntvfs/ntvfs_base.c index 24470ebd65..cc83b53473 100644 --- a/source4/ntvfs/ntvfs_base.c +++ b/source4/ntvfs/ntvfs_base.c @@ -25,6 +25,8 @@ #include "includes.h" #include "dlinklist.h" +#include "smb_server/smb_server.h" + /* the list of currently registered NTVFS backends, note that there diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c index 8eaa3cf1b2..6e8caf787b 100644 --- a/source4/ntvfs/ntvfs_generic.c +++ b/source4/ntvfs/ntvfs_generic.c @@ -32,6 +32,8 @@ */ #include "includes.h" +#include "smb_server/smb_server.h" + /* see if a filename ends in EXE COM DLL or SYM. This is needed for the diff --git a/source4/ntvfs/ntvfs_interface.c b/source4/ntvfs/ntvfs_interface.c index 95c01a0b50..f1ab217533 100644 --- a/source4/ntvfs/ntvfs_interface.c +++ b/source4/ntvfs/ntvfs_interface.c @@ -20,6 +20,8 @@ */ #include "includes.h" +#include "smb_server/smb_server.h" + /* connect/disconnect */ NTSTATUS ntvfs_connect(struct smbsrv_request *req, const char *sharename) diff --git a/source4/ntvfs/ntvfs_util.c b/source4/ntvfs/ntvfs_util.c index bd5a305e20..41e1b04d49 100644 --- a/source4/ntvfs/ntvfs_util.c +++ b/source4/ntvfs/ntvfs_util.c @@ -23,6 +23,8 @@ #include "includes.h" #include "dlinklist.h" +#include "smb_server/smb_server.h" + NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req, void *private_data, diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h index 231d9a2d08..530a2deae3 100644 --- a/source4/ntvfs/posix/vfs_posix.h +++ b/source4/ntvfs/posix/vfs_posix.h @@ -23,6 +23,8 @@ #ifndef _VFS_POSIX_H_ #define _VFS_POSIX_H_ +#include "smb_server/smb_server.h" + /* this is the private structure for the posix vfs backend. It is used to hold per-connection (per tree connect) state information */ struct pvfs_state { diff --git a/source4/ntvfs/print/vfs_print.c b/source4/ntvfs/print/vfs_print.c index b1155a0761..372f64e982 100644 --- a/source4/ntvfs/print/vfs_print.c +++ b/source4/ntvfs/print/vfs_print.c @@ -24,6 +24,7 @@ #include "includes.h" #include "ioctl.h" +#include "smb_server/smb_server.h" /* connect to a share - used when a tree_connect operation comes diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c index 4e9fd4895e..97dd8a7d60 100644 --- a/source4/ntvfs/simple/vfs_simple.c +++ b/source4/ntvfs/simple/vfs_simple.c @@ -30,6 +30,7 @@ #include "svfs.h" #include "system/time.h" #include "dlinklist.h" +#include "smb_server/smb_server.h" #ifndef O_DIRECTORY #define O_DIRECTORY 0 diff --git a/source4/ntvfs/unixuid/vfs_unixuid.c b/source4/ntvfs/unixuid/vfs_unixuid.c index 9c74c12f91..9b62c38e13 100644 --- a/source4/ntvfs/unixuid/vfs_unixuid.c +++ b/source4/ntvfs/unixuid/vfs_unixuid.c @@ -23,6 +23,7 @@ #include "includes.h" #include "auth/auth.h" +#include "smb_server/smb_server.h" struct unixuid_private { void *samctx; diff --git a/source4/smb_server/conn.c b/source4/smb_server/conn.c index dce77f7978..a4bf2716fe 100644 --- a/source4/smb_server/conn.c +++ b/source4/smb_server/conn.c @@ -22,6 +22,8 @@ #include "includes.h" #include "system/filesys.h" #include "dlinklist.h" +#include "smb_server/smb_server.h" + /**************************************************************************** init the tcon structures diff --git a/source4/smb_server/negprot.c b/source4/smb_server/negprot.c index b500251265..bd1d8249d9 100644 --- a/source4/smb_server/negprot.c +++ b/source4/smb_server/negprot.c @@ -21,6 +21,8 @@ #include "includes.h" #include "auth/auth.h" #include "asn_1.h" +#include "smb_server/smb_server.h" + /* initialise the auth_context for this server and return the cryptkey */ static void get_challenge(struct smbsrv_connection *smb_conn, char buff[8]) diff --git a/source4/smb_server/nttrans.c b/source4/smb_server/nttrans.c index 336328429b..0ea92c80a0 100644 --- a/source4/smb_server/nttrans.c +++ b/source4/smb_server/nttrans.c @@ -23,6 +23,8 @@ */ #include "includes.h" +#include "smb_server/smb_server.h" + #define CHECK_MIN_BLOB_SIZE(blob, size) do { \ diff --git a/source4/smb_server/password.c b/source4/smb_server/password.c index fc3ee10584..91a9eac3c7 100644 --- a/source4/smb_server/password.c +++ b/source4/smb_server/password.c @@ -20,6 +20,7 @@ #include "includes.h" #include "dlinklist.h" +#include "smb_server/smb_server.h" /**************************************************************************** diff --git a/source4/smb_server/reply.c b/source4/smb_server/reply.c index 8c20b2bb72..eb75ab08c7 100644 --- a/source4/smb_server/reply.c +++ b/source4/smb_server/reply.c @@ -24,6 +24,8 @@ */ #include "includes.h" +#include "smb_server/smb_server.h" + /* useful way of catching wct errors with file and line number */ #define REQ_CHECK_WCT(req, wcount) do { \ diff --git a/source4/smb_server/request.c b/source4/smb_server/request.c index 14e1d558cb..b1cb8fe2df 100644 --- a/source4/smb_server/request.c +++ b/source4/smb_server/request.c @@ -24,6 +24,8 @@ #include "includes.h" #include "dlinklist.h" +#include "smb_server/smb_server.h" + /* we over allocate the data buffer to prevent too many realloc calls */ #define REQ_OVER_ALLOCATION 256 diff --git a/source4/smb_server/search.c b/source4/smb_server/search.c index adcafccafa..a0bc5b764b 100644 --- a/source4/smb_server/search.c +++ b/source4/smb_server/search.c @@ -23,6 +23,8 @@ */ #include "includes.h" +#include "smb_server/smb_server.h" + /* check req->async.status and if not OK then send an error reply */ #define CHECK_ASYNC_STATUS do { \ diff --git a/source4/smb_server/service.c b/source4/smb_server/service.c index 8519869e6b..815a58ce70 100644 --- a/source4/smb_server/service.c +++ b/source4/smb_server/service.c @@ -19,6 +19,8 @@ */ #include "includes.h" +#include "smb_server/smb_server.h" + /**************************************************************************** diff --git a/source4/smb_server/sesssetup.c b/source4/smb_server/sesssetup.c index 8f55df58d2..cc8d4d7ff2 100644 --- a/source4/smb_server/sesssetup.c +++ b/source4/smb_server/sesssetup.c @@ -24,6 +24,8 @@ #include "includes.h" #include "auth/auth.h" #include "asn_1.h" +#include "smb_server/smb_server.h" + /* setup the OS, Lanman and domain portions of a session setup reply diff --git a/source4/smb_server/signing.c b/source4/smb_server/signing.c index b3fac2fa70..8a3fd10095 100644 --- a/source4/smb_server/signing.c +++ b/source4/smb_server/signing.c @@ -19,6 +19,8 @@ */ #include "includes.h" +#include "smb_server/smb_server.h" + /* sign an outgoing packet diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index a42ec3c82b..aa3a2a794c 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -23,6 +23,7 @@ #include "includes.h" #include "system/time.h" #include "dlinklist.h" +#include "smb_server/smb_server.h" /* diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h index 054fc7c35d..121fff6ecd 100644 --- a/source4/smb_server/smb_server.h +++ b/source4/smb_server/smb_server.h @@ -20,6 +20,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "request.h" +#include "smbd/process_model.h" + /* this header declares the core context structures associated with smb sockets, tree connects, requests etc @@ -140,8 +143,6 @@ struct substitute_context { char *user_name; }; -#include "smbd/process_model.h" - /* smb server context structure. This should contain all the state * information associated with a SMB server connection */ diff --git a/source4/smb_server/srvtime.c b/source4/smb_server/srvtime.c index c39267521c..999ffc3ee1 100644 --- a/source4/smb_server/srvtime.c +++ b/source4/smb_server/srvtime.c @@ -21,6 +21,8 @@ */ #include "includes.h" +#include "smb_server/smb_server.h" + /******************************************************************* put a dos date into a buffer (time/date format) diff --git a/source4/smb_server/trans2.c b/source4/smb_server/trans2.c index 3c447c555e..02a7cbff01 100644 --- a/source4/smb_server/trans2.c +++ b/source4/smb_server/trans2.c @@ -22,6 +22,8 @@ */ #include "includes.h" +#include "smb_server/smb_server.h" + #define CHECK_MIN_BLOB_SIZE(blob, size) do { \ diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c index 0bdb316317..101a24b694 100644 --- a/source4/smbd/process_model.c +++ b/source4/smbd/process_model.c @@ -20,6 +20,8 @@ */ #include "includes.h" +#include "smb_server/smb_server.h" +#include "smbd/process_model.h" /* setup the events for the chosen process model diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c index 2e49d03321..42978db739 100644 --- a/source4/smbd/process_single.c +++ b/source4/smbd/process_single.c @@ -22,6 +22,8 @@ #include "includes.h" #include "dlinklist.h" +#include "smb_server/smb_server.h" +#include "process_model.h" /* diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c index 6429703200..781a9eb55a 100644 --- a/source4/smbd/process_standard.c +++ b/source4/smbd/process_standard.c @@ -22,6 +22,8 @@ #include "includes.h" #include "dlinklist.h" +#include "smb_server/smb_server.h" +#include "process_model.h" /* called when the process model is selected diff --git a/source4/smbd/service.c b/source4/smbd/service.c index 7fc09b5500..f2d129d240 100644 --- a/source4/smbd/service.c +++ b/source4/smbd/service.c @@ -24,6 +24,7 @@ #include "includes.h" #include "system/dir.h" #include "dlinklist.h" +#include "process_model.h" struct server_context *server_service_startup(const char *model) { diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c index cce831e6c6..c7ed8eb771 100644 --- a/source4/torture/gentest.c +++ b/source4/torture/gentest.c @@ -20,6 +20,7 @@ #include "includes.h" #include "system/time.h" +#include "request.h" #include "libcli/raw/libcliraw.h" #define NSERVERS 2 |