diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-01 10:30:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:09 -0500 |
commit | 90067934cd3195df80f8b1e614629d51fffcb38b (patch) | |
tree | 8229732147ad755c5015c9bc2c5a270d47f6c75e /source4/librpc | |
parent | 668ecaa325e827f2875295b121bbfc083702b77e (diff) | |
download | samba-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/librpc')
-rw-r--r-- | source4/librpc/idl/misc.idl | 29 | ||||
-rw-r--r-- | source4/librpc/idl/netlogon.idl | 41 | ||||
-rw-r--r-- | source4/librpc/idl/oxidresolver.idl | 3 | ||||
-rw-r--r-- | source4/librpc/idl/remact.idl | 3 | ||||
-rw-r--r-- | source4/librpc/idl/samr.idl | 11 | ||||
-rw-r--r-- | source4/librpc/idl/schannel.idl | 3 | ||||
-rw-r--r-- | source4/librpc/idl/winreg.idl | 3 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_spoolss_buf.c | 1 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc.c | 1 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_schannel.c | 1 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_sock.c | 1 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_util.c | 2 |
12 files changed, 56 insertions, 43 deletions
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 |