summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-11-01 10:30:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:09 -0500
commit90067934cd3195df80f8b1e614629d51fffcb38b (patch)
tree8229732147ad755c5015c9bc2c5a270d47f6c75e /source4
parent668ecaa325e827f2875295b121bbfc083702b77e (diff)
downloadsamba-90067934cd3195df80f8b1e614629d51fffcb38b.tar.gz
samba-90067934cd3195df80f8b1e614629d51fffcb38b.tar.bz2
samba-90067934cd3195df80f8b1e614629d51fffcb38b.zip
r3428: switched to using minimal includes for the auto-generated RPC code.
The thing that finally convinced me that minimal includes was worth pursuing for rpc was a compiler (tcc) that failed to build Samba due to reaching internal limits of the size of include files. Also the fact that includes.h.gch was 16MB, which really seems excessive. This patch brings it back to 12M, which is still too large, but better. Note that this patch speeds up compile times for both the pch and non-pch case. This change also includes the addition iof a "depends()" option in our IDL files, allowing you to specify that one IDL file depends on another. This capability was needed for the auto-includes generation. (This used to be commit b8f5fa8ac8e8725f3d321004f0aedf4246fc6b49)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/auth_sam.c1
-rw-r--r--source4/auth/auth_util.c2
-rw-r--r--source4/auth/auth_winbind.c1
-rw-r--r--source4/build/pidl/header.pm7
-rw-r--r--source4/build/pidl/parser.pm9
-rwxr-xr-xsource4/build/pidl/tables.pl22
-rw-r--r--source4/client/client.c1
-rw-r--r--source4/gtk/common/select.c1
-rw-r--r--source4/gtk/tools/gepdump.c1
-rw-r--r--source4/gtk/tools/gwcrontab.c1
-rw-r--r--source4/gtk/tools/gwsam.c1
-rw-r--r--source4/include/includes.h3
-rw-r--r--source4/include/structs.h50
-rw-r--r--source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c1
-rw-r--r--source4/libcli/auth/gensec_krb5.c1
-rw-r--r--source4/libnet/libnet_passwd.c1
-rw-r--r--source4/libnet/libnet_time.c1
-rw-r--r--source4/librpc/idl/misc.idl29
-rw-r--r--source4/librpc/idl/netlogon.idl41
-rw-r--r--source4/librpc/idl/oxidresolver.idl3
-rw-r--r--source4/librpc/idl/remact.idl3
-rw-r--r--source4/librpc/idl/samr.idl11
-rw-r--r--source4/librpc/idl/schannel.idl3
-rw-r--r--source4/librpc/idl/winreg.idl3
-rw-r--r--source4/librpc/ndr/ndr_spoolss_buf.c1
-rw-r--r--source4/librpc/rpc/dcerpc.c1
-rw-r--r--source4/librpc/rpc/dcerpc_schannel.c1
-rw-r--r--source4/librpc/rpc/dcerpc_sock.c1
-rw-r--r--source4/librpc/rpc/dcerpc_util.c2
-rw-r--r--source4/param/loadparm.c1
-rw-r--r--source4/rpc_server/dcerpc_server.c3
-rw-r--r--source4/rpc_server/dcom/oxidresolver.c1
-rw-r--r--source4/rpc_server/drsuapi/dcesrv_drsuapi.c1
-rw-r--r--source4/rpc_server/drsuapi/drsuapi_cracknames.c1
-rw-r--r--source4/rpc_server/echo/rpc_echo.c1
-rw-r--r--source4/rpc_server/epmapper/rpc_epmapper.c1
-rw-r--r--source4/rpc_server/lsa/dcesrv_lsa.c1
-rw-r--r--source4/rpc_server/netlogon/dcerpc_netlogon.c1
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c1
-rw-r--r--source4/rpc_server/samr/samr_password.c1
-rw-r--r--source4/rpc_server/samr/samr_utils.c1
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c1
-rw-r--r--source4/rpc_server/srvsvc/dcesrv_srvsvc.c1
-rw-r--r--source4/rpc_server/winreg/rpc_winreg.c1
-rw-r--r--source4/rpc_server/wkssvc/dcesrv_wkssvc.c1
-rw-r--r--source4/torture/local/binding_string.c1
-rw-r--r--source4/torture/rpc/atsvc.c1
-rw-r--r--source4/torture/rpc/autoidl.c1
-rw-r--r--source4/torture/rpc/bind.c1
-rw-r--r--source4/torture/rpc/dcom.c2
-rw-r--r--source4/torture/rpc/dfs.c1
-rw-r--r--source4/torture/rpc/drsuapi.c1
-rw-r--r--source4/torture/rpc/echo.c1
-rw-r--r--source4/torture/rpc/epmapper.c1
-rw-r--r--source4/torture/rpc/eventlog.c1
-rw-r--r--source4/torture/rpc/lsa.c1
-rw-r--r--source4/torture/rpc/mgmt.c1
-rw-r--r--source4/torture/rpc/netlogon.c1
-rw-r--r--source4/torture/rpc/oxidresolve.c1
-rw-r--r--source4/torture/rpc/remact.c2
-rw-r--r--source4/torture/rpc/samr.c2
-rw-r--r--source4/torture/rpc/scanner.c1
-rw-r--r--source4/torture/rpc/schannel.c1
-rw-r--r--source4/torture/rpc/spoolss.c1
-rw-r--r--source4/torture/rpc/srvsvc.c1
-rw-r--r--source4/torture/rpc/svcctl.c1
-rw-r--r--source4/torture/rpc/testjoin.c1
-rw-r--r--source4/torture/rpc/winreg.c1
-rw-r--r--source4/torture/rpc/wkssvc.c1
69 files changed, 199 insertions, 49 deletions
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c
index bae13bd996..1530165eb1 100644
--- a/source4/auth/auth_sam.c
+++ b/source4/auth/auth_sam.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_samr.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/auth/auth_util.c b/source4/auth/auth_util.c
index ef008d62c5..3565fbd0dc 100644
--- a/source4/auth/auth_util.c
+++ b/source4/auth/auth_util.c
@@ -22,6 +22,8 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_samr.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/auth/auth_winbind.c b/source4/auth/auth_winbind.c
index c37f65f441..2f54adcdfd 100644
--- a/source4/auth/auth_winbind.c
+++ b/source4/auth/auth_winbind.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm
index 58707a90a5..cc14942f0c 100644
--- a/source4/build/pidl/header.pm
+++ b/source4/build/pidl/header.pm
@@ -320,6 +320,13 @@ sub HeaderInterface($)
$res .= "#ifndef _HEADER_NDR_$interface->{NAME}\n";
$res .= "#define _HEADER_NDR_$interface->{NAME}\n\n";
+ if (defined $interface->{PROPERTIES}->{depends}) {
+ my @d = split / /, $interface->{PROPERTIES}->{depends};
+ foreach my $i (@d) {
+ $res .= "#include \"librpc/gen_ndr/ndr_$i\.h\"\n";
+ }
+ }
+
if (defined $interface->{PROPERTIES}->{uuid}) {
my $name = uc $interface->{NAME};
$res .= "#define DCERPC_$name\_UUID " .
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm
index cec972911e..c52be637ec 100644
--- a/source4/build/pidl/parser.pm
+++ b/source4/build/pidl/parser.pm
@@ -1563,11 +1563,18 @@ sub Parse($$)
{
my($idl) = shift;
my($filename) = shift;
+ my $h_filename = $filename;
+
+ if ($h_filename =~ /(.*)\.c/) {
+ $h_filename = "$1.h";
+ }
open(OUT, ">$filename") || die "can't open $filename";
pidl "/* parser auto-generated by pidl */\n\n";
- pidl "#include \"includes.h\"\n\n";
+ pidl "#include \"includes.h\"\n";
+ pidl "#include \"$h_filename\"\n\n";
+
foreach my $x (@{$idl}) {
if ($x->{TYPE} eq "INTERFACE") {
needed::BuildNeeded($x);
diff --git a/source4/build/pidl/tables.pl b/source4/build/pidl/tables.pl
index 5f760d4403..8d43dff146 100755
--- a/source4/build/pidl/tables.pl
+++ b/source4/build/pidl/tables.pl
@@ -43,17 +43,24 @@ if ($opt_help) {
###################################
+# add include lines to tables.c
+sub process_include($)
+{
+ my $name = shift;
+ print TABLEC "#include \"$name\"\n";
+}
+
+###################################
# extract table entries from 1 file
sub process_file($)
{
my $filename = shift;
open(FILE, $filename) || die "unable to open $filename\n";
- print TABLEH "#include \"$filename\"\n";
-
while (my $line = <FILE>) {
- if ($line =~ /extern const struct dcerpc_interface_table (\w+);/) {
- print TABLEC "\t&$1,\n";
+ if ($line =~ /extern const struct dcerpc_interface_table dcerpc_table_(\w+);/) {
+ print TABLEC "\t&dcerpc_table_$1,\n";
+ print TABLEH "NTSTATUS dcerpc_$1\_init(void);\n";
}
}
@@ -70,7 +77,14 @@ open(TABLEC, ">$opt_output.c") || die "failed to open $opt_output.c\n";
print TABLEC "
#include \"includes.h\"
+";
+foreach my $filename (@ARGV) {
+ process_include($filename);
+}
+
+
+print TABLEC "
/*
generated by pidl IDL table generator
*/
diff --git a/source4/client/client.c b/source4/client/client.c
index 3958f078e5..bced80d596 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_srvsvc.h"
#include "libcli/raw/libcliraw.h"
#ifndef REGISTER
diff --git a/source4/gtk/common/select.c b/source4/gtk/common/select.c
index ba17092cb9..bab21d38fe 100644
--- a/source4/gtk/common/select.c
+++ b/source4/gtk/common/select.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_samr.h"
#include "gtk-smb.h"
/* GtkSelectDomainDialog */
diff --git a/source4/gtk/tools/gepdump.c b/source4/gtk/tools/gepdump.c
index 5232187644..c5c378c465 100644
--- a/source4/gtk/tools/gepdump.c
+++ b/source4/gtk/tools/gepdump.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
#include "gtk/common/gtk-smb.h"
/*
diff --git a/source4/gtk/tools/gwcrontab.c b/source4/gtk/tools/gwcrontab.c
index e651b78219..f06b4fcbe8 100644
--- a/source4/gtk/tools/gwcrontab.c
+++ b/source4/gtk/tools/gwcrontab.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_atsvc.h"
#include "gtk/common/gtk-smb.h"
struct dcerpc_pipe *at_pipe = NULL;
diff --git a/source4/gtk/tools/gwsam.c b/source4/gtk/tools/gwsam.c
index be9c5d1257..829d4d50f6 100644
--- a/source4/gtk/tools/gwsam.c
+++ b/source4/gtk/tools/gwsam.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_samr.h"
#include "gtk/common/gtk-smb.h"
struct policy_handle sam_handle;
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 7ff466b7d7..b61429edd6 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -658,11 +658,12 @@ extern int errno;
#include "mutex.h"
+#include "structs.h"
#include "librpc/ndr/libndr.h"
+#include "librpc/ndr/ndr_sec.h"
#include "librpc/gen_ndr/ndr_misc.h"
#include "librpc/gen_ndr/ndr_dcerpc.h"
#include "librpc/rpc/dcerpc.h"
-#include "librpc/ndr/ndr_sec.h"
#include "librpc/gen_ndr/tables.h"
#include "libcli/auth/ntlmssp.h"
diff --git a/source4/include/structs.h b/source4/include/structs.h
new file mode 100644
index 0000000000..2757e6df57
--- /dev/null
+++ b/source4/include/structs.h
@@ -0,0 +1,50 @@
+/*
+ Unix SMB/CIFS implementation.
+
+ Copyright (C) Andrew Tridgell 2004
+
+ 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 2 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, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+/*
+ this file contains pre-declarations of private structures to avoid the
+ "scope is only this definition or declaration" warning
+*/
+
+union spoolss_PrinterInfo;
+union spoolss_FormInfo;
+union spoolss_JobInfo;
+union spoolss_DriverInfo;
+union spoolss_PortInfo;
+
+struct MULTI_QI;
+struct COSERVERINFO;
+
+
+struct epm_floor;
+struct epm_tower;
+
+struct drsuapi_DsCrackNames;
+
+struct samr_ChangePasswordUser;
+struct samr_OemChangePasswordUser2;
+struct samr_ChangePasswordUser3;
+struct samr_ChangePasswordUser2;
+struct samr_CryptPassword;
+struct samr_CryptPasswordEx;
+
+struct netr_SamInfo3;
+struct netr_Authenticator;
+
diff --git a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
index 27bd3ff957..f90b123bfc 100644
--- a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
+++ b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
@@ -18,6 +18,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "includes.h"
+#include "librpc/gen_ndr/ndr_winreg.h"
/**
* This is the RPC backend for the registry library.
diff --git a/source4/libcli/auth/gensec_krb5.c b/source4/libcli/auth/gensec_krb5.c
index ea70b471e5..95cc6bacbe 100644
--- a/source4/libcli/auth/gensec_krb5.c
+++ b/source4/libcli/auth/gensec_krb5.c
@@ -24,6 +24,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_krb5pac.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_AUTH
diff --git a/source4/libnet/libnet_passwd.c b/source4/libnet/libnet_passwd.c
index 314ab5028a..877dacfd04 100644
--- a/source4/libnet/libnet_passwd.c
+++ b/source4/libnet/libnet_passwd.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_samr.h"
/*
* do a password change using DCERPC/SAMR calls
diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c
index f56e6480e9..6a5eec7c26 100644
--- a/source4/libnet/libnet_time.c
+++ b/source4/libnet/libnet_time.c
@@ -19,6 +19,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_srvsvc.h"
/*
* get the remote time of a server via srvsvc_NetRemoteTOD
diff --git a/source4/librpc/idl/misc.idl b/source4/librpc/idl/misc.idl
index 7fed02f5b1..ce884b6c5c 100644
--- a/source4/librpc/idl/misc.idl
+++ b/source4/librpc/idl/misc.idl
@@ -37,7 +37,16 @@ interface misc
const string SID_BUILTIN_BACKUP_OPERATORS = "S-1-5-32-551";
const string SID_BUILTIN_REPLICATOR = "S-1-5-32-552";
- typedef [public,noprint] struct {
+ /* server roles */
+ typedef enum {
+ ROLE_STANDALONE = 0,
+ ROLE_DOMAIN_MEMBER = 1,
+ ROLE_DOMAIN_BDC = 2,
+ ROLE_DOMAIN_PDC = 3
+ } samr_Role;
+
+
+ typedef [public,noprint,gensize] struct {
uint32 time_low;
uint16 time_mid;
uint16 time_hi_and_version;
@@ -123,4 +132,22 @@ interface misc
typedef [public, flag(NDR_PAHEX)] struct {
uint8 hash[16];
} samr_Password;
+
+ typedef [public,flag(NDR_PAHEX)] struct {
+ uint8 key[16];
+ } netr_UserSessionKey;
+
+ typedef [public,flag(NDR_PAHEX)] struct {
+ uint8 key[8];
+ } netr_LMSessionKey;
+
+ typedef [public, flag(NDR_PAHEX)] struct {
+ uint8 data[8];
+ } netr_Credential;
+
+ typedef [public] struct {
+ netr_Credential cred;
+ time_t timestamp;
+ } netr_Authenticator;
+
}
diff --git a/source4/librpc/idl/netlogon.idl b/source4/librpc/idl/netlogon.idl
index c98fa8f1e6..b880698ffd 100644
--- a/source4/librpc/idl/netlogon.idl
+++ b/source4/librpc/idl/netlogon.idl
@@ -10,12 +10,18 @@
uuid("12345678-1234-abcd-ef00-01234567cffb"),
version(1.0),
endpoint("ncacn_np:[\\pipe\\netlogon]","ncacn_ip_tcp:","ncalrpc:"),
- pointer_default(unique)
+ pointer_default(unique),
+ depends(lsa,samr)
]
interface netlogon
{
-
+ typedef [public] struct {
+ [value(strlen_m(r->string)*2)] uint16 size;
+ [value(r->size)] uint16 length;
+ unistr_noterm *string;
+ } netr_String;
+
/*****************/
/* Function 0x00 */
@@ -65,16 +71,6 @@ interface netlogon
/*****************/
/* Function 0x02 */
- typedef [flag(NDR_PAHEX)] struct {
- uint8 data[8];
- } netr_Credential;
-
- typedef struct {
- [value(strlen_m(r->string)*2)] uint16 size;
- [value(r->size)] uint16 length;
- unistr_noterm *string;
- } netr_String;
-
/* in netr_AcctLockStr size seems to be be 24, and rrenard thinks
that the structure of the bindata looks like this:
@@ -128,25 +124,12 @@ interface netlogon
[case(6)] netr_NetworkInfo *network;
} netr_LogonLevel;
- typedef struct {
- netr_Credential cred;
- time_t timestamp;
- } netr_Authenticator;
-
- typedef struct {
+ typedef [public] struct {
uint32 rid;
uint32 attributes;
} netr_GroupMembership;
- typedef [flag(NDR_PAHEX)] struct {
- uint8 key[16];
- } netr_UserSessionKey;
-
- typedef [flag(NDR_PAHEX)] struct {
- uint8 key[8];
- } netr_LMSessionKey;
-
- typedef struct {
+ typedef [public] struct {
NTTIME last_logon;
NTTIME last_logoff;
NTTIME acct_expiry;
@@ -175,11 +158,11 @@ interface netlogon
uint32 unknown[7];
} netr_SamBaseInfo;
- typedef struct {
+ typedef [public] struct {
netr_SamBaseInfo base;
} netr_SamInfo2;
- typedef struct {
+ typedef [public] struct {
dom_sid2 *sid;
uint32 attribute;
} netr_SidAttr;
diff --git a/source4/librpc/idl/oxidresolver.idl b/source4/librpc/idl/oxidresolver.idl
index 4da6f9aa20..4e33b5a639 100644
--- a/source4/librpc/idl/oxidresolver.idl
+++ b/source4/librpc/idl/oxidresolver.idl
@@ -16,7 +16,8 @@
uuid("99fcfec4-5260-101b-bbcb-00aa0021347a"),
helpstring("Object Exporter ID Resolver"),
endpoint("ncacn_np:[\\pipe\\epmapper]", "ncacn_ip_tcp:[135]", "ncalrpc:"),
- pointer_default(unique)
+ pointer_default(unique),
+ depends(dcom)
]
interface IOXIDResolver
{
diff --git a/source4/librpc/idl/remact.idl b/source4/librpc/idl/remact.idl
index b9e73a2b14..51e2b6d735 100644
--- a/source4/librpc/idl/remact.idl
+++ b/source4/librpc/idl/remact.idl
@@ -10,7 +10,8 @@
[
uuid("4d9f4ab8-7d1c-11cf-861e-0020af6e7c57"),
- pointer_default(unique)
+ pointer_default(unique),
+ depends(dcom)
]
interface IRemoteActivation
{
diff --git a/source4/librpc/idl/samr.idl b/source4/librpc/idl/samr.idl
index 0a6f53ff78..4d41e389e6 100644
--- a/source4/librpc/idl/samr.idl
+++ b/source4/librpc/idl/samr.idl
@@ -11,7 +11,8 @@
[ uuid("12345778-1234-abcd-ef00-0123456789ac"),
version(1.0),
endpoint("ncacn_np:[\\pipe\\samr]","ncacn_ip_tcp:", "ncalrpc:"),
- pointer_default(unique)
+ pointer_default(unique),
+ depends(lsa)
] interface samr
{
/* account control (acct_flags) bits */
@@ -126,14 +127,6 @@
/************************/
/* Function 0x08 */
- /* server roles */
- typedef enum {
- ROLE_STANDALONE = 0,
- ROLE_DOMAIN_MEMBER = 1,
- ROLE_DOMAIN_BDC = 2,
- ROLE_DOMAIN_PDC = 3
- } samr_Role;
-
typedef struct {
uint16 min_password_len;
uint16 password_history;
diff --git a/source4/librpc/idl/schannel.idl b/source4/librpc/idl/schannel.idl
index 157634ef76..d840d78ef9 100644
--- a/source4/librpc/idl/schannel.idl
+++ b/source4/librpc/idl/schannel.idl
@@ -4,6 +4,9 @@
schannel structures
*/
+[
+ depends(netlogon)
+]
interface schannel
{
/*
diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl
index 05c0a3eaae..03b48be02a 100644
--- a/source4/librpc/idl/winreg.idl
+++ b/source4/librpc/idl/winreg.idl
@@ -8,7 +8,8 @@
version(1.0),
endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
pointer_default(unique),
- helpstring("Remote Registry Service")
+ helpstring("Remote Registry Service"),
+ depends(lsa)
] interface winreg
{
typedef struct {
diff --git a/source4/librpc/ndr/ndr_spoolss_buf.c b/source4/librpc/ndr/ndr_spoolss_buf.c
index 9b68ec7883..0e51533941 100644
--- a/source4/librpc/ndr/ndr_spoolss_buf.c
+++ b/source4/librpc/ndr/ndr_spoolss_buf.c
@@ -23,6 +23,7 @@
#include "includes.h"
+#include "librpc/gen_ndr/ndr_spoolss.h"
NTSTATUS pull_spoolss_PrinterInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
uint32_t level, uint32_t count,
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index 0375382ea6..2ba7c4fff3 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
/* initialise a dcerpc pipe. */
struct dcerpc_pipe *dcerpc_pipe_init(void)
diff --git a/source4/librpc/rpc/dcerpc_schannel.c b/source4/librpc/rpc/dcerpc_schannel.c
index b7eac60dbc..d6fc7ad511 100644
--- a/source4/librpc/rpc/dcerpc_schannel.c
+++ b/source4/librpc/rpc/dcerpc_schannel.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_schannel.h"
enum schannel_position {
DCERPC_SCHANNEL_STATE_START = 0,
diff --git a/source4/librpc/rpc/dcerpc_sock.c b/source4/librpc/rpc/dcerpc_sock.c
index e1dca6a6d9..11d016d881 100644
--- a/source4/librpc/rpc/dcerpc_sock.c
+++ b/source4/librpc/rpc/dcerpc_sock.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
#define MIN_HDR_SIZE 16
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index 4126dd9aa6..c484a2618c 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -22,7 +22,7 @@
*/
#include "includes.h"
-
+#include "librpc/gen_ndr/ndr_epmapper.h"
/*
find the pipe name for a local IDL interface
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c
index e1f006d889..c4518d620f 100644
--- a/source4/param/loadparm.c
+++ b/source4/param/loadparm.c
@@ -53,6 +53,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_svcctl.h"
BOOL in_client = False; /* Not in the client by default */
static BOOL bLoaded = False;
diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c
index 59ea8321ff..652aa87f5a 100644
--- a/source4/rpc_server/dcerpc_server.c
+++ b/source4/rpc_server/dcerpc_server.c
@@ -22,6 +22,9 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
+#include "librpc/gen_ndr/ndr_dcom.h"
+#include "librpc/gen_ndr/ndr_oxidresolver.h"
/*
see if two endpoints match
diff --git a/source4/rpc_server/dcom/oxidresolver.c b/source4/rpc_server/dcom/oxidresolver.c
index 23de6a5d66..ee6ce07189 100644
--- a/source4/rpc_server/dcom/oxidresolver.c
+++ b/source4/rpc_server/dcom/oxidresolver.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_oxidresolver.h"
/*
diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
index 42022dea01..56d0acc88c 100644
--- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
+++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_drsuapi.h"
#include "rpc_server/common/common.h"
#include "rpc_server/drsuapi/dcesrv_drsuapi.h"
diff --git a/source4/rpc_server/drsuapi/drsuapi_cracknames.c b/source4/rpc_server/drsuapi/drsuapi_cracknames.c
index 45b1b362c7..b19bf22b78 100644
--- a/source4/rpc_server/drsuapi/drsuapi_cracknames.c
+++ b/source4/rpc_server/drsuapi/drsuapi_cracknames.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_drsuapi.h"
#include "rpc_server/common/common.h"
#include "rpc_server/drsuapi/dcesrv_drsuapi.h"
diff --git a/source4/rpc_server/echo/rpc_echo.c b/source4/rpc_server/echo/rpc_echo.c
index 066bb2cdc1..fe5e76fb94 100644
--- a/source4/rpc_server/echo/rpc_echo.c
+++ b/source4/rpc_server/echo/rpc_echo.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_echo.h"
static NTSTATUS echo_AddOne(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct echo_AddOne *r)
diff --git a/source4/rpc_server/epmapper/rpc_epmapper.c b/source4/rpc_server/epmapper/rpc_epmapper.c
index 838b8abf2b..dd2c74e836 100644
--- a/source4/rpc_server/epmapper/rpc_epmapper.c
+++ b/source4/rpc_server/epmapper/rpc_epmapper.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
#include "rpc_server/common/common.h"
typedef uint32_t error_status_t;
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c
index f5bcae719b..2c972db8ab 100644
--- a/source4/rpc_server/lsa/dcesrv_lsa.c
+++ b/source4/rpc_server/lsa/dcesrv_lsa.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_lsa.h"
#include "rpc_server/common/common.h"
/*
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index bad0b36077..61f0f58fba 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
#include "rpc_server/common/common.h"
struct server_pipe_state {
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index 00513cd0e6..572f5b0816 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_samr.h"
#include "rpc_server/common/common.h"
#include "rpc_server/samr/dcesrv_samr.h"
diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c
index 282d83a190..60d5927207 100644
--- a/source4/rpc_server/samr/samr_password.c
+++ b/source4/rpc_server/samr/samr_password.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_samr.h"
#include "rpc_server/common/common.h"
#include "rpc_server/samr/dcesrv_samr.h"
diff --git a/source4/rpc_server/samr/samr_utils.c b/source4/rpc_server/samr/samr_utils.c
index f67f828b68..30c5b0cf13 100644
--- a/source4/rpc_server/samr/samr_utils.c
+++ b/source4/rpc_server/samr/samr_utils.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_samr.h"
/*
translated the ACB_CTRL Flags to UserFlags (userAccountControl)
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index ed9cd01842..4654674744 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_spoolss.h"
#include "rpc_server/common/common.h"
#include "rpc_server/spoolss/dcesrv_spoolss.h"
diff --git a/source4/rpc_server/srvsvc/dcesrv_srvsvc.c b/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
index ad8a7f6db0..ead0fba07d 100644
--- a/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
+++ b/source4/rpc_server/srvsvc/dcesrv_srvsvc.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_srvsvc.h"
#include "rpc_server/common/common.h"
/*
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c
index fcbbf124c0..39e5fe7ee5 100644
--- a/source4/rpc_server/winreg/rpc_winreg.c
+++ b/source4/rpc_server/winreg/rpc_winreg.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_winreg.h"
#include "rpc_server/common/common.h"
enum handle_types { HTYPE_REGVAL, HTYPE_REGKEY };
diff --git a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
index 1ba0f5fc6d..e3e446ef2c 100644
--- a/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
+++ b/source4/rpc_server/wkssvc/dcesrv_wkssvc.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_wkssvc.h"
#include "rpc_server/common/common.h"
/*
diff --git a/source4/torture/local/binding_string.c b/source4/torture/local/binding_string.c
index da9478c6d8..abf4555a22 100644
--- a/source4/torture/local/binding_string.c
+++ b/source4/torture/local/binding_string.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
static BOOL test_BindingString(TALLOC_CTX *mem_ctx, const char *binding)
{
diff --git a/source4/torture/rpc/atsvc.c b/source4/torture/rpc/atsvc.c
index 52ac53e58b..3d28fa775e 100644
--- a/source4/torture/rpc/atsvc.c
+++ b/source4/torture/rpc/atsvc.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_atsvc.h"
static BOOL test_JobGetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, uint32_t job_id)
{
diff --git a/source4/torture/rpc/autoidl.c b/source4/torture/rpc/autoidl.c
index b8e18affb5..619779302b 100644
--- a/source4/torture/rpc/autoidl.c
+++ b/source4/torture/rpc/autoidl.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_drsuapi.h"
#if 1
diff --git a/source4/torture/rpc/bind.c b/source4/torture/rpc/bind.c
index a4f3030bf6..61093d6a89 100644
--- a/source4/torture/rpc/bind.c
+++ b/source4/torture/rpc/bind.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_lsa.h"
/*
This test is 'bogus' in that it doesn't actually perform to the
diff --git a/source4/torture/rpc/dcom.c b/source4/torture/rpc/dcom.c
index 13f24c9d00..f44ce96658 100644
--- a/source4/torture/rpc/dcom.c
+++ b/source4/torture/rpc/dcom.c
@@ -20,6 +20,8 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_dcom.h"
+#include "librpc/gen_ndr/ndr_oxidresolver.h"
BOOL torture_rpc_dcom(void)
{
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c
index ed7e3ec3a9..dd3227c2c1 100644
--- a/source4/torture/rpc/dfs.c
+++ b/source4/torture/rpc/dfs.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_dfs.h"
static BOOL test_GetManagerVersion(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 9981b24258..1b4c0d2305 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -22,6 +22,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_drsuapi.h"
static BOOL test_DsBind(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct policy_handle *bind_handle)
diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c
index 342255f102..441a4835f2 100644
--- a/source4/torture/rpc/echo.c
+++ b/source4/torture/rpc/echo.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_echo.h"
/*
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index b1076e64c6..fa0199a3c6 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
/*
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index dfa9fc7a51..a98b3e9e79 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_eventlog.h"
static void init_eventlog_String(struct eventlog_String *name, const char *s)
{
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index ed82c731bb..8c9675457e 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_lsa.h"
static void init_lsa_Name(struct lsa_Name *name, const char *s)
{
diff --git a/source4/torture/rpc/mgmt.c b/source4/torture/rpc/mgmt.c
index 4340bde691..8cf8bfdf37 100644
--- a/source4/torture/rpc/mgmt.c
+++ b/source4/torture/rpc/mgmt.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_mgmt.h"
/*
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 7ddd8da0a7..6971193f92 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -23,6 +23,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
static const char *machine_password;
diff --git a/source4/torture/rpc/oxidresolve.c b/source4/torture/rpc/oxidresolve.c
index a4ad897baa..ce7563bee8 100644
--- a/source4/torture/rpc/oxidresolve.c
+++ b/source4/torture/rpc/oxidresolve.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_oxidresolver.h"
static int test_SimplePing(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, HYPER_T setid)
{
diff --git a/source4/torture/rpc/remact.c b/source4/torture/rpc/remact.c
index 1136f68025..2fbb5de33e 100644
--- a/source4/torture/rpc/remact.c
+++ b/source4/torture/rpc/remact.c
@@ -20,6 +20,8 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_remact.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
#define CLSID_TEST "00000316-0000-0000-C000-000000000046"
#define CLSID_SIMPLE "5e9ddec7-5767-11cf-beab-00aa006c3606"
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 544d147a17..b19c3e2993 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -21,6 +21,8 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_lsa.h"
+#include "librpc/gen_ndr/ndr_samr.h"
#define TEST_ACCOUNT_NAME "samrtorturetest"
#define TEST_ALIASNAME "samrtorturetestalias"
diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c
index f93ea0419a..c0415c2058 100644
--- a/source4/torture/rpc/scanner.c
+++ b/source4/torture/rpc/scanner.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_mgmt.h"
/*
work out how many calls there are for an interface
diff --git a/source4/torture/rpc/schannel.c b/source4/torture/rpc/schannel.c
index 1336eb0552..3355786d35 100644
--- a/source4/torture/rpc/schannel.c
+++ b/source4/torture/rpc/schannel.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_samr.h"
#define TEST_MACHINE_NAME "schanneltest"
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 3156ac7b3b..7d1718acaf 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_spoolss.h"
static BOOL test_GetPrinter(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct policy_handle *handle)
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index 53cf2a7b61..4ddbbc7289 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_srvsvc.h"
/**************************/
/* srvsvc_NetCharDev */
diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index 148ed38e5f..fd4dcf7894 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_svcctl.h"
static BOOL test_EnumServicesStatus(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *h)
{
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index b81199d74d..604c8e5267 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -26,6 +26,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_samr.h"
struct test_join {
struct dcerpc_pipe *p;
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index fa08d1a69e..379653ddf7 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -21,6 +21,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_winreg.h"
static void init_winreg_String(struct winreg_String *name, const char *s)
{
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index d8552d5fa2..baa1f6bfd8 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -20,6 +20,7 @@
*/
#include "includes.h"
+#include "librpc/gen_ndr/ndr_wkssvc.h"
static BOOL test_NetWkstaGetInfo(struct dcerpc_pipe *p,