summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/auth/auth.h1
-rw-r--r--source4/auth/auth_sam.c2
-rw-r--r--source4/auth/config.mk1
-rw-r--r--source4/auth/credentials/config.mk1
-rw-r--r--source4/auth/credentials/credentials.h2
-rw-r--r--source4/auth/credentials/credentials_gensec.c1
-rw-r--r--source4/auth/gensec/config.mk1
-rw-r--r--source4/auth/gensec/gensec.h2
-rw-r--r--source4/auth/gensec/schannel_state.c1
-rw-r--r--source4/build/smb_build/config_mk.pm2
-rw-r--r--source4/cldap_server/netlogon.c2
-rw-r--r--source4/client/client.c1
-rw-r--r--source4/dsdb/config.mk1
-rw-r--r--source4/dsdb/samdb/cracknames.c3
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c1
-rw-r--r--source4/dsdb/samdb/samdb.c1
-rw-r--r--source4/dsdb/samdb/samdb_privilege.c3
-rw-r--r--source4/gtk/tools/gepdump.c1
-rw-r--r--source4/include/includes.h4
-rw-r--r--source4/include/structs.h1
-rw-r--r--source4/kdc/hdb-ldb.c1
-rw-r--r--source4/kdc/kpasswdd.c1
-rw-r--r--source4/ldap_server/ldap_bind.c1
-rw-r--r--source4/ldap_server/ldap_simple_ldb.c1
-rw-r--r--source4/lib/basic.mk1
-rw-r--r--source4/lib/ldb/samba/ldif_handlers.c1
-rw-r--r--source4/lib/ldb/tools/cmdline.c1
-rw-r--r--source4/libcli/clitrans2.c1
-rw-r--r--source4/libcli/config.mk3
-rw-r--r--source4/libcli/ldap/config.mk1
-rw-r--r--source4/libcli/ldap/ldap.h2
-rw-r--r--source4/libcli/ldap/ldap_client.c1
-rw-r--r--source4/libcli/nbt/libnbt.h7
-rw-r--r--source4/libcli/raw/clitransport.c1
-rw-r--r--source4/libcli/raw/libcliraw.h2
-rw-r--r--source4/libcli/raw/rawacl.c1
-rw-r--r--source4/libcli/resolve/host.c1
-rw-r--r--source4/libcli/resolve/resolve.c1
-rw-r--r--source4/libcli/security/security_token.c1
-rw-r--r--source4/libcli/smb2/config.mk1
-rw-r--r--source4/libcli/smb2/smb2.h2
-rw-r--r--source4/libcli/smb_composite/connect.c1
-rw-r--r--source4/libcli/wrepl/winsrepl.h2
-rw-r--r--source4/libnet/config.mk1
-rw-r--r--source4/libnet/libnet.h1
-rw-r--r--source4/libnet/libnet_join.c1
-rw-r--r--source4/libnet/libnet_samsync_ldb.c3
-rw-r--r--source4/librpc/config.mk1
-rw-r--r--source4/librpc/ndr/libndr.h3
-rw-r--r--source4/librpc/rpc/config.mk1
-rw-r--r--source4/librpc/rpc/dcerpc.c1
-rw-r--r--source4/librpc/rpc/dcerpc.h2
-rw-r--r--source4/librpc/rpc/dcerpc_auth.c1
-rw-r--r--source4/librpc/rpc/dcerpc_connect.c1
-rw-r--r--source4/main.mk3
-rw-r--r--source4/nbt_server/dgram/netlogon.c2
-rw-r--r--source4/nbt_server/wins/winsdb.c1
-rw-r--r--source4/ntptr/config.mk1
-rw-r--r--source4/ntptr/ntptr.h1
-rw-r--r--source4/ntptr/simple_ldb/ntptr_simple_ldb.c2
-rw-r--r--source4/ntvfs/common/sidmap.c3
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c1
-rw-r--r--source4/ntvfs/posix/config.mk1
-rw-r--r--source4/ntvfs/posix/vfs_posix.h2
-rw-r--r--source4/passdb/secrets.c1
-rw-r--r--source4/rpc_server/config.mk1
-rw-r--r--source4/rpc_server/dcerpc_server.h2
-rw-r--r--source4/rpc_server/dcesrv_auth.c1
-rw-r--r--source4/rpc_server/drsuapi/dcesrv_drsuapi.c1
-rw-r--r--source4/rpc_server/dssetup/dcesrv_dssetup.c1
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c2
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c1
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c2
-rw-r--r--source4/rpc_server/samr/samr_password.c3
-rw-r--r--source4/smb_server/smb/config.mk1
-rw-r--r--source4/smb_server/smb/nttrans.c1
-rw-r--r--source4/smb_server/smb/signing.c1
-rw-r--r--source4/smb_server/smb/trans2.c1
-rw-r--r--source4/smb_server/smb2/config.mk1
-rw-r--r--source4/smb_server/smb2/smb2_server.h2
-rw-r--r--source4/smb_server/smb_server.c1
-rw-r--r--source4/smb_server/smb_server.h1
-rw-r--r--source4/smbd/server.c1
-rw-r--r--source4/torture/basic/aliases.c1
-rw-r--r--source4/torture/basic/charset.c1
-rw-r--r--source4/torture/libnet/domain.c1
-rw-r--r--source4/torture/libnet/userinfo.c1
-rw-r--r--source4/torture/libnet/userman.c1
-rw-r--r--source4/torture/nbench/nbio.c1
-rw-r--r--source4/torture/rap/rap.c1
-rw-r--r--source4/torture/raw/chkpath.c1
-rw-r--r--source4/torture/raw/close.c1
-rw-r--r--source4/torture/raw/ioctl.c1
-rw-r--r--source4/torture/raw/mkdir.c1
-rw-r--r--source4/torture/raw/notify.c1
-rw-r--r--source4/torture/raw/oplock.c1
-rw-r--r--source4/torture/raw/rename.c1
-rw-r--r--source4/torture/raw/seek.c1
-rw-r--r--source4/torture/raw/setfileinfo.c1
-rw-r--r--source4/torture/raw/unlink.c1
-rw-r--r--source4/torture/rpc/mgmt.c1
-rw-r--r--source4/torture/smb2/setinfo.c1
-rw-r--r--source4/torture/torture.c1
-rw-r--r--source4/utils/net/config.mk1
-rw-r--r--source4/utils/net/net.h2
-rw-r--r--source4/winbind/config.mk1
-rw-r--r--source4/winbind/wb_server.h2
-rw-r--r--source4/wrepl_server/config.mk1
-rw-r--r--source4/wrepl_server/wrepl_apply_records.c1
-rw-r--r--source4/wrepl_server/wrepl_scavenging.c1
-rw-r--r--source4/wrepl_server/wrepl_server.c1
-rw-r--r--source4/wrepl_server/wrepl_server.h2
112 files changed, 153 insertions, 4 deletions
diff --git a/source4/auth/auth.h b/source4/auth/auth.h
index 58f72aa8af..9aa6d29c6e 100644
--- a/source4/auth/auth.h
+++ b/source4/auth/auth.h
@@ -180,5 +180,6 @@ struct auth_critical_sizes {
const struct auth_usersupplied_info *user_info_in,
const struct auth_usersupplied_info **user_info_encrypted);
+#include "auth/auth_proto.h"
#endif /* _SMBAUTH_H_ */
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c
index 49813a437d..15abeab091 100644
--- a/source4/auth/auth_sam.c
+++ b/source4/auth/auth_sam.c
@@ -25,6 +25,8 @@
#include "system/time.h"
#include "auth/auth.h"
#include "lib/ldb/include/ldb.h"
+#include "dsdb/samdb/samdb.h"
+#include "libcli/ldap/ldap.h"
static const char *user_attrs[] = {
/* requried for the krb5 kdc*/
diff --git a/source4/auth/config.mk b/source4/auth/config.mk
index b620cece96..b24aea836a 100644
--- a/source4/auth/config.mk
+++ b/source4/auth/config.mk
@@ -67,6 +67,7 @@ OBJ_FILES = pam_errors.o
#######################
# Start SUBSYSTEM AUTH
[SUBSYSTEM::AUTH]
+PRIVATE_PROTO_HEADER = auth_proto.h
OBJ_FILES = \
auth.o \
auth_util.o \
diff --git a/source4/auth/credentials/config.mk b/source4/auth/credentials/config.mk
index 4efa81fb04..db36b01334 100644
--- a/source4/auth/credentials/config.mk
+++ b/source4/auth/credentials/config.mk
@@ -1,6 +1,7 @@
#################################
# Start SUBSYSTEM GENSEC
[SUBSYSTEM::CREDENTIALS]
+PRIVATE_PROTO_HEADER = credentials_proto.h
OBJ_FILES = credentials.o \
credentials_files.o \
credentials_krb5.o \
diff --git a/source4/auth/credentials/credentials.h b/source4/auth/credentials/credentials.h
index c8a95e2b51..8402676acd 100644
--- a/source4/auth/credentials/credentials.h
+++ b/source4/auth/credentials/credentials.h
@@ -97,3 +97,5 @@ struct cli_credentials {
/* A list of valid GENSEC mechanisms for use on this account */
const struct gensec_security_ops **gensec_list;
};
+
+#include "auth/credentials/credentials_proto.h"
diff --git a/source4/auth/credentials/credentials_gensec.c b/source4/auth/credentials/credentials_gensec.c
index fcaa760ed4..7ea15e7988 100644
--- a/source4/auth/credentials/credentials_gensec.c
+++ b/source4/auth/credentials/credentials_gensec.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "auth/gensec/gensec.h"
const struct gensec_security_ops **cli_credentials_gensec_list(struct cli_credentials *creds)
{
diff --git a/source4/auth/gensec/config.mk b/source4/auth/gensec/config.mk
index 9078d72647..54b082bda0 100644
--- a/source4/auth/gensec/config.mk
+++ b/source4/auth/gensec/config.mk
@@ -6,6 +6,7 @@ MINOR_VERSION = 0
DESCRIPTION = Generic Security Library
RELEASE_VERSION = 1
PUBLIC_HEADERS = gensec.h
+PRIVATE_PROTO_HEADER = gensec_proto.h
INIT_FUNCTION = gensec_init
OBJ_FILES = gensec.o
REQUIRED_SUBSYSTEMS = \
diff --git a/source4/auth/gensec/gensec.h b/source4/auth/gensec/gensec.h
index 4ff09d2066..ae85bf8f5e 100644
--- a/source4/auth/gensec/gensec.h
+++ b/source4/auth/gensec/gensec.h
@@ -123,4 +123,4 @@ struct gensec_critical_sizes {
int sizeof_gensec_security;
};
-
+#include "gensec_proto.h"
diff --git a/source4/auth/gensec/schannel_state.c b/source4/auth/gensec/schannel_state.c
index edc7b8445b..43391b3a69 100644
--- a/source4/auth/gensec/schannel_state.c
+++ b/source4/auth/gensec/schannel_state.c
@@ -26,6 +26,7 @@
#include "lib/ldb/include/ldb.h"
#include "lib/ldb/include/ldb_errors.h"
#include "db_wrap.h"
+#include "dsdb/samdb/samdb.h"
/*
connect to the schannel ldb
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index 4435258c2c..f5703d5b93 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -45,6 +45,7 @@ my $section_types = {
"NOPROTO" => "bool",
"MANPAGE" => "string",
+ "PRIVATE_PROTO_HEADER" => "string"
},
"BINARY" => {
"OBJ_FILES" => "list",
@@ -56,6 +57,7 @@ my $section_types = {
"MANPAGE" => "string",
"INSTALLDIR" => "string",
+ "PRIVATE_PROTO_HEADER" => "string"
},
"LIBRARY" => {
"MAJOR_VERSION" => "string",
diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 95d0250268..e58907d69f 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -26,6 +26,8 @@
#include "lib/socket/socket.h"
#include "smbd/service_task.h"
#include "cldap_server/cldap_server.h"
+#include "dsdb/samdb/samdb.h"
+#include "auth/auth.h"
/*
fill in the cldap netlogon union for a given version
diff --git a/source4/client/client.c b/source4/client/client.c
index 2dfd1f940a..dc3ea7df74 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -28,6 +28,7 @@
#include "librpc/gen_ndr/ndr_srvsvc.h"
#include "librpc/gen_ndr/ndr_lsa.h"
#include "libcli/raw/libcliraw.h"
+#include "libcli/nbt/libnbt.h"
#include "system/time.h"
#include "system/dir.h"
#include "system/filesys.h"
diff --git a/source4/dsdb/config.mk b/source4/dsdb/config.mk
index bcdc92d9c0..b691a45f21 100644
--- a/source4/dsdb/config.mk
+++ b/source4/dsdb/config.mk
@@ -5,6 +5,7 @@ include samdb/ldb_modules/config.mk
################################################
# Start SUBSYSTEM SAMDB
[SUBSYSTEM::SAMDB]
+PRIVATE_PROTO_HEADER = samdb/samdb.h
OBJ_FILES = \
samdb/samdb.o \
samdb/samdb_privilege.o \
diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c
index a29e611566..b5479e89be 100644
--- a/source4/dsdb/samdb/cracknames.c
+++ b/source4/dsdb/samdb/cracknames.c
@@ -31,6 +31,9 @@
#include "lib/ldb/include/ldb_errors.h"
#include "system/kerberos.h"
#include "auth/kerberos/kerberos.h"
+#include "dsdb/samdb/samdb.h"
+#include "libcli/ldap/ldap.h"
+#include "auth/auth.h"
static WERROR DsCrackNameOneFilter(struct ldb_context *sam_ctx, TALLOC_CTX *mem_ctx,
struct smb_krb5_context *smb_krb5_context,
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index a959cc9bb4..cc4465b17d 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -38,6 +38,7 @@
#include "lib/ldb/include/ldb_private.h"
#include "system/time.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "dsdb/samdb/samdb.h"
#define SAM_ACCOUNT_NAME_BASE "$000000-000000000000"
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index c5eba8ae84..b6a2f9ce33 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -28,6 +28,7 @@
#include "system/time.h"
#include "system/filesys.h"
#include "db_wrap.h"
+#include "dsdb/samdb/samdb.h"
/*
connect to the SAM database
diff --git a/source4/dsdb/samdb/samdb_privilege.c b/source4/dsdb/samdb/samdb_privilege.c
index 55dfef04aa..ba29a8e96e 100644
--- a/source4/dsdb/samdb/samdb_privilege.c
+++ b/source4/dsdb/samdb/samdb_privilege.c
@@ -23,6 +23,9 @@
#include "includes.h"
#include "librpc/gen_ndr/security.h"
#include "lib/ldb/include/ldb.h"
+#include "libcli/ldap/ldap.h"
+#include "dsdb/samdb/samdb.h"
+#include "auth/auth.h"
/*
add privilege bits for one sid to a security_token
diff --git a/source4/gtk/tools/gepdump.c b/source4/gtk/tools/gepdump.c
index 9275bc1ebd..e43c79b926 100644
--- a/source4/gtk/tools/gepdump.c
+++ b/source4/gtk/tools/gepdump.c
@@ -25,6 +25,7 @@
#include "gtk/common/select.h"
#include "gtk/common/gtk-smb.h"
#include "lib/cmdline/popt_common.h"
+#include "auth/gensec/gensec.h"
#include "smb_build.h"
/*
diff --git a/source4/include/includes.h b/source4/include/includes.h
index a8aecc3610..b6d074f8b2 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -85,6 +85,7 @@ struct ipv4_addr {
};
+#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
#include "lib/replace/replace.h"
/* Lists, trees, caching, database... */
@@ -102,7 +103,6 @@ struct ipv4_addr {
#include "smb.h"
#include "byteorder.h"
#include "librpc/ndr/libndr.h"
-#include "librpc/gen_ndr/misc.h"
#include "librpc/gen_ndr/dcerpc.h"
#include "librpc/ndr/ndr_orpc.h"
#include "librpc/gen_ndr/orpc.h"
@@ -110,9 +110,9 @@ struct ipv4_addr {
#include "smb_interfaces.h"
#include "cli_context.h"
#include "auth/credentials/credentials.h"
+#include "libcli/nbt/libnbt.h"
/***** automatically generated prototypes *****/
-#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
#include "include/proto.h"
#include "basic.h"
#undef _PRINTF_ATTRIBUTE
diff --git a/source4/include/structs.h b/source4/include/structs.h
index 2187fcd8ba..b78d918417 100644
--- a/source4/include/structs.h
+++ b/source4/include/structs.h
@@ -340,6 +340,7 @@ struct packet_context;
struct smbcli_socket;
struct smbcli_request;
+struct smbcli_tree;
struct _krb5_krb_auth_data;
diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c
index 367c211b90..5a3d9c25e7 100644
--- a/source4/kdc/hdb-ldb.c
+++ b/source4/kdc/hdb-ldb.c
@@ -41,6 +41,7 @@
#include "system/iconv.h"
#include "librpc/gen_ndr/netlogon.h"
#include "auth/auth.h"
+#include "dsdb/samdb/samdb.h"
enum hdb_ldb_ent_type
{ HDB_LDB_ENT_TYPE_CLIENT, HDB_LDB_ENT_TYPE_SERVER,
diff --git a/source4/kdc/kpasswdd.c b/source4/kdc/kpasswdd.c
index 4dd0eda444..e6f0ae9dd7 100644
--- a/source4/kdc/kpasswdd.c
+++ b/source4/kdc/kpasswdd.c
@@ -31,6 +31,7 @@
#include "lib/ldb/include/ldb.h"
#include "heimdal/lib/krb5/krb5-private.h"
#include "auth/auth.h"
+#include "dsdb/samdb/samdb.h"
/* hold information about one kdc socket */
struct kpasswd_socket {
diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c
index 4350f3abe8..badd4ec541 100644
--- a/source4/ldap_server/ldap_bind.c
+++ b/source4/ldap_server/ldap_bind.c
@@ -23,6 +23,7 @@
#include "auth/auth.h"
#include "libcli/ldap/ldap.h"
#include "smbd/service_stream.h"
+#include "dsdb/samdb/samdb.h"
static NTSTATUS ldapsrv_BindSimple(struct ldapsrv_call *call)
{
diff --git a/source4/ldap_server/ldap_simple_ldb.c b/source4/ldap_server/ldap_simple_ldb.c
index 07d85f634f..a32cc3b5e0 100644
--- a/source4/ldap_server/ldap_simple_ldb.c
+++ b/source4/ldap_server/ldap_simple_ldb.c
@@ -25,6 +25,7 @@
#include "lib/ldb/include/ldb_errors.h"
#include "auth/auth.h"
#include "db_wrap.h"
+#include "dsdb/samdb/samdb.h"
#define VALID_DN_SYNTAX(dn,i) do {\
if (!(dn)) {\
diff --git a/source4/lib/basic.mk b/source4/lib/basic.mk
index b4bde76d3f..a092f2c818 100644
--- a/source4/lib/basic.mk
+++ b/source4/lib/basic.mk
@@ -57,6 +57,7 @@ OBJ_FILES = \
################################################
[SUBSYSTEM::GENCACHE]
+PRIVATE_PROTO_HEADER = gencache.h
OBJ_FILES = \
gencache.o \
diff --git a/source4/lib/ldb/samba/ldif_handlers.c b/source4/lib/ldb/samba/ldif_handlers.c
index 6d2e4349cf..84270195dc 100644
--- a/source4/lib/ldb/samba/ldif_handlers.c
+++ b/source4/lib/ldb/samba/ldif_handlers.c
@@ -27,6 +27,7 @@
#include "ldb/include/ldb_private.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "librpc/gen_ndr/ndr_misc.h"
+#include "dsdb/samdb/samdb.h"
/*
convert a ldif formatted objectSid to a NDR formatted blob
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c
index 3bbc87d05f..a14434622f 100644
--- a/source4/lib/ldb/tools/cmdline.c
+++ b/source4/lib/ldb/tools/cmdline.c
@@ -29,6 +29,7 @@
#ifdef _SAMBA_BUILD_
#include "lib/cmdline/popt_common.h"
#include "smb_build.h"
+#include "auth/auth.h"
#endif
/*
diff --git a/source4/libcli/clitrans2.c b/source4/libcli/clitrans2.c
index 6be92fa17d..c440b25e36 100644
--- a/source4/libcli/clitrans2.c
+++ b/source4/libcli/clitrans2.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "libcli/raw/libcliraw.h"
/****************************************************************************
send a qpathinfo call
diff --git a/source4/libcli/config.mk b/source4/libcli/config.mk
index f76a396852..c3ebebed41 100644
--- a/source4/libcli/config.mk
+++ b/source4/libcli/config.mk
@@ -35,6 +35,7 @@ MAJOR_VERSION = 0
MINOR_VERSION = 0
RELEASE_VERSION = 1
DESCRIPTION = NetBios over TCP/IP client library
+PRIVATE_PROTO_HEADER = nbt/nbt_proto.h
OBJ_FILES = \
nbt/nbtname.o \
nbt/nbtsocket.o \
@@ -66,6 +67,7 @@ NOPROTO=YES
REQUIRED_SUBSYSTEMS = LIBCLI_LDAP
[LIBRARY::LIBCLI_WREPL]
+PRIVATE_PROTO_HEADER = wrepl/winsrepl_proto.h
MAJOR_VERSION = 0
MINOR_VERSION = 0
RELEASE_VERSION = 1
@@ -103,6 +105,7 @@ OBJ_FILES = clireadwrite.o \
clideltree.o
[SUBSYSTEM::LIBCLI_RAW]
+PRIVATE_PROTO_HEADER = raw/raw_proto.h
REQUIRED_SUBSYSTEMS = LIBCLI_RAW_KRB5
OBJ_FILES = raw/rawfile.o \
raw/smb_signing.o \
diff --git a/source4/libcli/ldap/config.mk b/source4/libcli/ldap/config.mk
index 243de79fce..b9fcb20038 100644
--- a/source4/libcli/ldap/config.mk
+++ b/source4/libcli/ldap/config.mk
@@ -1,6 +1,7 @@
#################################
# Start SUBSYSTEM LIBCLI_LDAP
[SUBSYSTEM::LIBCLI_LDAP]
+PRIVATE_PROTO_HEADER = ldap_proto.h
OBJ_FILES = ldap.o \
ldap_client.o \
ldap_bind.o \
diff --git a/source4/libcli/ldap/ldap.h b/source4/libcli/ldap/ldap.h
index 4f2dbc0787..b6e69ff8e6 100644
--- a/source4/libcli/ldap/ldap.h
+++ b/source4/libcli/ldap/ldap.h
@@ -254,4 +254,6 @@ struct ldap_message {
struct ldap_Control *controls;
};
+#include "libcli/ldap/ldap_proto.h"
+
#endif
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
index 0a787bbf57..1ce86f7f85 100644
--- a/source4/libcli/ldap/ldap_client.c
+++ b/source4/libcli/ldap/ldap_client.c
@@ -33,6 +33,7 @@
#include "libcli/ldap/ldap_client.h"
#include "libcli/composite/composite.h"
#include "lib/stream/packet.h"
+#include "auth/gensec/gensec.h"
/*
diff --git a/source4/libcli/nbt/libnbt.h b/source4/libcli/nbt/libnbt.h
index 218b5e5921..7c9e3e9651 100644
--- a/source4/libcli/nbt/libnbt.h
+++ b/source4/libcli/nbt/libnbt.h
@@ -20,6 +20,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#ifndef __LIBNBT_H__
+#define __LIBNBT_H__
+
#include "librpc/gen_ndr/ndr_nbt.h"
/*
@@ -267,3 +270,7 @@ struct nbt_name_release {
uint8_t rcode;
} out;
};
+
+#include "libcli/nbt/nbt_proto.h"
+
+#endif /* __LIBNBT_H__ */
diff --git a/source4/libcli/raw/clitransport.c b/source4/libcli/raw/clitransport.c
index a0efe7042c..2972da07a0 100644
--- a/source4/libcli/raw/clitransport.c
+++ b/source4/libcli/raw/clitransport.c
@@ -26,6 +26,7 @@
#include "dlinklist.h"
#include "lib/events/events.h"
#include "lib/stream/packet.h"
+#include "libcli/nbt/libnbt.h"
/*
diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h
index decee83eb7..b09361b5ff 100644
--- a/source4/libcli/raw/libcliraw.h
+++ b/source4/libcli/raw/libcliraw.h
@@ -269,3 +269,5 @@ struct smbcli_request {
req->status = NT_STATUS_INVALID_PARAMETER; \
goto failed; \
}
+
+#include "libcli/raw/raw_proto.h"
diff --git a/source4/libcli/raw/rawacl.c b/source4/libcli/raw/rawacl.c
index e168da9d1d..ae17447784 100644
--- a/source4/libcli/raw/rawacl.c
+++ b/source4/libcli/raw/rawacl.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "libcli/raw/libcliraw.h"
/****************************************************************************
fetch file ACL (async send)
diff --git a/source4/libcli/resolve/host.c b/source4/libcli/resolve/host.c
index 13503b66b3..f1925ca0d8 100644
--- a/source4/libcli/resolve/host.c
+++ b/source4/libcli/resolve/host.c
@@ -35,6 +35,7 @@
#include "system/filesys.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/composite/composite.h"
+#include "libcli/nbt/libnbt.h"
struct host_state {
struct nbt_name name;
diff --git a/source4/libcli/resolve/resolve.c b/source4/libcli/resolve/resolve.c
index bbed931eed..dcbccc0c70 100644
--- a/source4/libcli/resolve/resolve.c
+++ b/source4/libcli/resolve/resolve.c
@@ -24,6 +24,7 @@
#include "lib/events/events.h"
#include "libcli/raw/libcliraw.h"
#include "libcli/composite/composite.h"
+#include "libcli/nbt/libnbt.h"
struct resolve_state {
struct nbt_name name;
diff --git a/source4/libcli/security/security_token.c b/source4/libcli/security/security_token.c
index 8e52759e70..e61e2edcf5 100644
--- a/source4/libcli/security/security_token.c
+++ b/source4/libcli/security/security_token.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "dsdb/samdb/samdb.h"
/*
return a blank security token
diff --git a/source4/libcli/smb2/config.mk b/source4/libcli/smb2/config.mk
index a5b7ce2f38..dc4715ffe4 100644
--- a/source4/libcli/smb2/config.mk
+++ b/source4/libcli/smb2/config.mk
@@ -1,4 +1,5 @@
[SUBSYSTEM::LIBCLI_SMB2]
+PRIVATE_PROTO_HEADER = smb2_proto.h
OBJ_FILES = \
transport.o \
request.o \
diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h
index ceafacf9d4..eb7c10ed9d 100644
--- a/source4/libcli/smb2/smb2.h
+++ b/source4/libcli/smb2/smb2.h
@@ -197,3 +197,5 @@ struct smb2_request {
return NT_STATUS_INVALID_PARAMETER; \
} \
} while (0)
+
+#include "libcli/smb2/smb2_proto.h"
diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c
index 785b0d076b..4191c43ca6 100644
--- a/source4/libcli/smb_composite/connect.c
+++ b/source4/libcli/smb_composite/connect.c
@@ -26,6 +26,7 @@
#include "libcli/composite/composite.h"
#include "libcli/smb_composite/smb_composite.h"
#include "lib/events/events.h"
+#include "libcli/nbt/libnbt.h"
/* the stages of this call */
enum connect_stage {CONNECT_RESOLVE,
diff --git a/source4/libcli/wrepl/winsrepl.h b/source4/libcli/wrepl/winsrepl.h
index e679bef6e6..2fea11bd63 100644
--- a/source4/libcli/wrepl/winsrepl.h
+++ b/source4/libcli/wrepl/winsrepl.h
@@ -154,3 +154,5 @@ struct wrepl_pull_names {
} *names;
} out;
};
+
+#include "libcli/wrepl/winsrepl_proto.h"
diff --git a/source4/libnet/config.mk b/source4/libnet/config.mk
index cf0c64a014..3c695edd39 100644
--- a/source4/libnet/config.mk
+++ b/source4/libnet/config.mk
@@ -5,6 +5,7 @@ MAJOR_VERSION = 0
MINOR_VERSION = 0
RELEASE_VERSION = 1
DESCRIPTION = User-friendly access to Samba interfaces
+PRIVATE_PROTO_HEADER = libnet_proto.h
PUBLIC_HEADERS = libnet.h libnet_join.h libnet_lookup.h libnet_passwd.h \
libnet_rpc.h libnet_share.h libnet_time.h libnet_user.h \
libnet_vampire.h userinfo.h userman.h
diff --git a/source4/libnet/libnet.h b/source4/libnet/libnet.h
index be22439590..3044b5a95f 100644
--- a/source4/libnet/libnet.h
+++ b/source4/libnet/libnet.h
@@ -47,3 +47,4 @@ struct libnet_context {
#include "libnet/libnet_user.h"
#include "libnet/libnet_share.h"
#include "libnet/libnet_lookup.h"
+#include "libnet/libnet_proto.h"
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index 11e1dfc175..af15d81797 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -30,6 +30,7 @@
#include "libcli/cldap/cldap.h"
#include "include/secrets.h"
#include "librpc/gen_ndr/drsuapi.h"
+#include "dsdb/samdb/samdb.h"
/*
* find out Site specific stuff:
diff --git a/source4/libnet/libnet_samsync_ldb.c b/source4/libnet/libnet_samsync_ldb.c
index 658c1254dd..c97d9013c9 100644
--- a/source4/libnet/libnet_samsync_ldb.c
+++ b/source4/libnet/libnet_samsync_ldb.c
@@ -28,7 +28,10 @@
#include "librpc/gen_ndr/ndr_netlogon.h"
#include "librpc/gen_ndr/ndr_samr.h"
#include "dlinklist.h"
+#include "libcli/ldap/ldap.h"
#include "lib/ldb/include/ldb.h"
+#include "dsdb/samdb/samdb.h"
+#include "auth/auth.h"
struct samsync_ldb_secret {
struct samsync_ldb_secret *prev, *next;
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index 5a43fbe0b1..421a5866d3 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -6,6 +6,7 @@ MINOR_VERSION = 0
RELEASE_VERSION = 1
DESCRIPTION = Network Data Representation Core Library
PUBLIC_HEADERS = ndr/libndr.h
+PRIVATE_PROTO_HEADER = ndr/libndr_proto.h
OBJ_FILES = \
ndr/ndr.o \
ndr/ndr_basic.o \
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h
index 3d8bdf9f36..86962bd563 100644
--- a/source4/librpc/ndr/libndr.h
+++ b/source4/librpc/ndr/libndr.h
@@ -280,3 +280,6 @@ typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, cons
extern const struct dcerpc_syntax_id ndr_transfer_syntax;
extern const struct dcerpc_syntax_id ndr64_transfer_syntax;
+
+#include "librpc/gen_ndr/misc.h"
+#include "librpc/ndr/libndr_proto.h"
diff --git a/source4/librpc/rpc/config.mk b/source4/librpc/rpc/config.mk
index 564e6f61e6..7206d2f651 100644
--- a/source4/librpc/rpc/config.mk
+++ b/source4/librpc/rpc/config.mk
@@ -1,6 +1,7 @@
################################################
# Start SUBSYSTEM RPC_RAW
[SUBSYSTEM::RPC_RAW]
+PRIVATE_PROTO_HEADER = dcerpc_proto.h
OBJ_FILES = \
dcerpc.o \
dcerpc_auth.o \
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 9e585f9612..e9c479a9cd 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -28,6 +28,7 @@
#include "librpc/gen_ndr/ndr_dcerpc.h"
#include "librpc/gen_ndr/ndr_misc.h"
#include "libcli/composite/composite.h"
+#include "auth/gensec/gensec.h"
static void dcerpc_ship_next_request(struct dcerpc_connection *c);
diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h
index 058bef1ddf..b120933517 100644
--- a/source4/librpc/rpc/dcerpc.h
+++ b/source4/librpc/rpc/dcerpc.h
@@ -239,3 +239,5 @@ struct rpc_request {
void *private;
} async;
};
+
+#include "librpc/rpc/dcerpc_proto.h"
diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c
index c66384a3cf..bffa994abe 100644
--- a/source4/librpc/rpc/dcerpc_auth.c
+++ b/source4/librpc/rpc/dcerpc_auth.c
@@ -24,6 +24,7 @@
#include "includes.h"
#include "libcli/composite/composite.h"
+#include "auth/gensec/gensec.h"
/*
do a non-athenticated dcerpc bind
diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c
index 03a408de79..7ab90fbbf7 100644
--- a/source4/librpc/rpc/dcerpc_connect.c
+++ b/source4/librpc/rpc/dcerpc_connect.c
@@ -32,6 +32,7 @@
#include "libcli/raw/libcliraw.h"
#include "libcli/composite/composite.h"
#include "libcli/smb_composite/smb_composite.h"
+#include "libcli/smb2/smb2.h"
struct dcerpc_pipe_connect;
diff --git a/source4/main.mk b/source4/main.mk
index 98eca425e3..ed4e4f79a8 100644
--- a/source4/main.mk
+++ b/source4/main.mk
@@ -210,7 +210,8 @@ pch: include/config.h \
idl \
include/includes.h.gch
-include/includes.h: lib/basic.h
+libcli/nbt/libnbt.h: libcli/nbt/nbt_proto.h
+include/includes.h: lib/basic.h libcli/nbt/libnbt.h
clean_pch:
-rm -f include/includes.h.gch
diff --git a/source4/nbt_server/dgram/netlogon.c b/source4/nbt_server/dgram/netlogon.c
index 059aad8c66..4b62025875 100644
--- a/source4/nbt_server/dgram/netlogon.c
+++ b/source4/nbt_server/dgram/netlogon.c
@@ -26,6 +26,8 @@
#include "smbd/service_task.h"
#include "lib/socket/socket.h"
#include "lib/ldb/include/ldb.h"
+#include "dsdb/samdb/samdb.h"
+#include "auth/auth.h"
/*
reply to a GETDC request
diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c
index a037f9cc49..55e2522f25 100644
--- a/source4/nbt_server/wins/winsdb.c
+++ b/source4/nbt_server/wins/winsdb.c
@@ -28,6 +28,7 @@
#include "lib/ldb/include/ldb_errors.h"
#include "db_wrap.h"
#include "system/time.h"
+#include "auth/auth.h"
/*
return the new maxVersion and save it
diff --git a/source4/ntptr/config.mk b/source4/ntptr/config.mk
index 14124e12fe..d425f57ca4 100644
--- a/source4/ntptr/config.mk
+++ b/source4/ntptr/config.mk
@@ -15,6 +15,7 @@ REQUIRED_SUBSYSTEMS = \
################################################
# Start SUBSYSTEM NTPTR
[SUBSYSTEM::NTPTR]
+PRIVATE_PROTO_HEADER = ntptr_proto.h
OBJ_FILES = \
ntptr_base.o \
ntptr_interface.o
diff --git a/source4/ntptr/ntptr.h b/source4/ntptr/ntptr.h
index 0f07f26cbb..86cf2eeac6 100644
--- a/source4/ntptr/ntptr.h
+++ b/source4/ntptr/ntptr.h
@@ -186,3 +186,4 @@ struct ntptr_critical_sizes {
int sizeof_ntptr_context;
int sizeof_ntptr_ops;
};
+#include "ntptr/ntptr_proto.h"
diff --git a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
index ebd6eb4f46..60aa6299a6 100644
--- a/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
+++ b/source4/ntptr/simple_ldb/ntptr_simple_ldb.c
@@ -33,6 +33,8 @@
#include "librpc/gen_ndr/ndr_spoolss.h"
#include "lib/ldb/include/ldb.h"
#include "db_wrap.h"
+#include "auth/auth.h"
+#include "dsdb/samdb/samdb.h"
/*
connect to the SPOOLSS database
diff --git a/source4/ntvfs/common/sidmap.c b/source4/ntvfs/common/sidmap.c
index f3ee938d84..1f19ba171d 100644
--- a/source4/ntvfs/common/sidmap.c
+++ b/source4/ntvfs/common/sidmap.c
@@ -25,6 +25,9 @@
#include "system/passwd.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "ads.h"
+#include "dsdb/samdb/samdb.h"
+#include "auth/auth.h"
+#include "libcli/ldap/ldap.h"
/*
these are used for the fallback local uid/gid to sid mapping
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 3a643d7145..415d09a729 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -30,6 +30,7 @@
#include "dlinklist.h"
#include "smb_server/smb_server.h"
#include "ntvfs/ntvfs.h"
+#include "rpc_server/dcerpc_server.h"
#define IPC_BASE_FNUM 0x400
diff --git a/source4/ntvfs/posix/config.mk b/source4/ntvfs/posix/config.mk
index 53c51cf805..a2a4685d8c 100644
--- a/source4/ntvfs/posix/config.mk
+++ b/source4/ntvfs/posix/config.mk
@@ -3,6 +3,7 @@
[MODULE::ntvfs_posix]
SUBSYSTEM = NTVFS
INIT_FUNCTION = ntvfs_posix_init
+PRIVATE_PROTO_HEADER = vfs_posix_proto.h
OBJ_FILES = \
vfs_posix.o \
pvfs_util.o \
diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h
index dd2bf74543..3028053f5e 100644
--- a/source4/ntvfs/posix/vfs_posix.h
+++ b/source4/ntvfs/posix/vfs_posix.h
@@ -204,4 +204,6 @@ void *pvfs_wait_message(struct pvfs_state *pvfs,
void (*fn)(void *, enum pvfs_wait_notice),
void *private);
+#include "ntvfs/posix/vfs_posix_proto.h"
+
#endif /* _VFS_POSIX_H_ */
diff --git a/source4/passdb/secrets.c b/source4/passdb/secrets.c
index 9673b89d2c..13f71e269e 100644
--- a/source4/passdb/secrets.c
+++ b/source4/passdb/secrets.c
@@ -28,6 +28,7 @@
#include "system/filesys.h"
#include "db_wrap.h"
#include "lib/ldb/include/ldb.h"
+#include "dsdb/samdb/samdb.h"
static struct tdb_wrap *tdb;
diff --git a/source4/rpc_server/config.mk b/source4/rpc_server/config.mk
index f3fccc77fc..f6ec5d3080 100644
--- a/source4/rpc_server/config.mk
+++ b/source4/rpc_server/config.mk
@@ -199,6 +199,7 @@ REQUIRED_SUBSYSTEMS = \
################################################
# Start SUBSYSTEM DCERPC
[SUBSYSTEM::DCERPC]
+PRIVATE_PROTO_HEADER = dcerpc_server_proto.h
OBJ_FILES = \
dcerpc_server.o \
dcerpc_sock.o \
diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h
index e831b70060..783cdb58b1 100644
--- a/source4/rpc_server/dcerpc_server.h
+++ b/source4/rpc_server/dcerpc_server.h
@@ -238,4 +238,6 @@ struct dcesrv_critical_sizes {
int sizeof_dcesrv_handle;
};
+#include "rpc_server/dcerpc_server_proto.h"
+
#endif /* SAMBA_DCERPC_SERVER_H */
diff --git a/source4/rpc_server/dcesrv_auth.c b/source4/rpc_server/dcesrv_auth.c
index 6caef7424d..d33b123f22 100644
--- a/source4/rpc_server/dcesrv_auth.c
+++ b/source4/rpc_server/dcesrv_auth.c
@@ -24,6 +24,7 @@
#include "includes.h"
#include "rpc_server/dcerpc_server.h"
#include "librpc/gen_ndr/ndr_dcerpc.h"
+#include "auth/gensec/gensec.h"
/*
parse any auth information from a dcerpc bind request
diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
index a762b44878..68bac0f2ce 100644
--- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
+++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
@@ -26,6 +26,7 @@
#include "rpc_server/common/common.h"
#include "rpc_server/drsuapi/dcesrv_drsuapi.h"
#include "auth/auth.h"
+#include "dsdb/samdb/samdb.h"
/*
drsuapi_DsBind
diff --git a/source4/rpc_server/dssetup/dcesrv_dssetup.c b/source4/rpc_server/dssetup/dcesrv_dssetup.c
index 1d391f588f..61e560299c 100644
--- a/source4/rpc_server/dssetup/dcesrv_dssetup.c
+++ b/source4/rpc_server/dssetup/dcesrv_dssetup.c
@@ -26,6 +26,7 @@
#include "librpc/gen_ndr/ndr_dssetup.h"
#include "rpc_server/common/common.h"
#include "ldb/include/ldb.h"
+#include "dsdb/samdb/samdb.h"
/*
dssetup_DsRoleGetPrimaryDomainInformation
*/
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index 64da9f488f..2171ac48b0 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -30,6 +30,8 @@
#include "system/time.h"
#include "db_wrap.h"
#include "auth/auth.h"
+#include "dsdb/samdb/samdb.h"
+#include "libcli/ldap/ldap.h"
/*
this type allows us to distinguish handle types
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index e482a229b7..335cd3d9e7 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -28,6 +28,7 @@
#include "librpc/gen_ndr/ndr_dcom.h"
#include "lib/ldb/include/ldb.h"
#include "auth/auth.h"
+#include "dsdb/samdb/samdb.h"
struct server_pipe_state {
struct netr_Credential client_challenge;
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index de08695502..b7d770af84 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -30,6 +30,8 @@
#include "system/time.h"
#include "lib/ldb/include/ldb.h"
#include "ads.h"
+#include "dsdb/samdb/samdb.h"
+#include "libcli/ldap/ldap.h"
/*
diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c
index 0b4709fa97..3831be10af 100644
--- a/source4/rpc_server/samr/samr_password.c
+++ b/source4/rpc_server/samr/samr_password.c
@@ -30,6 +30,9 @@
#include "lib/crypto/crypto.h"
#include "lib/ldb/include/ldb.h"
#include "ads.h"
+#include "libcli/ldap/ldap.h"
+#include "dsdb/samdb/samdb.h"
+#include "auth/auth.h"
/*
samr_ChangePasswordUser
diff --git a/source4/smb_server/smb/config.mk b/source4/smb_server/smb/config.mk
index b412674c00..2f0da23072 100644
--- a/source4/smb_server/smb/config.mk
+++ b/source4/smb_server/smb/config.mk
@@ -1,6 +1,7 @@
#######################
# Start SUBSYSTEM SMB_PROTOCOL
[SUBSYSTEM::SMB_PROTOCOL]
+PRIVATE_PROTO_HEADER = smb_proto.h
OBJ_FILES = \
receive.o \
negprot.o \
diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c
index 7d5398671d..1ade18d694 100644
--- a/source4/smb_server/smb/nttrans.c
+++ b/source4/smb_server/smb/nttrans.c
@@ -26,6 +26,7 @@
#include "smb_server/smb_server.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "ntvfs/ntvfs.h"
+#include "libcli/raw/libcliraw.h"
diff --git a/source4/smb_server/smb/signing.c b/source4/smb_server/smb/signing.c
index b461056397..7f441a2816 100644
--- a/source4/smb_server/smb/signing.c
+++ b/source4/smb_server/smb/signing.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "smb_server/smb_server.h"
+#include "libcli/raw/libcliraw.h"
/*
diff --git a/source4/smb_server/smb/trans2.c b/source4/smb_server/smb/trans2.c
index ef7fa40b20..885f54a48e 100644
--- a/source4/smb_server/smb/trans2.c
+++ b/source4/smb_server/smb/trans2.c
@@ -26,6 +26,7 @@
#include "smb_server/smb_server.h"
#include "librpc/gen_ndr/ndr_misc.h"
#include "ntvfs/ntvfs.h"
+#include "libcli/raw/libcliraw.h"
#define CHECK_MIN_BLOB_SIZE(blob, size) do { \
if ((blob)->length < (size)) { \
diff --git a/source4/smb_server/smb2/config.mk b/source4/smb_server/smb2/config.mk
index 4a680200fd..686f6f783c 100644
--- a/source4/smb_server/smb2/config.mk
+++ b/source4/smb_server/smb2/config.mk
@@ -1,6 +1,7 @@
#######################
# Start SUBSYSTEM SMB2_PROTOCOL
[SUBSYSTEM::SMB2_PROTOCOL]
+PRIVATE_PROTO_HEADER = smb2_proto.h
OBJ_FILES = \
receive.o \
negprot.o \
diff --git a/source4/smb_server/smb2/smb2_server.h b/source4/smb_server/smb2/smb2_server.h
index 913c7f2eab..1c544bfe82 100644
--- a/source4/smb_server/smb2/smb2_server.h
+++ b/source4/smb_server/smb2/smb2_server.h
@@ -48,3 +48,5 @@ struct smb2srv_request {
struct smb2_request_buffer in;
struct smb2_request_buffer out;
};
+
+#include "smb_server/smb2/smb2_proto.h"
diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c
index bffc19fc72..e4b9a227d4 100644
--- a/source4/smb_server/smb_server.c
+++ b/source4/smb_server/smb_server.c
@@ -28,6 +28,7 @@
#include "lib/messaging/irpc.h"
#include "lib/stream/packet.h"
#include "libcli/smb2/smb2.h"
+#include "smb_server/smb2/smb2_server.h"
static NTSTATUS smbsrv_recv_generic_request(void *private, DATA_BLOB blob)
{
diff --git a/source4/smb_server/smb_server.h b/source4/smb_server/smb_server.h
index d0df15e022..3280706eca 100644
--- a/source4/smb_server/smb_server.h
+++ b/source4/smb_server/smb_server.h
@@ -303,3 +303,4 @@ struct smbsrv_connection {
};
#include "smb_server/smb_server_proto.h"
+#include "smb_server/smb/smb_proto.h"
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index 7174084f13..d6bc88248f 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -33,6 +33,7 @@
#include "smb_build.h"
#include "registry/registry.h"
#include "ntvfs/ntvfs.h"
+#include "ntptr/ntptr.h"
/*
recursively delete a directory tree
diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c
index 159c2ae4ae..e4e2b71405 100644
--- a/source4/torture/basic/aliases.c
+++ b/source4/torture/basic/aliases.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "dlinklist.h"
+#include "libcli/raw/libcliraw.h"
int create_complex_file(struct smbcli_state *cli, TALLOC_CTX *mem_ctx, const char *fname);
diff --git a/source4/torture/basic/charset.c b/source4/torture/basic/charset.c
index af6020da17..a216ebc05a 100644
--- a/source4/torture/basic/charset.c
+++ b/source4/torture/basic/charset.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "libcli/raw/libcliraw.h"
#define BASEDIR "\\chartest\\"
diff --git a/source4/torture/libnet/domain.c b/source4/torture/libnet/domain.c
index 7f8600d2dd..de1dfad6ff 100644
--- a/source4/torture/libnet/domain.c
+++ b/source4/torture/libnet/domain.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_samr.h"
#include "libnet/composite.h"
+#include "libnet/libnet.h"
static BOOL test_domainopen(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct lsa_String *domname,
diff --git a/source4/torture/libnet/userinfo.c b/source4/torture/libnet/userinfo.c
index b987bd5c21..1334763c12 100644
--- a/source4/torture/libnet/userinfo.c
+++ b/source4/torture/libnet/userinfo.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_samr.h"
+#include "libnet/libnet.h"
#include "libnet/composite.h"
#include "libnet/userinfo.h"
diff --git a/source4/torture/libnet/userman.c b/source4/torture/libnet/userman.c
index 6ec5d9a7b7..6a450e8b78 100644
--- a/source4/torture/libnet/userman.c
+++ b/source4/torture/libnet/userman.c
@@ -23,6 +23,7 @@
#include "librpc/gen_ndr/ndr_samr.h"
#include "libnet/composite.h"
#include "libnet/userman.h"
+#include "libnet/libnet.h"
#define TEST_USERNAME "libnetusermantest"
diff --git a/source4/torture/nbench/nbio.c b/source4/torture/nbench/nbio.c
index 1cb00b6733..540f709211 100644
--- a/source4/torture/nbench/nbio.c
+++ b/source4/torture/nbench/nbio.c
@@ -25,6 +25,7 @@
#include "system/filesys.h"
#include "dlinklist.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "libcli/raw/libcliraw.h"
#define MAX_FILES 100
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 52fc100b23..66609b8e80 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "rap.h"
+#include "libcli/raw/libcliraw.h"
struct rap_call {
uint16_t callno;
diff --git a/source4/torture/raw/chkpath.c b/source4/torture/raw/chkpath.c
index fd6a3d972d..44dbe97e00 100644
--- a/source4/torture/raw/chkpath.c
+++ b/source4/torture/raw/chkpath.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "libcli/raw/libcliraw.h"
#define BASEDIR "\\rawchkpath"
diff --git a/source4/torture/raw/close.c b/source4/torture/raw/close.c
index 733800da19..6d55501cd3 100644
--- a/source4/torture/raw/close.c
+++ b/source4/torture/raw/close.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "system/time.h"
+#include "libcli/raw/libcliraw.h"
/* basic testing of all RAW_CLOSE_* calls
diff --git a/source4/torture/raw/ioctl.c b/source4/torture/raw/ioctl.c
index 2768002893..7cce8aa61b 100644
--- a/source4/torture/raw/ioctl.c
+++ b/source4/torture/raw/ioctl.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "ioctl.h"
+#include "libcli/raw/libcliraw.h"
#define BASEDIR "\\rawioctl"
diff --git a/source4/torture/raw/mkdir.c b/source4/torture/raw/mkdir.c
index 5cdc839194..eb63bdee46 100644
--- a/source4/torture/raw/mkdir.c
+++ b/source4/torture/raw/mkdir.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "libcli/raw/libcliraw.h"
#define BASEDIR "\\mkdirtest"
diff --git a/source4/torture/raw/notify.c b/source4/torture/raw/notify.c
index 921fdb4dbf..6f115adc9e 100644
--- a/source4/torture/raw/notify.c
+++ b/source4/torture/raw/notify.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "libcli/raw/libcliraw.h"
#define BASEDIR "\\test_notify"
diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c
index 95d88f2b07..4b67ce5cac 100644
--- a/source4/torture/raw/oplock.c
+++ b/source4/torture/raw/oplock.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "libcli/raw/libcliraw.h"
#define CHECK_VAL(v, correct) do { \
if ((v) != (correct)) { \
diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c
index f4737920fa..921e7f574f 100644
--- a/source4/torture/raw/rename.c
+++ b/source4/torture/raw/rename.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "libcli/raw/libcliraw.h"
#define CHECK_STATUS(status, correct) do { \
if (!NT_STATUS_EQUAL(status, correct)) { \
diff --git a/source4/torture/raw/seek.c b/source4/torture/raw/seek.c
index 9652b7597f..d7d0527bbc 100644
--- a/source4/torture/raw/seek.c
+++ b/source4/torture/raw/seek.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "system/filesys.h"
+#include "libcli/raw/libcliraw.h"
#define CHECK_STATUS(status, correct) do { \
if (!NT_STATUS_EQUAL(status, correct)) { \
diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c
index c18a607f11..6d2dcbc03f 100644
--- a/source4/torture/raw/setfileinfo.c
+++ b/source4/torture/raw/setfileinfo.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "system/time.h"
+#include "libcli/raw/libcliraw.h"
#define BASEDIR "\\testsfileinfo"
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c
index 855ecaf077..9ff9496cd4 100644
--- a/source4/torture/raw/unlink.c
+++ b/source4/torture/raw/unlink.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "system/filesys.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "libcli/raw/libcliraw.h"
#define CHECK_STATUS(status, correct) do { \
if (!NT_STATUS_EQUAL(status, correct)) { \
diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c
index 28ac07f607..4ac5fa390c 100644
--- a/source4/torture/rpc/mgmt.c
+++ b/source4/torture/rpc/mgmt.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_mgmt.h"
+#include "auth/gensec/gensec.h"
/*
diff --git a/source4/torture/smb2/setinfo.c b/source4/torture/smb2/setinfo.c
index aa66d510d4..d659af329d 100644
--- a/source4/torture/smb2/setinfo.c
+++ b/source4/torture/smb2/setinfo.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "system/time.h"
+#include "libcli/smb2/smb2.h"
#define BASEDIR ""
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index a86a925778..a6ec030c1d 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -28,6 +28,7 @@
#include "ioctl.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "smb_build.h"
+#include "libcli/nbt/libnbt.h"
int torture_nprocs=4;
int torture_numops=10;
diff --git a/source4/utils/net/config.mk b/source4/utils/net/config.mk
index 382906f349..e9f7e6ef52 100644
--- a/source4/utils/net/config.mk
+++ b/source4/utils/net/config.mk
@@ -4,6 +4,7 @@
# Start BINARY net
[BINARY::net]
INSTALLDIR = BINDIR
+PRIVATE_PROTO_HEADER = net_proto.h
OBJ_FILES = \
net.o \
net_password.o \
diff --git a/source4/utils/net/net.h b/source4/utils/net/net.h
index 6f3aa1086b..8d9c78c1a9 100644
--- a/source4/utils/net/net.h
+++ b/source4/utils/net/net.h
@@ -34,4 +34,6 @@ struct net_functable {
int (*usage)(struct net_context *ctx, int argc, const char **argv);
};
+#include "utils/net/net_proto.h"
+
#endif /* _UTIL_NET_H */
diff --git a/source4/winbind/config.mk b/source4/winbind/config.mk
index e3ed9a057b..1a91f7bee5 100644
--- a/source4/winbind/config.mk
+++ b/source4/winbind/config.mk
@@ -3,6 +3,7 @@
#######################
# Start SUBSYSTEM WINBIND
[SUBSYSTEM::WINBIND]
+PRIVATE_PROTO_HEADER = wb_proto.h
OBJ_FILES = \
wb_server.o \
wb_samba3_protocol.o \
diff --git a/source4/winbind/wb_server.h b/source4/winbind/wb_server.h
index 09afffb0c9..d64ca93a33 100644
--- a/source4/winbind/wb_server.h
+++ b/source4/winbind/wb_server.h
@@ -157,3 +157,5 @@ struct wbsrv_call {
/* storage for protocol specific data */
void *private_data;
};
+
+#include "winbind/wb_proto.h"
diff --git a/source4/wrepl_server/config.mk b/source4/wrepl_server/config.mk
index 6dd0e2a305..feb3e87827 100644
--- a/source4/wrepl_server/config.mk
+++ b/source4/wrepl_server/config.mk
@@ -13,6 +13,7 @@ OBJ_FILES = \
wrepl_out_pull.o \
wrepl_out_push.o \
wrepl_out_helpers.o
+PRIVATE_PROTO_HEADER = wrepl_server_proto.h
REQUIRED_SUBSYSTEMS = \
LIBCLI_WREPL WINSDB
# End SUBSYSTEM WREPL_SRV
diff --git a/source4/wrepl_server/wrepl_apply_records.c b/source4/wrepl_server/wrepl_apply_records.c
index 978415104f..9c65446942 100644
--- a/source4/wrepl_server/wrepl_apply_records.c
+++ b/source4/wrepl_server/wrepl_apply_records.c
@@ -36,6 +36,7 @@
#include "libcli/composite/composite.h"
#include "libcli/wrepl/winsrepl.h"
#include "system/time.h"
+#include "libcli/nbt/libnbt.h"
enum _R_ACTION {
R_INVALID,
diff --git a/source4/wrepl_server/wrepl_scavenging.c b/source4/wrepl_server/wrepl_scavenging.c
index a19604d416..c0bbb41dae 100644
--- a/source4/wrepl_server/wrepl_scavenging.c
+++ b/source4/wrepl_server/wrepl_scavenging.c
@@ -36,6 +36,7 @@
#include "libcli/wrepl/winsrepl.h"
#include "wrepl_server/wrepl_out_helpers.h"
#include "system/time.h"
+#include "libcli/nbt/libnbt.h"
static NTSTATUS wreplsrv_scavenging_owned_records(struct wreplsrv_service *service, TALLOC_CTX *tmp_mem)
{
diff --git a/source4/wrepl_server/wrepl_server.c b/source4/wrepl_server/wrepl_server.c
index 47b3da480b..aead6a1997 100644
--- a/source4/wrepl_server/wrepl_server.c
+++ b/source4/wrepl_server/wrepl_server.c
@@ -32,6 +32,7 @@
#include "nbt_server/wins/winsdb.h"
#include "ldb/include/ldb.h"
#include "ldb/include/ldb_errors.h"
+#include "auth/auth.h"
static struct ldb_context *wins_config_db_connect(TALLOC_CTX *mem_ctx)
{
diff --git a/source4/wrepl_server/wrepl_server.h b/source4/wrepl_server/wrepl_server.h
index 125e04b84c..fabba09389 100644
--- a/source4/wrepl_server/wrepl_server.h
+++ b/source4/wrepl_server/wrepl_server.h
@@ -302,3 +302,5 @@ struct wreplsrv_service {
BOOL processing;
} scavenging;
};
+
+#include "wrepl_server/wrepl_server_proto.h"