diff options
37 files changed, 79 insertions, 22 deletions
diff --git a/source4/include/cli_context.h b/source4/include/cli_context.h index a69cb93aa8f..65128f09f5b 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 86222679e48..c58cf1a5c54 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 7dae579c247..fc5fa8442ac 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 c290f967888..dfc5a4bd7e1 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 c6b81259390..a553977952c 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 3de2966f565..a01b90450a2 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 9bbdd8a222f..9b03ab713b7 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 535b529a630..9e3c841dd36 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 8bcf0382f9f..dc43dff3aa7 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 eef407638b7..ef435c5d75f 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 24470ebd65d..cc83b534734 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 8eaa3cf1b26..6e8caf787b1 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 95c01a0b503..f1ab2175338 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 bd5a305e20c..41e1b04d49e 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 231d9a2d082..530a2deae3d 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 b1155a07611..372f64e982a 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 4e9fd4895ec..97dd8a7d60f 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 9c74c12f918..9b62c38e13b 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 dce77f79784..a4bf2716feb 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 b5002512654..bd1d8249d90 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 336328429be..0ea92c80a02 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 fc3ee105847..91a9eac3c7f 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 8c20b2bb720..eb75ab08c7b 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 14e1d558cb5..b1cb8fe2df4 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 adcafccafad..a0bc5b764b7 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 8519869e6b7..815a58ce70a 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 8f55df58d26..cc8d4d7ff2e 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 b3fac2fa706..8a3fd10095c 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 a42ec3c82b9..aa3a2a794c8 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 054fc7c35d1..121fff6ecd0 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 c39267521cf..999ffc3ee12 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 3c447c555e8..02a7cbff011 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 0bdb3163176..101a24b6946 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 2e49d033214..42978db739f 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 64297032005..781a9eb55af 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 7fc09b55007..f2d129d2404 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 cce831e6c66..c7ed8eb7711 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 |