From 3d679a3b5fc208d8521217f6a4b4d9037b609b9b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 26 Nov 2009 18:21:28 +0100 Subject: s3-rpc: Avoid including every pipe's client and server stubs everywhere in samba. Guenther --- source3/client/client.c | 3 ++- source3/include/includes.h | 1 - source3/include/ntdomain.h | 2 ++ source3/include/proto.h | 18 +++---------- source3/include/rpc_client.h | 44 -------------------------------- source3/lib/netapi/file.c | 1 + source3/lib/netapi/getdc.c | 1 + source3/lib/netapi/group.c | 1 + source3/lib/netapi/joindomain.c | 1 + source3/lib/netapi/localgroup.c | 2 ++ source3/lib/netapi/netlogon.c | 1 + source3/lib/netapi/samr.c | 1 + source3/lib/netapi/serverinfo.c | 1 + source3/lib/netapi/share.c | 1 + source3/lib/netapi/shutdown.c | 1 + source3/lib/netapi/user.c | 1 + source3/libads/ldap_printer.c | 1 + source3/libnet/libnet_dssync.c | 1 + source3/libnet/libnet_join.c | 2 ++ source3/libnet/libnet_samsync.c | 1 + source3/libsmb/libsmb_dir.c | 2 +- source3/libsmb/trusts_util.c | 1 + source3/rpc_client/cli_lsarpc.c | 1 + source3/rpc_client/cli_netlogon.c | 1 + source3/rpc_client/cli_samr.c | 1 + source3/rpc_client/cli_spoolss.c | 2 +- source3/rpc_server/srv_dfs_nt.c | 1 + source3/rpc_server/srv_dssetup_nt.c | 1 + source3/rpc_server/srv_echo_nt.c | 1 + source3/rpc_server/srv_eventlog_nt.c | 1 + source3/rpc_server/srv_initshutdown_nt.c | 2 ++ source3/rpc_server/srv_lsa_nt.c | 1 + source3/rpc_server/srv_netlog_nt.c | 1 + source3/rpc_server/srv_ntsvcs_nt.c | 1 + source3/rpc_server/srv_samr_nt.c | 1 + source3/rpc_server/srv_spoolss_nt.c | 2 ++ source3/rpc_server/srv_srvsvc_nt.c | 1 + source3/rpc_server/srv_svcctl_nt.c | 1 + source3/rpc_server/srv_winreg_nt.c | 1 + source3/rpc_server/srv_wkssvc_nt.c | 1 + source3/rpcclient/cmd_dfs.c | 1 + source3/rpcclient/cmd_drsuapi.c | 1 + source3/rpcclient/cmd_dssetup.c | 1 + source3/rpcclient/cmd_echo.c | 1 + source3/rpcclient/cmd_epmapper.c | 1 + source3/rpcclient/cmd_eventlog.c | 1 + source3/rpcclient/cmd_lsarpc.c | 1 + source3/rpcclient/cmd_netlogon.c | 1 + source3/rpcclient/cmd_ntsvcs.c | 1 + source3/rpcclient/cmd_samr.c | 1 + source3/rpcclient/cmd_spoolss.c | 1 + source3/rpcclient/cmd_srvsvc.c | 1 + source3/rpcclient/cmd_test.c | 1 + source3/rpcclient/cmd_wkssvc.c | 1 + source3/rpcclient/rpcclient.c | 1 + source3/smbd/lanman.c | 2 ++ source3/smbd/process.c | 15 +++++++++++ source3/utils/net_ads.c | 1 + source3/utils/net_dom.c | 1 + source3/utils/net_rpc.c | 7 +++++ source3/utils/net_rpc_audit.c | 1 + source3/utils/net_rpc_join.c | 2 ++ source3/utils/net_rpc_printer.c | 1 + source3/utils/net_rpc_registry.c | 1 + source3/utils/net_rpc_rights.c | 1 + source3/utils/net_rpc_service.c | 2 +- source3/utils/net_rpc_sh_acct.c | 1 + source3/utils/net_util.c | 2 ++ source3/utils/smbtree.c | 1 + source3/winbindd/winbindd_ads.c | 1 + source3/winbindd/winbindd_cm.c | 4 +++ source3/winbindd/winbindd_dual_srv.c | 1 + source3/winbindd/winbindd_misc.c | 1 + source3/winbindd/winbindd_pam.c | 2 ++ source3/winbindd/winbindd_rpc.c | 2 ++ 75 files changed, 109 insertions(+), 64 deletions(-) delete mode 100644 source3/include/rpc_client.h diff --git a/source3/client/client.c b/source3/client/client.c index 6773e6d90a..ca2f9a8842 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -23,7 +23,8 @@ #include "includes.h" #include "client/client_proto.h" -#include "include/rpc_client.h" +#include "../librpc/gen_ndr/cli_srvsvc.h" + #ifndef REGISTER #define REGISTER 0 #endif diff --git a/source3/include/includes.h b/source3/include/includes.h index cbf30d6158..438b346445 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -687,7 +687,6 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx); #include "mangle.h" #include "module.h" #include "nsswitch/winbind_client.h" -#include "rpc_client.h" #include "dbwrap.h" #include "packet.h" #include "ctdbd_conn.h" diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h index bbe653b8bd..3204e2e64b 100644 --- a/source3/include/ntdomain.h +++ b/source3/include/ntdomain.h @@ -28,6 +28,8 @@ * in the NTDOM branch - it didn't belong there. */ +#define prs_init_empty( _ps_, _ctx_, _io_ ) (void) prs_init((_ps_), 0, (_ctx_), (_io_)) + typedef struct _prs_struct { bool io; /* parsing in or out of data stream */ /* diff --git a/source3/include/proto.h b/source3/include/proto.h index 6b68f954e4..9e0f3a28df 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -2089,21 +2089,9 @@ WERROR reg_apply_registry_entry(TALLOC_CTX *mem_ctx, #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/srv_dfs.h" -#include "librpc/gen_ndr/srv_dssetup.h" -#include "librpc/gen_ndr/srv_echo.h" -#include "librpc/gen_ndr/srv_eventlog.h" -#include "librpc/gen_ndr/srv_initshutdown.h" -#include "librpc/gen_ndr/srv_lsa.h" -#include "librpc/gen_ndr/srv_netlogon.h" -#include "librpc/gen_ndr/srv_ntsvcs.h" -#include "librpc/gen_ndr/srv_samr.h" -#include "librpc/gen_ndr/srv_srvsvc.h" -#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/srv_spoolss.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" diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h deleted file mode 100644 index 84ac8b17d4..0000000000 --- a/source3/include/rpc_client.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - Unix SMB/CIFS implementation. - SMB parameters and setup - Copyright (C) Gerald (Jerry) Carter 2005. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#ifndef _RPC_CLIENT_H -#define _RPC_CLIENT_H - -/* autogenerated client stubs */ - -#include "librpc/gen_ndr/cli_echo.h" -#include "librpc/gen_ndr/cli_lsa.h" -#include "librpc/gen_ndr/cli_svcctl.h" -#include "librpc/gen_ndr/cli_wkssvc.h" -#include "librpc/gen_ndr/cli_eventlog.h" -#include "librpc/gen_ndr/cli_dfs.h" -#include "librpc/gen_ndr/cli_initshutdown.h" -#include "librpc/gen_ndr/cli_winreg.h" -#include "librpc/gen_ndr/cli_srvsvc.h" -#include "librpc/gen_ndr/cli_samr.h" -#include "librpc/gen_ndr/cli_netlogon.h" -#include "librpc/gen_ndr/cli_dssetup.h" -#include "librpc/gen_ndr/cli_ntsvcs.h" -#include "librpc/gen_ndr/cli_epmapper.h" -#include "librpc/gen_ndr/cli_drsuapi.h" -#include "librpc/gen_ndr/cli_spoolss.h" - -#define prs_init_empty( _ps_, _ctx_, _io_ ) (void) prs_init((_ps_), 0, (_ctx_), (_io_)) - -#endif /* _RPC_CLIENT_H */ diff --git a/source3/lib/netapi/file.c b/source3/lib/netapi/file.c index 0d1bc08ad3..1c3ef6d78f 100644 --- a/source3/lib/netapi/file.c +++ b/source3/lib/netapi/file.c @@ -23,6 +23,7 @@ #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" #include "lib/netapi/libnetapi.h" +#include "../librpc/gen_ndr/cli_srvsvc.h" /**************************************************************** ****************************************************************/ diff --git a/source3/lib/netapi/getdc.c b/source3/lib/netapi/getdc.c index d3f58f6684..9af01cecfd 100644 --- a/source3/lib/netapi/getdc.c +++ b/source3/lib/netapi/getdc.c @@ -24,6 +24,7 @@ #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/group.c b/source3/lib/netapi/group.c index 77ed2e8485..e707c0c633 100644 --- a/source3/lib/netapi/group.c +++ b/source3/lib/netapi/group.c @@ -23,6 +23,7 @@ #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" #include "lib/netapi/libnetapi.h" +#include "../librpc/gen_ndr/cli_samr.h" /**************************************************************** ****************************************************************/ diff --git a/source3/lib/netapi/joindomain.c b/source3/lib/netapi/joindomain.c index 9970a0655a..4936d772cd 100644 --- a/source3/lib/netapi/joindomain.c +++ b/source3/lib/netapi/joindomain.c @@ -25,6 +25,7 @@ #include "lib/netapi/libnetapi.h" #include "libnet/libnet.h" #include "libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_wkssvc.h" /**************************************************************** ****************************************************************/ diff --git a/source3/lib/netapi/localgroup.c b/source3/lib/netapi/localgroup.c index d389c1f4a2..b9c0b4c325 100644 --- a/source3/lib/netapi/localgroup.c +++ b/source3/lib/netapi/localgroup.c @@ -23,6 +23,8 @@ #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" #include "lib/netapi/libnetapi.h" +#include "../librpc/gen_ndr/cli_samr.h" +#include "../librpc/gen_ndr/cli_lsa.h" static NTSTATUS libnetapi_samr_lookup_and_open_alias(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *pipe_cli, diff --git a/source3/lib/netapi/netlogon.c b/source3/lib/netapi/netlogon.c index 082938cadc..54b97090cd 100644 --- a/source3/lib/netapi/netlogon.c +++ b/source3/lib/netapi/netlogon.c @@ -23,6 +23,7 @@ #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" #include "lib/netapi/libnetapi.h" +#include "../librpc/gen_ndr/cli_netlogon.h" static WERROR construct_data(enum netr_LogonControlCode function_code, const uint8_t *data_in, diff --git a/source3/lib/netapi/samr.c b/source3/lib/netapi/samr.c index dbcef38dc7..bef02c4469 100644 --- a/source3/lib/netapi/samr.c +++ b/source3/lib/netapi/samr.c @@ -20,6 +20,7 @@ #include "includes.h" #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" +#include "../librpc/gen_ndr/cli_samr.h" /**************************************************************** ****************************************************************/ diff --git a/source3/lib/netapi/serverinfo.c b/source3/lib/netapi/serverinfo.c index cc2ff52ab5..f537802d78 100644 --- a/source3/lib/netapi/serverinfo.c +++ b/source3/lib/netapi/serverinfo.c @@ -24,6 +24,7 @@ #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/netapi/share.c b/source3/lib/netapi/share.c index 84c275248d..65bcd9a3a2 100644 --- a/source3/lib/netapi/share.c +++ b/source3/lib/netapi/share.c @@ -23,6 +23,7 @@ #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" #include "lib/netapi/libnetapi.h" +#include "../librpc/gen_ndr/cli_srvsvc.h" /**************************************************************** ****************************************************************/ diff --git a/source3/lib/netapi/shutdown.c b/source3/lib/netapi/shutdown.c index f9eb93b125..4c274d6e8b 100644 --- a/source3/lib/netapi/shutdown.c +++ b/source3/lib/netapi/shutdown.c @@ -23,6 +23,7 @@ #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" #include "lib/netapi/libnetapi.h" +#include "../librpc/gen_ndr/cli_initshutdown.h" /**************************************************************** ****************************************************************/ diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index f95750fae7..1ad4a6f282 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -23,6 +23,7 @@ #include "lib/netapi/netapi.h" #include "lib/netapi/netapi_private.h" #include "lib/netapi/libnetapi.h" +#include "../librpc/gen_ndr/cli_samr.h" /**************************************************************** ****************************************************************/ diff --git a/source3/libads/ldap_printer.c b/source3/libads/ldap_printer.c index a5290292a5..b5a3e6ba43 100644 --- a/source3/libads/ldap_printer.c +++ b/source3/libads/ldap_printer.c @@ -18,6 +18,7 @@ */ #include "includes.h" +#include "../librpc/gen_ndr/cli_spoolss.h" #ifdef HAVE_ADS diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c index 0b61b162c0..5213be0587 100644 --- a/source3/libnet/libnet_dssync.c +++ b/source3/libnet/libnet_dssync.c @@ -23,6 +23,7 @@ #include "includes.h" #include "libnet/libnet.h" #include "../libcli/drsuapi/drsuapi.h" +#include "../librpc/gen_ndr/cli_drsuapi.h" /**************************************************************** ****************************************************************/ diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index aa5f54adaf..736a919190 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -21,6 +21,8 @@ #include "includes.h" #include "libnet/libnet.h" #include "libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_samr.h" +#include "../librpc/gen_ndr/cli_lsa.h" /**************************************************************** ****************************************************************/ diff --git a/source3/libnet/libnet_samsync.c b/source3/libnet/libnet_samsync.c index df7e875ab6..26ecdc52ea 100644 --- a/source3/libnet/libnet_samsync.c +++ b/source3/libnet/libnet_samsync.c @@ -26,6 +26,7 @@ #include "../lib/crypto/crypto.h" #include "../libcli/samsync/samsync.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_netlogon.h" /** * Fix up the delta, dealing with encryption issues so that the final diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c index 73bbf82861..6c0b1b4e28 100644 --- a/source3/libsmb/libsmb_dir.c +++ b/source3/libsmb/libsmb_dir.c @@ -25,7 +25,7 @@ #include "includes.h" #include "libsmbclient.h" #include "libsmb_internal.h" - +#include "../librpc/gen_ndr/cli_srvsvc.h" /* * Routine to open a directory diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c index e127c9a67b..8acdc0fa59 100644 --- a/source3/libsmb/trusts_util.c +++ b/source3/libsmb/trusts_util.c @@ -20,6 +20,7 @@ #include "includes.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_lsa.h" /********************************************************* Change the domain password on the PDC. diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index 74fd08276c..caa258398a 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -23,6 +23,7 @@ */ #include "includes.h" +#include "../librpc/gen_ndr/cli_lsa.h" /** @defgroup lsa LSA - Local Security Architecture * @ingroup rpc_client diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index 191a0b0126..03884479f9 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/rpc_client/cli_netlogon.c @@ -22,6 +22,7 @@ #include "includes.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_netlogon.h" /**************************************************************************** Wrapper function that uses the auth and auth2 calls to set up a NETLOGON diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index df22ecb284..21cc2f6268 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -23,6 +23,7 @@ #include "includes.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_samr.h" /* User change password */ diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index 6d6d5dfcfa..a4622d07cf 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -23,7 +23,7 @@ */ #include "includes.h" -#include "rpc_client.h" +#include "../librpc/gen_ndr/cli_spoolss.h" /********************************************************************** convencience wrapper around rpccli_spoolss_OpenPrinterEx diff --git a/source3/rpc_server/srv_dfs_nt.c b/source3/rpc_server/srv_dfs_nt.c index bef8d83103..dfa33c25a9 100644 --- a/source3/rpc_server/srv_dfs_nt.c +++ b/source3/rpc_server/srv_dfs_nt.c @@ -22,6 +22,7 @@ /* This is the implementation of the dfs pipe. */ #include "includes.h" +#include "../librpc/gen_ndr/srv_dfs.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_MSDFS diff --git a/source3/rpc_server/srv_dssetup_nt.c b/source3/rpc_server/srv_dssetup_nt.c index 2b18e6b2ae..148e182a4d 100644 --- a/source3/rpc_server/srv_dssetup_nt.c +++ b/source3/rpc_server/srv_dssetup_nt.c @@ -23,6 +23,7 @@ */ #include "includes.h" +#include "../librpc/gen_ndr/srv_dssetup.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpc_server/srv_echo_nt.c b/source3/rpc_server/srv_echo_nt.c index bf29766e60..248ca0bf2a 100644 --- a/source3/rpc_server/srv_echo_nt.c +++ b/source3/rpc_server/srv_echo_nt.c @@ -22,6 +22,7 @@ /* This is the interface to the rpcecho pipe. */ #include "includes.h" +#include "../librpc/gen_ndr/srv_echo.h" #ifdef DEVELOPER diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c index 8e3922d246..52ecc89112 100644 --- a/source3/rpc_server/srv_eventlog_nt.c +++ b/source3/rpc_server/srv_eventlog_nt.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#include "../librpc/gen_ndr/srv_eventlog.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpc_server/srv_initshutdown_nt.c b/source3/rpc_server/srv_initshutdown_nt.c index 8b3ef52293..0425f82865 100644 --- a/source3/rpc_server/srv_initshutdown_nt.c +++ b/source3/rpc_server/srv_initshutdown_nt.c @@ -22,6 +22,8 @@ #include "includes.h" #include "regfio.h" +#include "../librpc/gen_ndr/srv_initshutdown.h" +#include "../librpc/gen_ndr/srv_winreg.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index 08d69119fd..e903f0e974 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -29,6 +29,7 @@ /* This is the implementation of the lsa server code. */ #include "includes.h" +#include "../librpc/gen_ndr/srv_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 39912ac7e4..7854c448f8 100644 --- a/source3/rpc_server/srv_netlog_nt.c +++ b/source3/rpc_server/srv_netlog_nt.c @@ -28,6 +28,7 @@ #include "../libcli/auth/libcli_auth.h" #include "../libcli/auth/schannel_state.h" #include "../libcli/auth/schannel.h" +#include "../librpc/gen_ndr/srv_netlogon.h" extern userdom_struct current_user_info; diff --git a/source3/rpc_server/srv_ntsvcs_nt.c b/source3/rpc_server/srv_ntsvcs_nt.c index 357478f274..ec0c884acf 100644 --- a/source3/rpc_server/srv_ntsvcs_nt.c +++ b/source3/rpc_server/srv_ntsvcs_nt.c @@ -20,6 +20,7 @@ */ #include "includes.h" +#include "../librpc/gen_ndr/srv_ntsvcs.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index 3ba24e8038..2bfd6c3a89 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -34,6 +34,7 @@ #include "includes.h" #include "smbd/globals.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/srv_samr.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index 55fc1c170d..a40bb02971 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -27,6 +27,8 @@ up, all the errors returned are DOS errors, not NT status codes. */ #include "includes.h" +#include "../librpc/gen_ndr/srv_spoolss.h" +#include "../librpc/gen_ndr/cli_spoolss.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 f7f51d1e9a..d35557e5bd 100644 --- a/source3/rpc_server/srv_srvsvc_nt.c +++ b/source3/rpc_server/srv_srvsvc_nt.c @@ -24,6 +24,7 @@ /* This is the implementation of the srvsvc pipe. */ #include "includes.h" +#include "../librpc/gen_ndr/srv_srvsvc.h" extern const struct generic_mapping file_generic_mapping; diff --git a/source3/rpc_server/srv_svcctl_nt.c b/source3/rpc_server/srv_svcctl_nt.c index f393a9a464..26dc09ea7c 100644 --- a/source3/rpc_server/srv_svcctl_nt.c +++ b/source3/rpc_server/srv_svcctl_nt.c @@ -23,6 +23,7 @@ */ #include "includes.h" +#include "../librpc/gen_ndr/srv_svcctl.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpc_server/srv_winreg_nt.c b/source3/rpc_server/srv_winreg_nt.c index 3de9f0e623..cf3043629d 100644 --- a/source3/rpc_server/srv_winreg_nt.c +++ b/source3/rpc_server/srv_winreg_nt.c @@ -21,6 +21,7 @@ /* Implementation of registry functions. */ #include "includes.h" +#include "../librpc/gen_ndr/srv_winreg.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c index ab09e8632f..1831b79e50 100644 --- a/source3/rpc_server/srv_wkssvc_nt.c +++ b/source3/rpc_server/srv_wkssvc_nt.c @@ -25,6 +25,7 @@ #include "includes.h" #include "libnet/libnet.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/srv_wkssvc.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_RPC_SRV diff --git a/source3/rpcclient/cmd_dfs.c b/source3/rpcclient/cmd_dfs.c index d55261bea3..1f1eb3da32 100644 --- a/source3/rpcclient/cmd_dfs.c +++ b/source3/rpcclient/cmd_dfs.c @@ -21,6 +21,7 @@ #include "includes.h" #include "rpcclient.h" +#include "../librpc/gen_ndr/cli_dfs.h" /* Check DFS is supported by the remote server */ diff --git a/source3/rpcclient/cmd_drsuapi.c b/source3/rpcclient/cmd_drsuapi.c index 8fbd798ed0..b2939d4a23 100644 --- a/source3/rpcclient/cmd_drsuapi.c +++ b/source3/rpcclient/cmd_drsuapi.c @@ -20,6 +20,7 @@ #include "includes.h" #include "rpcclient.h" +#include "../librpc/gen_ndr/cli_drsuapi.h" static WERROR cracknames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/rpcclient/cmd_dssetup.c b/source3/rpcclient/cmd_dssetup.c index f2fd124967..88f541bb51 100644 --- a/source3/rpcclient/cmd_dssetup.c +++ b/source3/rpcclient/cmd_dssetup.c @@ -21,6 +21,7 @@ #include "includes.h" #include "rpcclient.h" +#include "../librpc/gen_ndr/cli_dssetup.h" /* Look up domain related information on a remote host */ diff --git a/source3/rpcclient/cmd_echo.c b/source3/rpcclient/cmd_echo.c index d90ef3499f..cf5f9e00ef 100644 --- a/source3/rpcclient/cmd_echo.c +++ b/source3/rpcclient/cmd_echo.c @@ -20,6 +20,7 @@ #include "includes.h" #include "rpcclient.h" +#include "../librpc/gen_ndr/cli_echo.h" static NTSTATUS cmd_echo_add_one(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, int argc, const char **argv) diff --git a/source3/rpcclient/cmd_epmapper.c b/source3/rpcclient/cmd_epmapper.c index cb334165f2..6159b4a0d1 100644 --- a/source3/rpcclient/cmd_epmapper.c +++ b/source3/rpcclient/cmd_epmapper.c @@ -20,6 +20,7 @@ #include "includes.h" #include "rpcclient.h" +#include "../librpc/gen_ndr/cli_epmapper.h" static NTSTATUS cmd_epmapper_map(struct rpc_pipe_client *p, TALLOC_CTX *mem_ctx, diff --git a/source3/rpcclient/cmd_eventlog.c b/source3/rpcclient/cmd_eventlog.c index d839bf4263..3acaf0ca83 100644 --- a/source3/rpcclient/cmd_eventlog.c +++ b/source3/rpcclient/cmd_eventlog.c @@ -20,6 +20,7 @@ #include "includes.h" #include "rpcclient.h" +#include "../librpc/gen_ndr/cli_eventlog.h" static NTSTATUS get_eventlog_handle(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c index 45868bf5a9..e0f4ac4adc 100644 --- a/source3/rpcclient/cmd_lsarpc.c +++ b/source3/rpcclient/cmd_lsarpc.c @@ -23,6 +23,7 @@ #include "includes.h" #include "rpcclient.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_lsa.h" /* useful function to allow entering a name instead of a SID and * looking it up automatically */ diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c index 2fbadf2a75..6317f8b389 100644 --- a/source3/rpcclient/cmd_netlogon.c +++ b/source3/rpcclient/cmd_netlogon.c @@ -22,6 +22,7 @@ #include "includes.h" #include "rpcclient.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_netlogon.h" static WERROR cmd_netlogon_logon_ctrl2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, int argc, diff --git a/source3/rpcclient/cmd_ntsvcs.c b/source3/rpcclient/cmd_ntsvcs.c index a345cdc8bf..95b905ab2d 100644 --- a/source3/rpcclient/cmd_ntsvcs.c +++ b/source3/rpcclient/cmd_ntsvcs.c @@ -20,6 +20,7 @@ #include "includes.h" #include "rpcclient.h" +#include "../librpc/gen_ndr/cli_ntsvcs.h" static WERROR cmd_ntsvcs_get_version(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c index e52411f8f7..e21a57fba7 100644 --- a/source3/rpcclient/cmd_samr.c +++ b/source3/rpcclient/cmd_samr.c @@ -25,6 +25,7 @@ #include "includes.h" #include "rpcclient.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_samr.h" extern DOM_SID domain_sid; diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index 8b1a6eac03..e24fb99e6f 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -24,6 +24,7 @@ #include "includes.h" #include "rpcclient.h" +#include "../librpc/gen_ndr/cli_spoolss.h" #define RPCCLIENT_PRINTERNAME(_printername, _cli, _arg) \ { \ diff --git a/source3/rpcclient/cmd_srvsvc.c b/source3/rpcclient/cmd_srvsvc.c index 10017fa19b..866b68111d 100644 --- a/source3/rpcclient/cmd_srvsvc.c +++ b/source3/rpcclient/cmd_srvsvc.c @@ -22,6 +22,7 @@ #include "includes.h" #include "rpcclient.h" +#include "../librpc/gen_ndr/cli_srvsvc.h" /* Display server query info */ diff --git a/source3/rpcclient/cmd_test.c b/source3/rpcclient/cmd_test.c index 85e90a19b5..e12e703f3e 100644 --- a/source3/rpcclient/cmd_test.c +++ b/source3/rpcclient/cmd_test.c @@ -20,6 +20,7 @@ #include "includes.h" #include "rpcclient.h" +#include "../librpc/gen_ndr/cli_lsa.h" static NTSTATUS cmd_testme(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, int argc, const char **argv) diff --git a/source3/rpcclient/cmd_wkssvc.c b/source3/rpcclient/cmd_wkssvc.c index 7a34c450ab..e8dc48d4a3 100644 --- a/source3/rpcclient/cmd_wkssvc.c +++ b/source3/rpcclient/cmd_wkssvc.c @@ -20,6 +20,7 @@ #include "includes.h" #include "rpcclient.h" +#include "../librpc/gen_ndr/cli_wkssvc.h" static WERROR cmd_wkssvc_wkstagetinfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 5f59c26583..f6d56adece 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -22,6 +22,7 @@ #include "includes.h" #include "rpcclient.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_lsa.h" DOM_SID domain_sid; diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c index 074f7e2c37..2bee5c1bde 100644 --- a/source3/smbd/lanman.c +++ b/source3/smbd/lanman.c @@ -27,6 +27,8 @@ #include "includes.h" #include "smbd/globals.h" +#include "../librpc/gen_ndr/cli_samr.h" +#include "../librpc/gen_ndr/srv_samr.h" #ifdef CHECK_TYPES #undef CHECK_TYPES diff --git a/source3/smbd/process.c b/source3/smbd/process.c index fbaa9dee29..3c5cb53026 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -20,6 +20,21 @@ #include "includes.h" #include "smbd/globals.h" +#include "../librpc/gen_ndr/srv_dfs.h" +#include "../librpc/gen_ndr/srv_drsuapi.h" +#include "../librpc/gen_ndr/srv_dssetup.h" +#include "../librpc/gen_ndr/srv_echo.h" +#include "../librpc/gen_ndr/srv_eventlog.h" +#include "../librpc/gen_ndr/srv_initshutdown.h" +#include "../librpc/gen_ndr/srv_lsa.h" +#include "../librpc/gen_ndr/srv_netlogon.h" +#include "../librpc/gen_ndr/srv_ntsvcs.h" +#include "../librpc/gen_ndr/srv_samr.h" +#include "../librpc/gen_ndr/srv_spoolss.h" +#include "../librpc/gen_ndr/srv_srvsvc.h" +#include "../librpc/gen_ndr/srv_svcctl.h" +#include "../librpc/gen_ndr/srv_winreg.h" +#include "../librpc/gen_ndr/srv_wkssvc.h" extern bool global_machine_password_needs_changing; diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 031a338835..f133eec0fc 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -23,6 +23,7 @@ #include "includes.h" #include "utils/net.h" #include "librpc/gen_ndr/ndr_krb5pac.h" +#include "../librpc/gen_ndr/cli_spoolss.h" #include "nsswitch/libwbclient/wbclient.h" #ifdef HAVE_ADS diff --git a/source3/utils/net_dom.c b/source3/utils/net_dom.c index 433fb6c671..ba3b950e43 100644 --- a/source3/utils/net_dom.c +++ b/source3/utils/net_dom.c @@ -19,6 +19,7 @@ #include "includes.h" #include "utils/net.h" +#include "../librpc/gen_ndr/cli_initshutdown.h" int net_dom_usage(struct net_context *c, int argc, const char **argv) { diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index 910d782fba..fdb11f33a0 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -23,6 +23,13 @@ #include "includes.h" #include "utils/net.h" #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" +#include "../librpc/gen_ndr/cli_srvsvc.h" +#include "../librpc/gen_ndr/cli_spoolss.h" +#include "../librpc/gen_ndr/cli_initshutdown.h" +#include "../librpc/gen_ndr/cli_winreg.h" static int net_mode_share; static bool sync_files(struct copy_clistate *cp_clistate, const char *mask); diff --git a/source3/utils/net_rpc_audit.c b/source3/utils/net_rpc_audit.c index bc3ed3dba2..b001c9c623 100644 --- a/source3/utils/net_rpc_audit.c +++ b/source3/utils/net_rpc_audit.c @@ -18,6 +18,7 @@ #include "includes.h" #include "utils/net.h" +#include "../librpc/gen_ndr/cli_lsa.h" /******************************************************************** ********************************************************************/ diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index fd81205a95..bb7d74b199 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -21,6 +21,8 @@ #include "includes.h" #include "utils/net.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_lsa.h" +#include "../librpc/gen_ndr/cli_samr.h" /* Macro for checking RPC error codes to make things more readable */ diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c index 5652caf834..6ad8224c86 100644 --- a/source3/utils/net_rpc_printer.c +++ b/source3/utils/net_rpc_printer.c @@ -18,6 +18,7 @@ */ #include "includes.h" #include "utils/net.h" +#include "../librpc/gen_ndr/cli_spoolss.h" /* support itanium as well */ static const struct print_architecture_table_node archi_table[]= { diff --git a/source3/utils/net_rpc_registry.c b/source3/utils/net_rpc_registry.c index 36e83a75af..aa3a13208c 100644 --- a/source3/utils/net_rpc_registry.c +++ b/source3/utils/net_rpc_registry.c @@ -22,6 +22,7 @@ #include "utils/net_registry_util.h" #include "regfio.h" #include "reg_objects.h" +#include "../librpc/gen_ndr/cli_winreg.h" /******************************************************************* connect to a registry hive root (open a registry policy) diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c index defed47914..fca73c0200 100644 --- a/source3/utils/net_rpc_rights.c +++ b/source3/utils/net_rpc_rights.c @@ -19,6 +19,7 @@ */ #include "includes.h" #include "utils/net.h" +#include "../librpc/gen_ndr/cli_lsa.h" /******************************************************************** ********************************************************************/ diff --git a/source3/utils/net_rpc_service.c b/source3/utils/net_rpc_service.c index 1ef7c3ed09..4edf94e8d9 100644 --- a/source3/utils/net_rpc_service.c +++ b/source3/utils/net_rpc_service.c @@ -18,7 +18,7 @@ #include "includes.h" #include "utils/net.h" - +#include "../librpc/gen_ndr/cli_svcctl.h" struct svc_state_msg { uint32 flag; diff --git a/source3/utils/net_rpc_sh_acct.c b/source3/utils/net_rpc_sh_acct.c index 83ce3551d1..efd90abb30 100644 --- a/source3/utils/net_rpc_sh_acct.c +++ b/source3/utils/net_rpc_sh_acct.c @@ -18,6 +18,7 @@ */ #include "includes.h" #include "utils/net.h" +#include "../librpc/gen_ndr/cli_samr.h" /* * Do something with the account policies. Read them all, run a function on diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index eaa2125e34..6bb5a3836c 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -21,6 +21,8 @@ #include "includes.h" #include "utils/net.h" +#include "../librpc/gen_ndr/cli_lsa.h" +#include "../librpc/gen_ndr/cli_dssetup.h" NTSTATUS net_rpc_lookup_name(struct net_context *c, TALLOC_CTX *mem_ctx, struct cli_state *cli, diff --git a/source3/utils/smbtree.c b/source3/utils/smbtree.c index 717ce65006..d7ba1234ed 100644 --- a/source3/utils/smbtree.c +++ b/source3/utils/smbtree.c @@ -20,6 +20,7 @@ */ #include "includes.h" +#include "../librpc/gen_ndr/cli_srvsvc.h" static int use_bcast; diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c index b271671665..92c0272088 100644 --- a/source3/winbindd/winbindd_ads.c +++ b/source3/winbindd/winbindd_ads.c @@ -23,6 +23,7 @@ #include "includes.h" #include "winbindd.h" +#include "../librpc/gen_ndr/cli_netlogon.h" #ifdef HAVE_ADS diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index e310d426a2..36b769bf1b 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -61,6 +61,10 @@ #include "includes.h" #include "winbindd.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_netlogon.h" +#include "../librpc/gen_ndr/cli_samr.h" +#include "../librpc/gen_ndr/cli_lsa.h" +#include "../librpc/gen_ndr/cli_dssetup.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c index 49463d6f8f..cecbb61051 100644 --- a/source3/winbindd/winbindd_dual_srv.c +++ b/source3/winbindd/winbindd_dual_srv.c @@ -24,6 +24,7 @@ #include "winbindd/winbindd.h" #include "winbindd/winbindd_proto.h" #include "librpc/gen_ndr/srv_wbint.h" +#include "../librpc/gen_ndr/cli_netlogon.h" void _wbint_Ping(pipes_struct *p, struct wbint_Ping *r) { diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c index 1917718462..3ebd9ffdbd 100644 --- a/source3/winbindd/winbindd_misc.c +++ b/source3/winbindd/winbindd_misc.c @@ -22,6 +22,7 @@ #include "includes.h" #include "winbindd.h" +#include "../librpc/gen_ndr/cli_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 755f703d63..3117533f31 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -25,6 +25,8 @@ #include "includes.h" #include "winbindd.h" #include "../libcli/auth/libcli_auth.h" +#include "../librpc/gen_ndr/cli_samr.h" + #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c index ce437f744c..b926370722 100644 --- a/source3/winbindd/winbindd_rpc.c +++ b/source3/winbindd/winbindd_rpc.c @@ -24,6 +24,8 @@ #include "includes.h" #include "winbindd.h" +#include "../librpc/gen_ndr/cli_samr.h" +#include "../librpc/gen_ndr/cli_lsa.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_WINBIND -- cgit