summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-12-28 15:38:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:55 -0500
commit2cd5ca7d25f12aa9198bf8c2deb6aea282f573ee (patch)
treeb543bae1f10adb60f8773ae444ab1f3973423239
parent451797744d8c2bd2c9521a2cdada3f6b8621e2dc (diff)
downloadsamba-2cd5ca7d25f12aa9198bf8c2deb6aea282f573ee.tar.gz
samba-2cd5ca7d25f12aa9198bf8c2deb6aea282f573ee.tar.xz
samba-2cd5ca7d25f12aa9198bf8c2deb6aea282f573ee.zip
r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd5130d980d07398f3291d294202aefe3c2)
-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 58f72aa8af4..9aa6d29c6ee 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 49813a437de..15abeab0910 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 b620cece967..b24aea836a3 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 4efa81fb04a..db36b01334e 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 c8a95e2b516..8402676acd4 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 fcaa760ed4c..7ea15e7988d 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 9078d72647c..54b082bda0c 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 4ff09d2066f..ae85bf8f5e8 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 edc7b8445bb..43391b3a699 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 4435258c2c5..f5703d5b93c 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 95d0250268c..e58907d69f9 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 2dfd1f940a2..dc3ea7df746 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 bcdc92d9c05..b691a45f213 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 a29e611566c..b5479e89be5 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 a959cc9bb4d..cc4465b17db 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 c5eba8ae84a..b6a2f9ce33a 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 55dfef04aa2..ba29a8e96ed 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 9275bc1ebd0..e43c79b9264 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 a8aecc36102..b6d074f8b22 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 2187fcd8ba8..b78d9184177 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 367c211b90a..5a3d9c25e7d 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 4dd0eda4442..e6f0ae9dd7a 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 4350f3abe86..badd4ec541b 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 07d85f634ff..a32cc3b5e0f 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 b4bde76d3f6..a092f2c818d 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 6d2e4349cfb..84270195dc9 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 3bbc87d05f6..a14434622fd 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 6be92fa17d6..c440b25e36e 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 f76a396852e..c3ebebed412 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 243de79fce4..b9fcb200386 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 4f2dbc07871..b6e69ff8e69 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 0a787bbf578..1ce86f7f857 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 218b5e5921b..7c9e3e9651a 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 a0efe7042c9..2972da07a0c 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 decee83eb71..b09361b5ffd 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 e168da9d1d5..ae17447784e 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 13503b66b37..f1925ca0d86 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 bbed931eedf..dcbccc0c706 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 8e52759e70c..e61e2edcf59 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 a5b7ce2f38e..dc4715ffe4a 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 ceafacf9d40..eb7c10ed9d3 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 785b0d076bd..4191c43ca6e 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 e679bef6e63..2fea11bd63a 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 cf0c64a0142..3c695edd39b 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 be224395901..3044b5a95fa 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 11e1dfc1757..af15d817975 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 658c1254dd4..c97d9013c9c 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 5a43fbe0b10..421a5866d3d 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 3d8bdf9f36d..86962bd563b 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 564e6f61e6b..7206d2f651d 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 9e585f96122..e9c479a9cd9 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 058bef1ddfc..b1209335179 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 c66384a3cfc..bffa994abe4 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 03a408de79d..7ab90fbbf71 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 98eca425e3d..ed4e4f79a8f 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 059aad8c665..4b620258755 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 a037f9cc497..55e2522f25c 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 14124e12fe9..d425f57ca41 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 0f07f26cbbd..86cf2eeac61 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 ebd6eb4f468..60aa6299a63 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 f3ee938d847..1f19ba171d2 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 3a643d71458..415d09a7295 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 53c51cf8050..a2a4685d8c7 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 dd2bf74543a..3028053f5e8 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 9673b89d2c3..13f71e269e0 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 f3fccc77fcd..f6ec5d30808 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 e831b70060f..783cdb58b13 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 6caef7424d8..d33b123f222 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 a762b448787..68bac0f2ce9 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 1d391f588fd..61e560299cb 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 64da9f488f1..2171ac48b0b 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 e482a229b72..335cd3d9e73 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 de08695502b..b7d770af84a 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 0b4709fa972..3831be10afd 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 b412674c00f..2f0da230728 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 7d5398671df..1ade18d6943 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 b461056397a..7f441a2816b 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 ef7fa40b201..885f54a48e6 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 4a680200fd9..686f6f783cd 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 913c7f2eab5..1c544bfe826 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 bffc19fc722..e4b9a227d48 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 d0df15e022f..3280706eca5 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 7174084f13d..d6bc88248f6 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 159c2ae4aee..e4e2b714055 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 af6020da17a..a216ebc05a2 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 7f8600d2dd2..de1dfad6fff 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 b987bd5c218..1334763c125 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 6ec5d9a7b7b..6a450e8b78b 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 1cb00b67331..540f7092116 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 52fc100b235..66609b8e80f 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 fd6a3d972d3..44dbe97e004 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 733800da193..6d55501cd38 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 2768002893f..7cce8aa61b2 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 5cdc839194d..eb63bdee46f 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 921fdb4dbf8..6f115adc9e8 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 95d88f2b070..4b67ce5cac5 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 f4737920fa0..921e7f574f6 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 9652b7597f8..d7d0527bbcc 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 c18a607f113..6d2dcbc03f0 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 855ecaf0776..9ff9496cd47 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 28ac07f6076..4ac5fa390cf 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 aa66d510d4b..d659af329dc 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 a86a9257784..a6ec030c1d6 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 382906f349b..e9f7e6ef520 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 6f3aa1086bd..8d9c78c1a92 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 e3ed9a057b3..1a91f7bee5c 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 09afffb0c9a..d64ca93a33f 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 6dd0e2a3056..feb3e878278 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 978415104f4..9c65446942d 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 a19604d4165..c0bbb41dae7 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 47b3da480b7..aead6a19979 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 125e04b84c0..fabba093896 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"