summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-05-05 01:39:16 +0200
committerGünther Deschner <gd@samba.org>2010-05-06 00:22:59 +0200
commitc6ebab846d25563d051b1a1248ea288ba7eb0bcb (patch)
treebe093beb5dec7460403520dac6cef6205cfc1bb9 /source3
parentd6a6362752b7a46178e80d36e4c3d69658d4f273 (diff)
downloadsamba-c6ebab846d25563d051b1a1248ea288ba7eb0bcb.tar.gz
s3: only include gen_ndr headers where needed.
This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_domain.c1
-rw-r--r--source3/auth/auth_netlogond.c1
-rw-r--r--source3/include/includes.h5
-rw-r--r--source3/include/ntlmssp.h2
-rw-r--r--source3/include/proto.h18
-rw-r--r--source3/include/smb.h23
-rw-r--r--source3/lib/debug.c1
-rw-r--r--source3/lib/dmallocmsg.c1
-rw-r--r--source3/lib/g_lock.c1
-rw-r--r--source3/lib/netapi/getdc.c1
-rw-r--r--source3/lib/netapi/serverinfo.c1
-rw-r--r--source3/lib/tallocmsg.c1
-rw-r--r--source3/libads/ndr.c1
-rw-r--r--source3/libnet/libnet_dssync.h3
-rw-r--r--source3/libnet/libnet_join.c1
-rw-r--r--source3/libsmb/clidgram.c1
-rw-r--r--source3/libsmb/dsgetdcname.c1
-rw-r--r--source3/libsmb/libsmb_server.c2
-rw-r--r--source3/libsmb/libsmb_xattr.c1
-rw-r--r--source3/locking/brlock.c1
-rw-r--r--source3/locking/locking.c1
-rw-r--r--source3/nmbd/nmbd.c1
-rw-r--r--source3/printing/notify.c1
-rw-r--r--source3/printing/nt_printing.c1
-rw-r--r--source3/printing/printing.c1
-rw-r--r--source3/registry/reg_perfcount.c1
-rw-r--r--source3/rpc_client/cli_pipe.c16
-rw-r--r--source3/rpc_server/srv_lsa_hnd.c1
-rw-r--r--source3/rpc_server/srv_netlog_nt.c1
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c1
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c1
-rw-r--r--source3/rpcclient/cmd_epmapper.c1
-rw-r--r--source3/rpcclient/rpcclient.c1
-rw-r--r--source3/smbd/blocking.c1
-rw-r--r--source3/smbd/change_trust_pw.c1
-rw-r--r--source3/smbd/close.c1
-rw-r--r--source3/smbd/notify.c1
-rw-r--r--source3/smbd/notify_inotify.c1
-rw-r--r--source3/smbd/notify_internal.c1
-rw-r--r--source3/smbd/open.c1
-rw-r--r--source3/smbd/oplock.c1
-rw-r--r--source3/smbd/process.c1
-rw-r--r--source3/smbd/server.c1
-rw-r--r--source3/smbd/sesssetup.c1
-rw-r--r--source3/smbd/smb2_lock.c1
-rw-r--r--source3/smbd/statcache.c1
-rw-r--r--source3/smbd/trans2.c1
-rw-r--r--source3/torture/msgtest.c1
-rw-r--r--source3/utils/net_dom.c1
-rw-r--r--source3/utils/net_lookup.c1
-rw-r--r--source3/utils/net_rpc_join.c1
-rw-r--r--source3/utils/net_rpc_samsync.c2
-rw-r--r--source3/utils/netlookup.c1
-rw-r--r--source3/utils/smbcacls.c1
-rw-r--r--source3/utils/smbcontrol.c1
-rw-r--r--source3/utils/smbcquotas.c1
-rw-r--r--source3/winbindd/winbindd.c1
-rw-r--r--source3/winbindd/winbindd_cm.c1
-rw-r--r--source3/winbindd/winbindd_dual.c1
-rw-r--r--source3/winbindd/winbindd_ndr.c1
-rw-r--r--source3/winbindd/winbindd_pam.c1
61 files changed, 75 insertions, 49 deletions
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index 3a9da2cc686..82e8182ca31 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "../libcli/auth/libcli_auth.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source3/auth/auth_netlogond.c b/source3/auth/auth_netlogond.c
index 5e05f1b15b1..08dc4dc57e6 100644
--- a/source3/auth/auth_netlogond.c
+++ b/source3/auth/auth_netlogond.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "../libcli/auth/libcli_auth.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 6b54001bb3e..5b682bb4e31 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -648,7 +648,6 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
#include "privileges.h"
#include "rpc_misc.h"
#include "rpc_dce.h"
-#include "../librpc/gen_ndr/schannel.h"
#include "mapping.h"
#include "passdb.h"
#include "rpc_secdes.h"
@@ -666,10 +665,6 @@ struct ntlmssp_state;
#include "ntdomain.h"
#include "reg_objects.h"
#include "reg_db.h"
-#include "librpc/gen_ndr/perfcount.h"
-#include "librpc/gen_ndr/notify.h"
-#include "librpc/gen_ndr/xattr.h"
-#include "librpc/gen_ndr/messaging.h"
#include "librpc/gen_ndr/ndr_nbt.h"
#include "librpc/rpc/dcerpc.h"
#include "nt_printing.h"
diff --git a/source3/include/ntlmssp.h b/source3/include/ntlmssp.h
index 3dc38109980..384eb22b200 100644
--- a/source3/include/ntlmssp.h
+++ b/source3/include/ntlmssp.h
@@ -19,6 +19,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "../librpc/gen_ndr/ntlmssp.h"
+
/* NTLMSSP mode */
enum ntlmssp_role
{
diff --git a/source3/include/proto.h b/source3/include/proto.h
index eae3d283d92..9c169ed11c3 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2107,27 +2107,9 @@ WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx,
uint32_t flags);
-#include "librpc/gen_ndr/ndr_dfs.h"
-#include "librpc/gen_ndr/ndr_dssetup.h"
-#include "librpc/gen_ndr/ndr_echo.h"
#include "librpc/gen_ndr/ndr_eventlog.h"
#include "librpc/gen_ndr/ndr_krb5pac.h"
-#include "librpc/gen_ndr/ndr_lsa.h"
-#include "librpc/gen_ndr/ndr_misc.h"
-#include "librpc/gen_ndr/ndr_netlogon.h"
-#include "librpc/gen_ndr/ndr_notify.h"
-#include "librpc/gen_ndr/ndr_ntsvcs.h"
-#include "librpc/gen_ndr/ndr_samr.h"
-#include "librpc/gen_ndr/ndr_security.h"
-#include "librpc/gen_ndr/ndr_srvsvc.h"
-#include "librpc/gen_ndr/ndr_svcctl.h"
-#include "librpc/gen_ndr/ndr_winreg.h"
-#include "librpc/gen_ndr/ndr_wkssvc.h"
-#include "librpc/gen_ndr/ndr_drsuapi.h"
#include "librpc/gen_ndr/ndr_spoolss.h"
-#include "librpc/gen_ndr/ndr_initshutdown.h"
-
-#include "librpc/ndr/libndr.h"
/* The following definitions come from librpc/ndr/util.c */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 780d79acb39..f8ec5d4983a 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -228,32 +228,9 @@ struct id_map {
enum id_mapping status;
};
-#include "librpc/gen_ndr/misc.h"
-#include "librpc/gen_ndr/security.h"
-#include "librpc/ndr/libndr.h"
-#include "librpc/gen_ndr/lsa.h"
-#include "librpc/gen_ndr/dfs.h"
-#include "librpc/gen_ndr/winreg.h"
-#include "librpc/gen_ndr/initshutdown.h"
-#include "librpc/gen_ndr/eventlog.h"
-#include "librpc/gen_ndr/srvsvc.h"
-#include "librpc/gen_ndr/wkssvc.h"
-#include "librpc/gen_ndr/echo.h"
-#include "librpc/gen_ndr/svcctl.h"
-#include "librpc/gen_ndr/netlogon.h"
-#include "librpc/gen_ndr/samr.h"
-#include "librpc/gen_ndr/dssetup.h"
#include "librpc/gen_ndr/epmapper.h"
-#include "librpc/gen_ndr/libnet_join.h"
#include "librpc/gen_ndr/krb5pac.h"
-#include "librpc/gen_ndr/ntsvcs.h"
-#include "librpc/gen_ndr/nbt.h"
-#include "librpc/gen_ndr/drsuapi.h"
-#include "librpc/gen_ndr/drsblobs.h"
-#include "librpc/gen_ndr/spoolss.h"
#include "librpc/gen_ndr/dcerpc.h"
-#include "librpc/gen_ndr/ndr_dcerpc.h"
-#include "librpc/gen_ndr/ntlmssp.h"
struct lsa_dom_info {
bool valid;
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 83211dd5e6e..3edf9608ca1 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
/* -------------------------------------------------------------------------- **
* Defines...
diff --git a/source3/lib/dmallocmsg.c b/source3/lib/dmallocmsg.c
index 935fc1de1ae..59f7c3bd7e3 100644
--- a/source3/lib/dmallocmsg.c
+++ b/source3/lib/dmallocmsg.c
@@ -17,6 +17,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
/**
* @file dmallocmsg.c
diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c
index 17260478865..d7828e228f3 100644
--- a/source3/lib/g_lock.c
+++ b/source3/lib/g_lock.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "g_lock.h"
+#include "librpc/gen_ndr/messaging.h"
static NTSTATUS g_lock_force_unlock(struct g_lock_ctx *ctx, const char *name,
struct server_id pid);
diff --git a/source3/lib/netapi/getdc.c b/source3/lib/netapi/getdc.c
index 9af01cecfdd..ee176722156 100644
--- a/source3/lib/netapi/getdc.c
+++ b/source3/lib/netapi/getdc.c
@@ -23,7 +23,6 @@
#include "lib/netapi/netapi.h"
#include "lib/netapi/netapi_private.h"
#include "lib/netapi/libnetapi.h"
-#include "libnet/libnet.h"
#include "../librpc/gen_ndr/cli_netlogon.h"
/********************************************************************
diff --git a/source3/lib/netapi/serverinfo.c b/source3/lib/netapi/serverinfo.c
index f537802d787..51932a5a920 100644
--- a/source3/lib/netapi/serverinfo.c
+++ b/source3/lib/netapi/serverinfo.c
@@ -23,7 +23,6 @@
#include "lib/netapi/netapi.h"
#include "lib/netapi/netapi_private.h"
#include "lib/netapi/libnetapi.h"
-#include "libnet/libnet.h"
#include "../librpc/gen_ndr/cli_srvsvc.h"
/****************************************************************
diff --git a/source3/lib/tallocmsg.c b/source3/lib/tallocmsg.c
index 3cfd118d21c..6cea7574570 100644
--- a/source3/lib/tallocmsg.c
+++ b/source3/lib/tallocmsg.c
@@ -17,6 +17,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
/**
* @file tallocmsg.c
diff --git a/source3/libads/ndr.c b/source3/libads/ndr.c
index 6ada66ca40d..9ee249fc8ee 100644
--- a/source3/libads/ndr.c
+++ b/source3/libads/ndr.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
void ndr_print_ads_auth_flags(struct ndr_print *ndr, const char *name, uint32_t r)
{
diff --git a/source3/libnet/libnet_dssync.h b/source3/libnet/libnet_dssync.h
index a5a00742c58..e05aaa374b9 100644
--- a/source3/libnet/libnet_dssync.h
+++ b/source3/libnet/libnet_dssync.h
@@ -18,6 +18,9 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
+#include "../librpc/gen_ndr/drsuapi.h"
+#include "../librpc/gen_ndr/drsblobs.h"
+
struct dssync_context;
struct dssync_ops {
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 736a9191900..5271c910dda 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -23,6 +23,7 @@
#include "libcli/auth/libcli_auth.h"
#include "../librpc/gen_ndr/cli_samr.h"
#include "../librpc/gen_ndr/cli_lsa.h"
+#include "../librpc/gen_ndr/cli_netlogon.h"
/****************************************************************
****************************************************************/
diff --git a/source3/libsmb/clidgram.c b/source3/libsmb/clidgram.c
index bce57cec3a7..c8185f67baf 100644
--- a/source3/libsmb/clidgram.c
+++ b/source3/libsmb/clidgram.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
/*
* cli_send_mailslot, send a mailslot for client code ...
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index 8c50a0aa395..6cf7c9430de 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "libads/sitename_cache.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
#define DSGETDCNAME_FMT "DSGETDCNAME/DOMAIN/%s"
/* 15 minutes */
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index eb292da2ce6..9784253cc2a 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -26,7 +26,7 @@
#include "includes.h"
#include "libsmbclient.h"
#include "libsmb_internal.h"
-
+#include "../librpc/gen_ndr/ndr_lsa.h"
/*
* Check a server for being alive and well.
diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index cbdca4e748c..6a01aec9c53 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -25,6 +25,7 @@
#include "includes.h"
#include "libsmbclient.h"
#include "libsmb_internal.h"
+#include "../librpc/gen_ndr/ndr_lsa.h"
/*
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index c7503ca43ca..ee0eaf5198b 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -25,6 +25,7 @@
used. This allows us to provide the same semantics as NT */
#include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_LOCKING
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 3975a78673c..63bcff17acb 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -36,6 +36,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_LOCKING
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 5dc021a5473..fa106a9499c 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
int ClientNMB = -1;
int ClientDGRAM = -1;
diff --git a/source3/printing/notify.c b/source3/printing/notify.c
index 8d6bdc0b3e6..33807f72ef8 100644
--- a/source3/printing/notify.c
+++ b/source3/printing/notify.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "printing.h"
+#include "librpc/gen_ndr/messaging.h"
static TALLOC_CTX *send_ctx;
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index da081304476..d59e3c5ffd4 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
static TDB_CONTEXT *tdb_forms; /* used for forms files */
static TDB_CONTEXT *tdb_drivers; /* used for driver files */
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index e67c5d41a35..b0f22c9b6f5 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "printing.h"
+#include "librpc/gen_ndr/messaging.h"
extern struct current_user current_user;
extern userdom_struct current_user_info;
diff --git a/source3/registry/reg_perfcount.c b/source3/registry/reg_perfcount.c
index ff9e5db46c5..57d92ff1327 100644
--- a/source3/registry/reg_perfcount.c
+++ b/source3/registry/reg_perfcount.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "../librpc/gen_ndr/perfcount.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_REGISTRY
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 8d33d7713f4..e7c4ec197f7 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -20,6 +20,22 @@
#include "includes.h"
#include "librpc/gen_ndr/cli_epmapper.h"
#include "../librpc/gen_ndr/ndr_schannel.h"
+#include "../librpc/gen_ndr/ndr_lsa.h"
+#include "../librpc/gen_ndr/ndr_dssetup.h"
+#include "../librpc/gen_ndr/ndr_samr.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
+#include "../librpc/gen_ndr/ndr_srvsvc.h"
+#include "../librpc/gen_ndr/ndr_wkssvc.h"
+#include "../librpc/gen_ndr/ndr_winreg.h"
+#include "../librpc/gen_ndr/ndr_spoolss.h"
+#include "../librpc/gen_ndr/ndr_dfs.h"
+#include "../librpc/gen_ndr/ndr_echo.h"
+#include "../librpc/gen_ndr/ndr_initshutdown.h"
+#include "../librpc/gen_ndr/ndr_svcctl.h"
+#include "../librpc/gen_ndr/ndr_eventlog.h"
+#include "../librpc/gen_ndr/ndr_ntsvcs.h"
+#include "../librpc/gen_ndr/ndr_epmapper.h"
+#include "../librpc/gen_ndr/ndr_drsuapi.h"
#include "../libcli/auth/schannel.h"
#include "../libcli/auth/spnego.h"
#include "smb_krb5.h"
diff --git a/source3/rpc_server/srv_lsa_hnd.c b/source3/rpc_server/srv_lsa_hnd.c
index 4348fb8d4a7..f1ab7748590 100644
--- a/source3/rpc_server/srv_lsa_hnd.c
+++ b/source3/rpc_server/srv_lsa_hnd.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "../librpc/gen_ndr/ndr_lsa.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index 866d1715667..fc1bdf0b2d3 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -27,6 +27,7 @@
#include "includes.h"
#include "../libcli/auth/schannel.h"
#include "../librpc/gen_ndr/srv_netlogon.h"
+#include "librpc/gen_ndr/messaging.h"
extern userdom_struct current_user_info;
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index f96a147a27d..954212a8fc8 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -29,6 +29,7 @@
#include "includes.h"
#include "../librpc/gen_ndr/srv_spoolss.h"
#include "../librpc/gen_ndr/cli_spoolss.h"
+#include "librpc/gen_ndr/messaging.h"
/* macros stolen from s4 spoolss server */
#define SPOOLSS_BUFFER_UNION(fn,ic,info,level) \
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 0681ca30f72..6d86074a54b 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -25,6 +25,7 @@
#include "includes.h"
#include "../librpc/gen_ndr/srv_srvsvc.h"
+#include "librpc/gen_ndr/messaging.h"
extern const struct generic_mapping file_generic_mapping;
diff --git a/source3/rpcclient/cmd_epmapper.c b/source3/rpcclient/cmd_epmapper.c
index 6159b4a0d14..3ee01208383 100644
--- a/source3/rpcclient/cmd_epmapper.c
+++ b/source3/rpcclient/cmd_epmapper.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "rpcclient.h"
#include "../librpc/gen_ndr/cli_epmapper.h"
+#include "../librpc/gen_ndr/ndr_lsa.h"
static NTSTATUS cmd_epmapper_map(struct rpc_pipe_client *p,
TALLOC_CTX *mem_ctx,
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index e24538b8044..d83fd17ae3b 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -23,6 +23,7 @@
#include "rpcclient.h"
#include "../libcli/auth/libcli_auth.h"
#include "../librpc/gen_ndr/cli_lsa.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
DOM_SID domain_sid;
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c
index 9b20adfb893..b50c4f48f2f 100644
--- a/source3/smbd/blocking.c
+++ b/source3/smbd/blocking.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "smbd/globals.h"
+#include "librpc/gen_ndr/messaging.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_LOCKING
diff --git a/source3/smbd/change_trust_pw.c b/source3/smbd/change_trust_pw.c
index ec3046e0d2c..d02de7ae644 100644
--- a/source3/smbd/change_trust_pw.c
+++ b/source3/smbd/change_trust_pw.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
/************************************************************************
Change the trust account password for a domain.
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index bf181f3bd06..098edacb6d5 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
/****************************************************************************
Run a file if it is a magic script.
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index 554591fc98c..5df389fc20e 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "smbd/globals.h"
+#include "../librpc/gen_ndr/notify.h"
struct notify_change_request {
struct notify_change_request *prev, *next;
diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c
index b1d424d7f13..fe6436d28c0 100644
--- a/source3/smbd/notify_inotify.c
+++ b/source3/smbd/notify_inotify.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "../librpc/gen_ndr/notify.h"
#ifdef HAVE_INOTIFY
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c
index 22801e9d923..020cb58a5c5 100644
--- a/source3/smbd/notify_internal.c
+++ b/source3/smbd/notify_internal.c
@@ -25,6 +25,7 @@
#include "includes.h"
#include "librpc/gen_ndr/ndr_notify.h"
+#include "librpc/gen_ndr/messaging.h"
struct notify_context {
struct db_context *db_recursive;
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 19bd0c2d97e..62651b08adc 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "smbd/globals.h"
+#include "librpc/gen_ndr/messaging.h"
extern const struct generic_mapping file_generic_mapping;
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index c22a5891046..d00bcba32a2 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -22,6 +22,7 @@
#define DBGC_CLASS DBGC_LOCKING
#include "includes.h"
#include "smbd/globals.h"
+#include "librpc/gen_ndr/messaging.h"
/****************************************************************************
Get the number of current exclusive oplocks.
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 53c5e0b4089..128a612a862 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -34,6 +34,7 @@
#include "../librpc/gen_ndr/srv_svcctl.h"
#include "../librpc/gen_ndr/srv_winreg.h"
#include "../librpc/gen_ndr/srv_wkssvc.h"
+#include "librpc/gen_ndr/messaging.h"
extern bool global_machine_password_needs_changing;
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 49e2eda3cec..5d4aca1bc5d 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -23,6 +23,7 @@
#include "includes.h"
#include "smbd/globals.h"
+#include "librpc/gen_ndr/messaging.h"
static_decl_rpc;
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 8c0317ae9eb..a00a362537c 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -26,6 +26,7 @@
#include "smbd/globals.h"
#include "../libcli/auth/spnego.h"
#include "ntlmssp.h"
+#include "librpc/gen_ndr/messaging.h"
/* For split krb5 SPNEGO blobs. */
struct pending_auth_data {
diff --git a/source3/smbd/smb2_lock.c b/source3/smbd/smb2_lock.c
index cc53458a93c..9e699159ff0 100644
--- a/source3/smbd/smb2_lock.c
+++ b/source3/smbd/smb2_lock.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "smbd/globals.h"
#include "../libcli/smb/smb_common.h"
+#include "librpc/gen_ndr/messaging.h"
struct smbd_smb2_lock_element {
uint64_t offset;
diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c
index db347b5b7e8..88cb97e6a6d 100644
--- a/source3/smbd/statcache.c
+++ b/source3/smbd/statcache.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
/****************************************************************************
Stat cache code used in unix_convert.
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 811a647ab34..9c2e3296e58 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -27,6 +27,7 @@
#include "version.h"
#include "smbd/globals.h"
#include "../libcli/auth/libcli_auth.h"
+#include "../librpc/gen_ndr/xattr.h"
#define DIR_ENTRY_SAFETY_MARGIN 4096
diff --git a/source3/torture/msgtest.c b/source3/torture/msgtest.c
index 0c4c96bd761..dffc98775d3 100644
--- a/source3/torture/msgtest.c
+++ b/source3/torture/msgtest.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
static int pong_count;
diff --git a/source3/utils/net_dom.c b/source3/utils/net_dom.c
index c05a42465a1..89cc228f477 100644
--- a/source3/utils/net_dom.c
+++ b/source3/utils/net_dom.c
@@ -20,6 +20,7 @@
#include "includes.h"
#include "utils/net.h"
#include "../librpc/gen_ndr/cli_initshutdown.h"
+#include "../librpc/gen_ndr/ndr_winreg.h"
int net_dom_usage(struct net_context *c, int argc, const char **argv)
{
diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c
index 102f1b263f2..25c781f2c4d 100644
--- a/source3/utils/net_lookup.c
+++ b/source3/utils/net_lookup.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "utils/net.h"
#include "libads/sitename_cache.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
int net_lookup_usage(struct net_context *c, int argc, const char **argv)
{
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index bb7d74b1991..71fcc0945c4 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -23,6 +23,7 @@
#include "../libcli/auth/libcli_auth.h"
#include "../librpc/gen_ndr/cli_lsa.h"
#include "../librpc/gen_ndr/cli_samr.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
/* Macro for checking RPC error codes to make things more readable */
diff --git a/source3/utils/net_rpc_samsync.c b/source3/utils/net_rpc_samsync.c
index 739818ddb5a..85bdc75cfbc 100644
--- a/source3/utils/net_rpc_samsync.c
+++ b/source3/utils/net_rpc_samsync.c
@@ -25,6 +25,8 @@
#include "includes.h"
#include "utils/net.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
+#include "../librpc/gen_ndr/ndr_drsuapi.h"
static void parse_samsync_partial_replication_objects(TALLOC_CTX *mem_ctx,
int argc,
diff --git a/source3/utils/netlookup.c b/source3/utils/netlookup.c
index af219eb93c1..3fa219998b5 100644
--- a/source3/utils/netlookup.c
+++ b/source3/utils/netlookup.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "utils/net.h"
+#include "../librpc/gen_ndr/ndr_lsa.h"
/********************************************************
Connection cachine struct. Goes away when ctx destroyed.
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 8dd2a36da47..7db1f17b228 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "../librpc/gen_ndr/ndr_lsa.h"
extern bool AllowDebugChange;
diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index e97d5541799..9ddabc87574 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -24,6 +24,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/messaging.h"
#if HAVE_LIBUNWIND_H
#include <libunwind.h>
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index ef67ad77b42..49a10e51372 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "../librpc/gen_ndr/ndr_lsa.h"
static char *server;
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 4d00269970e..f651e6079b8 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -25,6 +25,7 @@
#include "includes.h"
#include "winbindd.h"
#include "../../nsswitch/libwbclient/wbc_async.h"
+#include "librpc/gen_ndr/messaging.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 8a1456f4078..9715363f703 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -66,6 +66,7 @@
#include "../librpc/gen_ndr/cli_lsa.h"
#include "../librpc/gen_ndr/cli_dssetup.h"
#include "libads/sitename_cache.h"
+#include "librpc/gen_ndr/messaging.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index 4f314cf59f5..c622b3ccc25 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -30,6 +30,7 @@
#include "includes.h"
#include "winbindd.h"
#include "../../nsswitch/libwbclient/wbc_async.h"
+#include "librpc/gen_ndr/messaging.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
diff --git a/source3/winbindd/winbindd_ndr.c b/source3/winbindd/winbindd_ndr.c
index 80a071103ac..9ab44f0cad9 100644
--- a/source3/winbindd/winbindd_ndr.c
+++ b/source3/winbindd/winbindd_ndr.c
@@ -19,6 +19,7 @@
#include "includes.h"
#include "winbindd.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c
index b062fd1d77c..a0254331213 100644
--- a/source3/winbindd/winbindd_pam.c
+++ b/source3/winbindd/winbindd_pam.c
@@ -26,6 +26,7 @@
#include "winbindd.h"
#include "../libcli/auth/libcli_auth.h"
#include "../librpc/gen_ndr/cli_samr.h"
+#include "../librpc/gen_ndr/ndr_netlogon.h"
#include "smb_krb5.h"
#undef DBGC_CLASS