diff options
-rw-r--r-- | librpc/idl/atsvc.idl (renamed from source4/librpc/idl/atsvc.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/audiosrv.idl (renamed from source4/librpc/idl/audiosrv.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/browser.idl (renamed from source4/librpc/idl/browser.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/dbgidl.idl (renamed from source4/librpc/idl/dbgidl.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/dcom.idl (renamed from source4/librpc/idl/dcom.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/dfs.idl (renamed from source3/librpc/idl/dfs.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/dnsserver.idl (renamed from source4/librpc/idl/dnsserver.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/dsbackup.idl (renamed from source4/librpc/idl/dsbackup.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/dssetup.idl (renamed from source3/librpc/idl/dssetup.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/echo.idl (renamed from source3/librpc/idl/echo.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/efs.idl (renamed from source4/librpc/idl/efs.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/frsapi.idl (renamed from source4/librpc/idl/frsapi.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/frsrpc.idl (renamed from source4/librpc/idl/frsrpc.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/idl_types.h (renamed from source3/librpc/idl/idl_types.h) | 0 | ||||
-rw-r--r-- | librpc/idl/keysvc.idl (renamed from source4/librpc/idl/keysvc.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/mgmt.idl (renamed from source4/librpc/idl/mgmt.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/misc.idl (renamed from source3/librpc/idl/misc.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/msgsvc.idl (renamed from source4/librpc/idl/msgsvc.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/notify.idl (renamed from source3/librpc/idl/notify.idl) | 2 | ||||
-rw-r--r-- | librpc/idl/orpc.idl (renamed from source4/librpc/idl/orpc.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/oxidresolver.idl (renamed from source4/librpc/idl/oxidresolver.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/policyagent.idl (renamed from source4/librpc/idl/policyagent.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/protected_storage.idl (renamed from source4/librpc/idl/protected_storage.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/remact.idl (renamed from source4/librpc/idl/remact.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/rot.idl (renamed from source4/librpc/idl/rot.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/security.idl (renamed from source3/librpc/idl/security.idl) | 18 | ||||
-rw-r--r-- | librpc/idl/spoolss.idl (renamed from source3/librpc/idl/spoolss.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/trkwks.idl (renamed from source4/librpc/idl/trkwks.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/unixinfo.idl (renamed from source4/librpc/idl/unixinfo.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/w32time.idl (renamed from source4/librpc/idl/w32time.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/wmi.idl (renamed from source4/librpc/idl/wmi.idl) | 0 | ||||
-rw-r--r-- | librpc/idl/wzcsvc.idl (renamed from source4/librpc/idl/wzcsvc.idl) | 0 | ||||
-rw-r--r-- | pidl/lib/Parse/Pidl/ODL.pm | 13 | ||||
-rw-r--r-- | source3/Makefile.in | 18 | ||||
-rw-r--r-- | source3/configure.in | 2 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_security.c | 26 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_security.h | 3 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/security.h | 14 | ||||
-rwxr-xr-x | source3/script/build_idl.sh | 12 | ||||
-rw-r--r-- | source4/cluster/cluster.c | 1 | ||||
-rw-r--r-- | source4/cluster/ctdb/ctdb_cluster.c | 2 | ||||
-rw-r--r-- | source4/cluster/local.c | 2 | ||||
-rw-r--r-- | source4/librpc/config.mk | 6 | ||||
-rwxr-xr-x | source4/librpc/idl-deps.pl | 3 | ||||
-rw-r--r-- | source4/librpc/idl/dfs.idl | 419 | ||||
-rw-r--r-- | source4/librpc/idl/dssetup.idl | 101 | ||||
-rw-r--r-- | source4/librpc/idl/echo.idl | 127 | ||||
-rw-r--r-- | source4/librpc/idl/idl_types.h | 69 | ||||
-rw-r--r-- | source4/librpc/idl/misc.idl | 60 | ||||
-rw-r--r-- | source4/librpc/idl/notify.idl | 58 | ||||
-rw-r--r-- | source4/librpc/idl/opendb.idl | 2 | ||||
-rw-r--r-- | source4/librpc/idl/security.idl | 7 | ||||
-rw-r--r-- | source4/librpc/idl/spoolss.idl | 1571 | ||||
-rwxr-xr-x | source4/librpc/scripts/build_idl.sh | 13 | ||||
-rw-r--r-- | source4/ntvfs/ntvfs.h | 1 | ||||
-rw-r--r-- | source4/rpc_server/dcerpc_server.h | 2 | ||||
-rw-r--r-- | source4/smbd/service_stream.h | 2 | ||||
-rw-r--r-- | source4/smbd/service_task.h | 2 |
58 files changed, 115 insertions, 2441 deletions
diff --git a/source4/librpc/idl/atsvc.idl b/librpc/idl/atsvc.idl index 75e1daa882..75e1daa882 100644 --- a/source4/librpc/idl/atsvc.idl +++ b/librpc/idl/atsvc.idl diff --git a/source4/librpc/idl/audiosrv.idl b/librpc/idl/audiosrv.idl index 1b059868ff..1b059868ff 100644 --- a/source4/librpc/idl/audiosrv.idl +++ b/librpc/idl/audiosrv.idl diff --git a/source4/librpc/idl/browser.idl b/librpc/idl/browser.idl index 5b05be9cbb..5b05be9cbb 100644 --- a/source4/librpc/idl/browser.idl +++ b/librpc/idl/browser.idl diff --git a/source4/librpc/idl/dbgidl.idl b/librpc/idl/dbgidl.idl index 0712392f00..0712392f00 100644 --- a/source4/librpc/idl/dbgidl.idl +++ b/librpc/idl/dbgidl.idl diff --git a/source4/librpc/idl/dcom.idl b/librpc/idl/dcom.idl index 977c7ed86a..977c7ed86a 100644 --- a/source4/librpc/idl/dcom.idl +++ b/librpc/idl/dcom.idl diff --git a/source3/librpc/idl/dfs.idl b/librpc/idl/dfs.idl index 1b145f3dfa..1b145f3dfa 100644 --- a/source3/librpc/idl/dfs.idl +++ b/librpc/idl/dfs.idl diff --git a/source4/librpc/idl/dnsserver.idl b/librpc/idl/dnsserver.idl index 86a8a14f13..86a8a14f13 100644 --- a/source4/librpc/idl/dnsserver.idl +++ b/librpc/idl/dnsserver.idl diff --git a/source4/librpc/idl/dsbackup.idl b/librpc/idl/dsbackup.idl index 72e8bf9c2b..72e8bf9c2b 100644 --- a/source4/librpc/idl/dsbackup.idl +++ b/librpc/idl/dsbackup.idl diff --git a/source3/librpc/idl/dssetup.idl b/librpc/idl/dssetup.idl index 14de9f7633..14de9f7633 100644 --- a/source3/librpc/idl/dssetup.idl +++ b/librpc/idl/dssetup.idl diff --git a/source3/librpc/idl/echo.idl b/librpc/idl/echo.idl index bf1e318674..bf1e318674 100644 --- a/source3/librpc/idl/echo.idl +++ b/librpc/idl/echo.idl diff --git a/source4/librpc/idl/efs.idl b/librpc/idl/efs.idl index 4279b08d13..4279b08d13 100644 --- a/source4/librpc/idl/efs.idl +++ b/librpc/idl/efs.idl diff --git a/source4/librpc/idl/frsapi.idl b/librpc/idl/frsapi.idl index 11593f479a..11593f479a 100644 --- a/source4/librpc/idl/frsapi.idl +++ b/librpc/idl/frsapi.idl diff --git a/source4/librpc/idl/frsrpc.idl b/librpc/idl/frsrpc.idl index 1019a25b28..1019a25b28 100644 --- a/source4/librpc/idl/frsrpc.idl +++ b/librpc/idl/frsrpc.idl diff --git a/source3/librpc/idl/idl_types.h b/librpc/idl/idl_types.h index 9885ca5bf6..9885ca5bf6 100644 --- a/source3/librpc/idl/idl_types.h +++ b/librpc/idl/idl_types.h diff --git a/source4/librpc/idl/keysvc.idl b/librpc/idl/keysvc.idl index 9d05f7d8dc..9d05f7d8dc 100644 --- a/source4/librpc/idl/keysvc.idl +++ b/librpc/idl/keysvc.idl diff --git a/source4/librpc/idl/mgmt.idl b/librpc/idl/mgmt.idl index 35857f26cd..35857f26cd 100644 --- a/source4/librpc/idl/mgmt.idl +++ b/librpc/idl/mgmt.idl diff --git a/source3/librpc/idl/misc.idl b/librpc/idl/misc.idl index ff548fe804..ff548fe804 100644 --- a/source3/librpc/idl/misc.idl +++ b/librpc/idl/misc.idl diff --git a/source4/librpc/idl/msgsvc.idl b/librpc/idl/msgsvc.idl index d196daf06b..d196daf06b 100644 --- a/source4/librpc/idl/msgsvc.idl +++ b/librpc/idl/msgsvc.idl diff --git a/source3/librpc/idl/notify.idl b/librpc/idl/notify.idl index 6f9ad25f09..3ce2f40ed8 100644 --- a/source3/librpc/idl/notify.idl +++ b/librpc/idl/notify.idl @@ -7,7 +7,7 @@ the change notify buffers */ -import "misc.idl"; +import "security.idl"; [ pointer_default(unique) diff --git a/source4/librpc/idl/orpc.idl b/librpc/idl/orpc.idl index d023865035..d023865035 100644 --- a/source4/librpc/idl/orpc.idl +++ b/librpc/idl/orpc.idl diff --git a/source4/librpc/idl/oxidresolver.idl b/librpc/idl/oxidresolver.idl index 95c8a1c5f0..95c8a1c5f0 100644 --- a/source4/librpc/idl/oxidresolver.idl +++ b/librpc/idl/oxidresolver.idl diff --git a/source4/librpc/idl/policyagent.idl b/librpc/idl/policyagent.idl index ab137faf27..ab137faf27 100644 --- a/source4/librpc/idl/policyagent.idl +++ b/librpc/idl/policyagent.idl diff --git a/source4/librpc/idl/protected_storage.idl b/librpc/idl/protected_storage.idl index 7841f91ca9..7841f91ca9 100644 --- a/source4/librpc/idl/protected_storage.idl +++ b/librpc/idl/protected_storage.idl diff --git a/source4/librpc/idl/remact.idl b/librpc/idl/remact.idl index 2165ecfc81..2165ecfc81 100644 --- a/source4/librpc/idl/remact.idl +++ b/librpc/idl/remact.idl diff --git a/source4/librpc/idl/rot.idl b/librpc/idl/rot.idl index 78eee48807..78eee48807 100644 --- a/source4/librpc/idl/rot.idl +++ b/librpc/idl/rot.idl diff --git a/source3/librpc/idl/security.idl b/librpc/idl/security.idl index c1dfe272e9..6704e300a5 100644 --- a/source3/librpc/idl/security.idl +++ b/librpc/idl/security.idl @@ -106,6 +106,9 @@ interface security const int SEC_ADS_LIST_OBJECT = 0x00000080; const int SEC_ADS_CONTROL_ACCESS = 0x00000100; + /* invalid bits */ + const int SEC_MASK_INVALID = 0x0ce0fe00; + /* generic->specific mappings for files */ const int SEC_RIGHTS_FILE_READ = SEC_STD_READ_CONTROL | SEC_STD_SYNCHRONIZE | @@ -150,6 +153,7 @@ interface security const string SID_CREATOR_OWNER_DOMAIN = "S-1-3"; const string SID_CREATOR_OWNER = "S-1-3-0"; const string SID_CREATOR_GROUP = "S-1-3-1"; + const string SID_OWNER_RIGHTS = "S-1-3-4"; /* SECURITY_NT_AUTHORITY */ const string NAME_NT_AUTHORITY = "NT AUTHORITY"; @@ -169,9 +173,14 @@ interface security const string SID_NT_TERMINAL_SERVER_USERS = "S-1-5-13"; const string SID_NT_REMOTE_INTERACTIVE = "S-1-5-14"; const string SID_NT_THIS_ORGANISATION = "S-1-5-15"; + const string SID_NT_IUSR = "S-1-5-17"; const string SID_NT_SYSTEM = "S-1-5-18"; const string SID_NT_LOCAL_SERVICE = "S-1-5-19"; const string SID_NT_NETWORK_SERVICE = "S-1-5-20"; + const string SID_NT_DIGEST_AUTHENTICATION = "S-1-5-64-21"; + const string SID_NT_NTLM_AUTHENTICATION = "S-1-5-64-10"; + const string SID_NT_SCHANNEL_AUTHENTICATION = "S-1-5-64-14"; + const string SID_NT_OTHER_ORGANISATION = "S-1-5-1000"; /* SECURITY_BUILTIN_DOMAIN_RID */ const string NAME_BUILTIN = "BUILTIN"; @@ -233,6 +242,7 @@ interface security SEC_PRIV_REMOTE_INTERACTIVE_LOGON = 24 } sec_privilege; + typedef [bitmap8bit] bitmap { SEC_ACE_FLAG_OBJECT_INHERIT = 0x01, SEC_ACE_FLAG_CONTAINER_INHERIT = 0x02, @@ -373,4 +383,12 @@ interface security SECINFO_PROTECTED_SACL = 0x40000000, SECINFO_PROTECTED_DACL = 0x80000000 } security_secinfo; + + typedef [public,bitmap32bit] bitmap { + KERB_ENCTYPE_DES_CBC_CRC = 0x00000001, + KERB_ENCTYPE_DES_CBC_MD5 = 0x00000002, + KERB_ENCTYPE_RC4_HMAC_MD5 = 0x00000004, + KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96 = 0x00000008, + KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96 = 0x00000010 + } kerb_EncTypes; } diff --git a/source3/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl index 6b4b0b8a16..6b4b0b8a16 100644 --- a/source3/librpc/idl/spoolss.idl +++ b/librpc/idl/spoolss.idl diff --git a/source4/librpc/idl/trkwks.idl b/librpc/idl/trkwks.idl index 7f11af189b..7f11af189b 100644 --- a/source4/librpc/idl/trkwks.idl +++ b/librpc/idl/trkwks.idl diff --git a/source4/librpc/idl/unixinfo.idl b/librpc/idl/unixinfo.idl index 6929e86e61..6929e86e61 100644 --- a/source4/librpc/idl/unixinfo.idl +++ b/librpc/idl/unixinfo.idl diff --git a/source4/librpc/idl/w32time.idl b/librpc/idl/w32time.idl index 4839899629..4839899629 100644 --- a/source4/librpc/idl/w32time.idl +++ b/librpc/idl/w32time.idl diff --git a/source4/librpc/idl/wmi.idl b/librpc/idl/wmi.idl index 1f7b5ca1cf..1f7b5ca1cf 100644 --- a/source4/librpc/idl/wmi.idl +++ b/librpc/idl/wmi.idl diff --git a/source4/librpc/idl/wzcsvc.idl b/librpc/idl/wzcsvc.idl index b403c0798c..b403c0798c 100644 --- a/source4/librpc/idl/wzcsvc.idl +++ b/librpc/idl/wzcsvc.idl diff --git a/pidl/lib/Parse/Pidl/ODL.pm b/pidl/lib/Parse/Pidl/ODL.pm index c49cdfb795..b323a6a98a 100644 --- a/pidl/lib/Parse/Pidl/ODL.pm +++ b/pidl/lib/Parse/Pidl/ODL.pm @@ -57,11 +57,18 @@ sub ODL2IDL if ($x->{TYPE} eq "IMPORT") { foreach my $idl_file (@{$x->{PATHS}}) { $idl_file = unmake_str($idl_file); - unless (-f "$basedir/$idl_file") { + my $idl_path = undef; + foreach ($basedir, @$opt_incdirs) { + if (-f "$_/$idl_file") { + $idl_path = "$_/$idl_file"; + last; + } + } + unless ($idl_path) { error($x, "Unable to open include file `$idl_file'"); next; } - my $podl = Parse::Pidl::IDL::parse_file("$basedir/$idl_file", $opt_incdirs); + my $podl = Parse::Pidl::IDL::parse_file($idl_path, $opt_incdirs); if (defined(@$podl)) { require Parse::Pidl::Typelist; @@ -74,7 +81,7 @@ sub ODL2IDL } } } else { - error($x, "Failed to parse $idl_file"); + error($x, "Failed to parse $idl_path"); } } } diff --git a/source3/Makefile.in b/source3/Makefile.in index 234490e048..0329b9eb48 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -1198,14 +1198,16 @@ modules:: SHOWFLAGS $(MODULES) ##################################################################### ## Perl IDL Compiler samba3-idl:: - @IDL_FILES="lsa.idl dfs.idl echo.idl winreg.idl initshutdown.idl \ - srvsvc.idl svcctl.idl eventlog.idl wkssvc.idl netlogon.idl notify.idl \ - epmapper.idl messaging.idl xattr.idl misc.idl samr.idl security.idl \ - dssetup.idl krb5pac.idl ntsvcs.idl libnetapi.idl drsuapi.idl drsblobs.idl \ - nbt.idl" \ - IDL_PATH="librpc/idl" \ - CPP="$(CPP)" PIDL="../pidl/pidl" \ - srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh $(PIDL_ARGS) + @PIDL_ARGS="$(PIDL_ARGS)" CPP="$(CPP)" PIDL="../pidl/pidl" \ + srcdir="$(srcdir)" $(srcdir)/script/build_idl.sh librpc/idl/lsa.idl \ + ../librpc/idl/dfs.idl ../librpc/idl/echo.idl librpc/idl/winreg.idl \ + librpc/idl/initshutdown.idl librpc/idl/srvsvc.idl librpc/idl/svcctl.idl \ + librpc/idl/eventlog.idl librpc/idl/wkssvc.idl librpc/idl/netlogon.idl \ + ../librpc/idl/notify.idl librpc/idl/epmapper.idl librpc/idl/messaging.idl \ + librpc/idl/xattr.idl ../librpc/idl/misc.idl librpc/idl/samr.idl \ + librpc/idl/security.idl ../librpc/idl/dssetup.idl librpc/idl/krb5pac.idl \ + librpc/idl/ntsvcs.idl librpc/idl/libnetapi.idl librpc/idl/drsuapi.idl \ + librpc/idl/drsblobs.idl librpc/idl/nbt.idl ##################################################################### diff --git a/source3/configure.in b/source3/configure.in index 29209fd835..d65d28d0b7 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -350,7 +350,7 @@ AC_CACHE_CHECK([that the C compiler understands negative enum values],samba_cv_C ], samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,samba_cv__CC_NEGATIVE_ENUM_VALUES=no)]) if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then - AC_MSG_WARN([using --unit-enums for pidl]) + AC_MSG_WARN([using --uint-enums for pidl]) PIDL_ARGS="$PIDL_ARGS --uint-enums" fi diff --git a/source3/librpc/gen_ndr/ndr_security.c b/source3/librpc/gen_ndr/ndr_security.c index d54fdb2395..de899241ab 100644 --- a/source3/librpc/gen_ndr/ndr_security.c +++ b/source3/librpc/gen_ndr/ndr_security.c @@ -1024,3 +1024,29 @@ _PUBLIC_ void ndr_print_security_secinfo(struct ndr_print *ndr, const char *name ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_kerb_EncTypes(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_kerb_EncTypes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_kerb_EncTypes(struct ndr_print *ndr, const char *name, uint32_t r) +{ + ndr_print_uint32(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_DES_CBC_CRC", KERB_ENCTYPE_DES_CBC_CRC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_DES_CBC_MD5", KERB_ENCTYPE_DES_CBC_MD5, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_RC4_HMAC_MD5", KERB_ENCTYPE_RC4_HMAC_MD5, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96", KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96", KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96, r); + ndr->depth--; +} + diff --git a/source3/librpc/gen_ndr/ndr_security.h b/source3/librpc/gen_ndr/ndr_security.h index 79bfd78f51..7a2ff74309 100644 --- a/source3/librpc/gen_ndr/ndr_security.h +++ b/source3/librpc/gen_ndr/ndr_security.h @@ -38,4 +38,7 @@ void ndr_print_security_token(struct ndr_print *ndr, const char *name, const str enum ndr_err_code ndr_push_security_secinfo(struct ndr_push *ndr, int ndr_flags, uint32_t r); enum ndr_err_code ndr_pull_security_secinfo(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); void ndr_print_security_secinfo(struct ndr_print *ndr, const char *name, uint32_t r); +enum ndr_err_code ndr_push_kerb_EncTypes(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_kerb_EncTypes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_kerb_EncTypes(struct ndr_print *ndr, const char *name, uint32_t r); #endif /* _HEADER_NDR_security */ diff --git a/source3/librpc/gen_ndr/security.h b/source3/librpc/gen_ndr/security.h index 04655b178e..5b77d76b50 100644 --- a/source3/librpc/gen_ndr/security.h +++ b/source3/librpc/gen_ndr/security.h @@ -59,6 +59,7 @@ #define SEC_ADS_DELETE_TREE ( 0x00000040 ) #define SEC_ADS_LIST_OBJECT ( 0x00000080 ) #define SEC_ADS_CONTROL_ACCESS ( 0x00000100 ) +#define SEC_MASK_INVALID ( 0x0ce0fe00 ) #define SEC_RIGHTS_FILE_READ ( SEC_STD_READ_CONTROL|SEC_STD_SYNCHRONIZE|SEC_FILE_READ_DATA|SEC_FILE_READ_ATTRIBUTE|SEC_FILE_READ_EA ) #define SEC_RIGHTS_FILE_WRITE ( SEC_STD_READ_CONTROL|SEC_STD_SYNCHRONIZE|SEC_FILE_WRITE_DATA|SEC_FILE_WRITE_ATTRIBUTE|SEC_FILE_WRITE_EA|SEC_FILE_APPEND_DATA ) #define SEC_RIGHTS_FILE_EXECUTE ( SEC_STD_SYNCHRONIZE|SEC_STD_READ_CONTROL|SEC_FILE_READ_ATTRIBUTE|SEC_FILE_EXECUTE ) @@ -74,6 +75,7 @@ #define SID_CREATOR_OWNER_DOMAIN ( "S-1-3" ) #define SID_CREATOR_OWNER ( "S-1-3-0" ) #define SID_CREATOR_GROUP ( "S-1-3-1" ) +#define SID_OWNER_RIGHTS ( "S-1-3-4" ) #define NAME_NT_AUTHORITY ( "NT AUTHORITY" ) #define SID_NT_AUTHORITY ( "S-1-5" ) #define SID_NT_DIALUP ( "S-1-5-1" ) @@ -90,9 +92,14 @@ #define SID_NT_TERMINAL_SERVER_USERS ( "S-1-5-13" ) #define SID_NT_REMOTE_INTERACTIVE ( "S-1-5-14" ) #define SID_NT_THIS_ORGANISATION ( "S-1-5-15" ) +#define SID_NT_IUSR ( "S-1-5-17" ) #define SID_NT_SYSTEM ( "S-1-5-18" ) #define SID_NT_LOCAL_SERVICE ( "S-1-5-19" ) #define SID_NT_NETWORK_SERVICE ( "S-1-5-20" ) +#define SID_NT_DIGEST_AUTHENTICATION ( "S-1-5-64-21" ) +#define SID_NT_NTLM_AUTHENTICATION ( "S-1-5-64-10" ) +#define SID_NT_SCHANNEL_AUTHENTICATION ( "S-1-5-64-14" ) +#define SID_NT_OTHER_ORGANISATION ( "S-1-5-1000" ) #define NAME_BUILTIN ( "BUILTIN" ) #define SID_BUILTIN ( "S-1-5-32" ) #define SID_BUILTIN_ADMINISTRATORS ( "S-1-5-32-544" ) @@ -324,4 +331,11 @@ struct security_token { #define SECINFO_PROTECTED_SACL ( 0x40000000 ) #define SECINFO_PROTECTED_DACL ( 0x80000000 ) +/* bitmap kerb_EncTypes */ +#define KERB_ENCTYPE_DES_CBC_CRC ( 0x00000001 ) +#define KERB_ENCTYPE_DES_CBC_MD5 ( 0x00000002 ) +#define KERB_ENCTYPE_RC4_HMAC_MD5 ( 0x00000004 ) +#define KERB_ENCTYPE_AES128_CTS_HMAC_SHA1_96 ( 0x00000008 ) +#define KERB_ENCTYPE_AES256_CTS_HMAC_SHA1_96 ( 0x00000010 ) + #endif /* _HEADER_security */ diff --git a/source3/script/build_idl.sh b/source3/script/build_idl.sh index 75f8612957..34f262ee00 100755 --- a/source3/script/build_idl.sh +++ b/source3/script/build_idl.sh @@ -1,14 +1,14 @@ #!/bin/sh -PIDL_ARGS="--outputdir librpc/gen_ndr --header --ndr-parser --samba3-ndr-server --samba3-ndr-client --" -PIDL_EXTRA_ARGS="$*" +ARGS="--includedir=../librpc/idl --outputdir librpc/gen_ndr --header --ndr-parser --samba3-ndr-server --samba3-ndr-client $PIDL_ARGS --" +IDL_FILES="$*" oldpwd=`pwd` cd ${srcdir} [ -d librpc/gen_ndr ] || mkdir -p librpc/gen_ndr || exit 1 -PIDL="$PIDL ${PIDL_ARGS} ${PIDL_EXTRA_ARGS}" +PIDL="$PIDL $ARGS" ## ## Find newer files rather than rebuild all of them @@ -20,11 +20,11 @@ for f in ${IDL_FILES}; do ndr="librpc/gen_ndr/ndr_$basename.c" if [ -f $ndr ]; then - if [ "x`find ${IDL_PATH}/$f -newer $ndr -print`" = "x${IDL_PATH}/$f" ]; then - list="$list ${IDL_PATH}/$f" + if [ "x`find $f -newer $ndr -print`" = "x$f" ]; then + list="$list $f" fi else - list="$list ${IDL_PATH}/$f" + list="$list $f" fi done diff --git a/source4/cluster/cluster.c b/source4/cluster/cluster.c index cc61974cbd..c09d10900b 100644 --- a/source4/cluster/cluster.c +++ b/source4/cluster/cluster.c @@ -23,6 +23,7 @@ #include "cluster/cluster.h" #include "cluster/cluster_private.h" #include "librpc/gen_ndr/misc.h" +#include "librpc/gen_ndr/security.h" static struct cluster_ops *ops; diff --git a/source4/cluster/ctdb/ctdb_cluster.c b/source4/cluster/ctdb/ctdb_cluster.c index 4f6689a834..51f6d984e7 100644 --- a/source4/cluster/ctdb/ctdb_cluster.c +++ b/source4/cluster/ctdb/ctdb_cluster.c @@ -29,7 +29,7 @@ #include "tdb_wrap.h" #include "../lib/util/dlinklist.h" #include "param/param.h" -#include "librpc/gen_ndr/misc.h" +#include "librpc/gen_ndr/security.h" /* a linked list of messaging handlers, allowing incoming messages to be directed to the right messaging context */ diff --git a/source4/cluster/local.c b/source4/cluster/local.c index f0357f0b07..5b872a3e2e 100644 --- a/source4/cluster/local.c +++ b/source4/cluster/local.c @@ -26,7 +26,7 @@ #include "tdb_wrap.h" #include "system/filesys.h" #include "param/param.h" -#include "librpc/gen_ndr/misc.h" +#include "librpc/gen_ndr/security.h" /* server a server_id for the local node diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk index 02eb0ac310..a4eaae4367 100644 --- a/source4/librpc/config.mk +++ b/source4/librpc/config.mk @@ -364,7 +364,7 @@ NDR_WINBIND_OBJ_FILES = $(gen_ndrsrcdir)/ndr_winbind.o #PUBLIC_HEADERS += $(gen_ndrsrcdir)/winbind.h $(librpcsrcdir)/idl-deps: - $(PERL) $(librpcsrcdir)/idl-deps.pl $(librpcsrcdir)/idl/*.idl >$@ + $(PERL) $(librpcsrcdir)/idl-deps.pl $(filter-out ../librpc/idl/security.idl,$(wildcard $(librpcsrcdir)/idl/*.idl ../librpc/idl/*.idl)) >$@ clean:: rm -f $(librpcsrcdir)/idl-deps @@ -745,9 +745,9 @@ $(IDL_HEADER_FILES) $(IDL_NDR_PARSE_H_FILES) $(IDL_NDR_PARSE_C_FILES) \ $(IDL_NDR_PY_C_FILES) $(IDL_NDR_PY_H_FILES): idl idl_full:: $(pidldir)/lib/Parse/Pidl/IDL.pm $(pidldir)/lib/Parse/Pidl/Expr.pm - @CPP="$(CPP)" PIDL="$(PIDL)" $(librpcsrcdir)/scripts/build_idl.sh FULL $(librpcsrcdir)/idl $(librpcsrcdir)/gen_ndr + @CPP="$(CPP)" PIDL="$(PIDL)" $(librpcsrcdir)/scripts/build_idl.sh FULL $(librpcsrcdir)/gen_ndr $(IDL_FILES) idl:: $(pidldir)/lib/Parse/Pidl/IDL.pm $(pidldir)/lib/Parse/Pidl/Expr.pm - @CPP="$(CPP)" PIDL="$(PIDL)" $(librpcsrcdir)/scripts/build_idl.sh PARTIAL $(librpcsrcdir)/idl $(librpcsrcdir)/gen_ndr + @CPP="$(CPP)" PIDL="$(PIDL)" $(librpcsrcdir)/scripts/build_idl.sh PARTIAL $(librpcsrcdir)/gen_ndr $(IDL_FILES) diff --git a/source4/librpc/idl-deps.pl b/source4/librpc/idl-deps.pl index 49fba4c935..44990c5196 100755 --- a/source4/librpc/idl-deps.pl +++ b/source4/librpc/idl-deps.pl @@ -4,8 +4,9 @@ use strict; my %vars = (); foreach(@ARGV) { + my $f = $_; my $b = $_; $b =~ s/.*\/(.*?).idl$/$1/; - push (@{$vars{IDL_FILES}}, "\$(librpcsrcdir)/idl/$b.idl"); + push (@{$vars{IDL_FILES}}, $f); push (@{$vars{IDL_HEADER_FILES}}, "\$(librpcsrcdir)/gen_ndr/$b.h"); push (@{$vars{IDL_NDR_PARSE_H_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b.h"); push (@{$vars{IDL_NDR_PARSE_C_FILES}}, "\$(librpcsrcdir)/gen_ndr/ndr_$b.c"); diff --git a/source4/librpc/idl/dfs.idl b/source4/librpc/idl/dfs.idl deleted file mode 100644 index 1b145f3dfa..0000000000 --- a/source4/librpc/idl/dfs.idl +++ /dev/null @@ -1,419 +0,0 @@ -/* - dfs interface definition -*/ - -import "misc.idl"; - -[ uuid("4fc742e0-4a10-11cf-8273-00aa004ae673"), - version(3.0), - pointer_default(unique), - helpstring("Settings for Microsoft Distributed File System"), - endpoint("ncacn_np:[\\pipe\\netdfs]", "ncacn_ip_tcp:", "ncalrpc:") -] interface netdfs -{ - /******************/ - /* Function: 0x00 */ - typedef [v1_enum] enum { - DFS_MANAGER_VERSION_NT4 = 1, - DFS_MANAGER_VERSION_W2K = 2, - DFS_MANAGER_VERSION_W2K3 = 4, - DFS_MANAGER_VERSION_W2K8 = 6 - } dfs_ManagerVersion; - - [public] void dfs_GetManagerVersion( - [out] dfs_ManagerVersion *version - ); - - - /******************/ - /* Function: 0x01 */ - WERROR dfs_Add ( - [in] [string,charset(UTF16)] uint16 *path, - [in] [string,charset(UTF16)] uint16 *server, - [in,unique] [string,charset(UTF16)] uint16 *share, - [in,unique] [string,charset(UTF16)] uint16 *comment, - [in] uint32 flags - ); - - /******************/ - /* Function: 0x02 */ - WERROR dfs_Remove ( - [in] [string,charset(UTF16)] uint16 *dfs_entry_path, - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in,unique] [string,charset(UTF16)] uint16 *sharename - ); - - /******************/ - /* Function: 0x03 */ - - typedef struct { - } dfs_Info0; - - typedef struct { - [string,charset(UTF16)] uint16 *path; - } dfs_Info1; - - typedef [public,bitmap32bit] bitmap { - DFS_VOLUME_STATE_OK = 0x1, - DFS_VOLUME_STATE_INCONSISTENT = 0x2, - DFS_VOLUME_STATE_OFFLINE = 0x3, - DFS_VOLUME_STATE_ONLINE = 0x4, - DFS_VOLUME_STATE_STANDALONE = DFS_VOLUME_FLAVOR_STANDALONE, - DFS_VOLUME_STATE_AD_BLOB = DFS_VOLUME_FLAVOR_AD_BLOB - } dfs_VolumeState; - - typedef struct { - [string,charset(UTF16)] uint16 *path; - [string,charset(UTF16)] uint16 *comment; - dfs_VolumeState state; - uint32 num_stores; - } dfs_Info2; - - const int DFS_STORAGE_STATES = 0xf; - - /* yes, this is a bitmap */ - typedef [public,bitmap32bit] bitmap { - DFS_STORAGE_STATE_OFFLINE = 1, - DFS_STORAGE_STATE_ONLINE = 2, - DFS_STORAGE_STATE_ACTIVE = 4 - } dfs_StorageState; - - typedef struct { - dfs_StorageState state; - [string,charset(UTF16)] uint16 *server; - [string,charset(UTF16)] uint16 *share; - } dfs_StorageInfo; - - typedef struct { - [string,charset(UTF16)] uint16 *path; - [string,charset(UTF16)] uint16 *comment; - dfs_VolumeState state; - uint32 num_stores; - [size_is(num_stores)] dfs_StorageInfo *stores; - } dfs_Info3; - - typedef struct { - [string,charset(UTF16)] uint16 *path; - [string,charset(UTF16)] uint16 *comment; - dfs_VolumeState state; - uint32 timeout; - GUID guid; - uint32 num_stores; - [size_is(num_stores)] dfs_StorageInfo *stores; - } dfs_Info4; - - /* verified with dfsutil */ - typedef [public,bitmap32bit] bitmap { - DFS_PROPERTY_FLAG_INSITE_REFERRALS = 0x01, - DFS_PROPERTY_FLAG_ROOT_SCALABILITY = 0x02, - DFS_PROPERTY_FLAG_SITE_COSTING = 0x04, - DFS_PROPERTY_FLAG_TARGET_FAILBACK = 0x08, - DFS_PROPERTY_FLAG_CLUSTER_ENABLED = 0x10 /* untested */ - } dfs_PropertyFlags; - - typedef struct { - [string,charset(UTF16)] uint16 *path; - [string,charset(UTF16)] uint16 *comment; - dfs_VolumeState state; - uint32 timeout; - GUID guid; - dfs_PropertyFlags flags; - uint32 pktsize; - uint32 num_stores; - } dfs_Info5; - - typedef [v1_enum] enum { - DFS_INVALID_PRIORITY_CLASS = -1, - DFS_SITE_COST_NORMAL_PRIORITY_CLASS = 0, - DFS_GLOBAL_HIGH_PRIORITY_CLASS = 1, - DFS_SITE_COST_HIGH_PRIORITY_CLASS = 2, - DFS_SITE_COST_LOW_PRIORITY_CLASS = 3, - DFS_GLOBAL_LOW_PRIORITY_CLASS = 4 - } dfs_Target_PriorityClass; - - typedef struct { - dfs_Target_PriorityClass target_priority_class; - uint16 target_priority_rank; - uint16 reserved; - } dfs_Target_Priority; - - typedef struct { - dfs_StorageInfo info; - dfs_Target_Priority target_priority; - } dfs_StorageInfo2; - - typedef struct { - [string,charset(UTF16)] uint16 *entry_path; - [string,charset(UTF16)] uint16 *comment; - dfs_VolumeState state; - uint32 timeout; - GUID guid; - dfs_PropertyFlags flags; - uint32 pktsize; - uint16 num_stores; - [size_is(num_stores)] dfs_StorageInfo2 *stores; - } dfs_Info6; - - typedef struct { - GUID generation_guid; - } dfs_Info7; - - typedef struct { - [string,charset(UTF16)] uint16 *comment; - } dfs_Info100; - - typedef struct { - dfs_StorageState state; - } dfs_Info101; - - typedef struct { - uint32 timeout; - } dfs_Info102; - - typedef struct { - dfs_PropertyFlags flags; - } dfs_Info103; - - typedef struct { - dfs_Target_Priority priority; - } dfs_Info104; - - typedef struct { - [string,charset(UTF16)] uint16 *comment; - dfs_VolumeState state; - uint32 timeout; - uint32 property_flag_mask; - uint32 property_flags; - } dfs_Info105; - - typedef struct { - dfs_StorageState state; - dfs_Target_Priority priority; - } dfs_Info106; - - typedef struct { - [string,charset(UTF16)] uint16 *dom_root; - } dfs_Info200; - - typedef enum { - DFS_VOLUME_FLAVOR_STANDALONE = 0x100, - DFS_VOLUME_FLAVOR_AD_BLOB = 0x200 - } dfs_VolumeFlavor; - - typedef struct { - dfs_VolumeFlavor flavor; - [string,charset(UTF16)] uint16 *dom_root; - } dfs_Info300; - - typedef union { - [case(0)] dfs_Info0 *info0; - [case(1)] dfs_Info1 *info1; - [case(2)] dfs_Info2 *info2; - [case(3)] dfs_Info3 *info3; - [case(4)] dfs_Info4 *info4; - [case(5)] dfs_Info5 *info5; - [case(6)] dfs_Info6 *info6; - [case(7)] dfs_Info7 *info7; - [case(100)] dfs_Info100 *info100; - [case(101)] dfs_Info101 *info101; - [case(102)] dfs_Info102 *info102; - [case(103)] dfs_Info103 *info103; - [case(104)] dfs_Info104 *info104; - [case(105)] dfs_Info105 *info105; - [case(106)] dfs_Info106 *info106; - } dfs_Info; - - WERROR dfs_SetInfo ( - [in] [string,charset(UTF16)] uint16 dfs_entry_path[], - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in,unique] [string,charset(UTF16)] uint16 *sharename, - [in] uint32 level, - [in,ref,switch_is(level)] dfs_Info *info - ); - - /******************/ - /* Function: 0x04 */ - WERROR dfs_GetInfo ( - [in] [string,charset(UTF16)] uint16 dfs_entry_path[], - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in,unique] [string,charset(UTF16)] uint16 *sharename, - [in] uint32 level, - [out,switch_is(level)] dfs_Info *info - ); - - /******************/ - /* Function: 0x05 */ - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info1 *s; - } dfs_EnumArray1; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info2 *s; - } dfs_EnumArray2; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info3 *s; - } dfs_EnumArray3; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info4 *s; - } dfs_EnumArray4; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info5 *s; - } dfs_EnumArray5; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info6 *s; - } dfs_EnumArray6; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info200 *s; - } dfs_EnumArray200; - - typedef struct { - uint32 count; - [size_is(count)] dfs_Info300 *s; - } dfs_EnumArray300; - - - typedef union { - [case(1)] dfs_EnumArray1 *info1; - [case(2)] dfs_EnumArray2 *info2; - [case(3)] dfs_EnumArray3 *info3; - [case(4)] dfs_EnumArray4 *info4; - [case(5)] dfs_EnumArray5 *info5; - [case(6)] dfs_EnumArray6 *info6; - [case(200)] dfs_EnumArray200 *info200; - [case(300)] dfs_EnumArray300 *info300; - } dfs_EnumInfo; - - typedef struct { - uint32 level; - [switch_is(level)] dfs_EnumInfo e; - } dfs_EnumStruct; - - WERROR dfs_Enum ( - [in] uint32 level, - [in] uint32 bufsize, - [in,out,unique] dfs_EnumStruct *info, - [in,out,unique] uint32 *total - ); - - /* Function 0x06 */ - [todo] WERROR dfs_Rename(); - - /* Function 0x07 */ - [todo] WERROR dfs_Move(); - - /* Function 0x08 */ - [todo] WERROR dfs_ManagerGetConfigInfo(); - - /* Function 0x09 */ - [todo] WERROR dfs_ManagerSendSiteInfo(); - - /* Function 0x0a */ - typedef struct { - uint32 unknown1; - [string,charset(UTF16)] uint16 *unknown2; - } dfs_UnknownStruct; - - WERROR dfs_AddFtRoot( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 dns_servername[], - [in] [string,charset(UTF16)] uint16 dfsname[], - [in] [string,charset(UTF16)] uint16 rootshare[], - [in] [string,charset(UTF16)] uint16 comment[], - [in] [string,charset(UTF16)] uint16 dfs_config_dn[], - [in] uint8 unknown1, - [in] uint32 flags, - [in,out,unique] dfs_UnknownStruct **unknown2 - ); - - /* Function 0x0b */ - WERROR dfs_RemoveFtRoot( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 dns_servername[], - [in] [string,charset(UTF16)] uint16 dfsname[], - [in] [string,charset(UTF16)] uint16 rootshare[], - [in] uint32 flags, - [in,out,unique] dfs_UnknownStruct **unknown - ); - - /* Function 0x0c */ - WERROR dfs_AddStdRoot( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 rootshare[], - [in] [string,charset(UTF16)] uint16 comment[], - [in] uint32 flags - ); - - /* Function 0x0d */ - WERROR dfs_RemoveStdRoot( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 rootshare[], - [in] uint32 flags - ); - - /* Function 0x0e */ - WERROR dfs_ManagerInitialize( - [in] [string,charset(UTF16)] uint16 *servername, - [in] uint32 flags - ); - - /* Function 0x0f */ - WERROR dfs_AddStdRootForced( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 rootshare[], - [in] [string,charset(UTF16)] uint16 comment[], - [in] [string,charset(UTF16)] uint16 store[] /* C:\\whatever */ - ); - - /* Function 0x10 */ - WERROR dfs_GetDcAddress( - [in] [string,charset(UTF16)] uint16 servername[], - [in,out,ref] [string,charset(UTF16)] uint16 **server_fullname, - [in,out,ref] boolean8 *is_root, - [in,out,ref] uint32 *ttl - ); - - /* Function 0x11 */ - WERROR dfs_SetDcAddress( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 server_fullname[], - [in] uint32 flags, - [in] uint32 ttl - ); - - /* Function 0x12 */ - WERROR dfs_FlushFtTable( - [in] [string,charset(UTF16)] uint16 servername[], - [in] [string,charset(UTF16)] uint16 rootshare[] - ); - - /* Function 0x13 */ - [todo] WERROR dfs_Add2(); - - /* Function 0x14 */ - [todo] WERROR dfs_Remove2(); - - /* Function 0x15 */ - [public] WERROR dfs_EnumEx( - [in] [string,charset(UTF16)] uint16 dfs_name[], - [in] uint32 level, - [in] uint32 bufsize, - [in,out,unique] dfs_EnumStruct *info, - [in,out,unique] uint32 *total - ); - - /* Function 0x16 */ - [todo] WERROR dfs_SetInfo2(); -} diff --git a/source4/librpc/idl/dssetup.idl b/source4/librpc/idl/dssetup.idl deleted file mode 100644 index 14de9f7633..0000000000 --- a/source4/librpc/idl/dssetup.idl +++ /dev/null @@ -1,101 +0,0 @@ -/* - dssetup interface definition -*/ - -import "misc.idl"; - -[ - uuid("3919286a-b10c-11d0-9ba8-00c04fd92ef5"), - version(0.0), - endpoint("ncacn_np:[\\pipe\\lsarpc]", "ncacn_np:[\\pipe\\lsass]", "ncacn_ip_tcp:", "ncalrpc:"), - pointer_default(unique), - helpstring("Active Directory Setup") -] interface dssetup -{ - /**********************************************/ - /* Function 0x00 */ - - typedef enum { - DS_ROLE_STANDALONE_WORKSTATION = 0, - DS_ROLE_MEMBER_WORKSTATION = 1, - DS_ROLE_STANDALONE_SERVER = 2, - DS_ROLE_MEMBER_SERVER = 3, - DS_ROLE_BACKUP_DC = 4, - DS_ROLE_PRIMARY_DC = 5 - } dssetup_DsRole; - - typedef [bitmap32bit] bitmap { - DS_ROLE_PRIMARY_DS_RUNNING = 0x00000001, - DS_ROLE_PRIMARY_DS_MIXED_MODE = 0x00000002, - DS_ROLE_UPGRADE_IN_PROGRESS = 0x00000004, - DS_ROLE_PRIMARY_DOMAIN_GUID_PRESENT = 0x01000000 - } dssetup_DsRoleFlags; - - typedef struct { - dssetup_DsRole role; - dssetup_DsRoleFlags flags; - [charset(UTF16),string] uint16 *domain; - [charset(UTF16),string] uint16 *dns_domain; - [charset(UTF16),string] uint16 *forest; - GUID domain_guid; - } dssetup_DsRolePrimaryDomInfoBasic; - - typedef [v1_enum] enum { - DS_ROLE_NOT_UPGRADING = 0, - DS_ROLE_UPGRADING = 1 - } dssetup_DsUpgrade; - - typedef enum { - DS_ROLE_PREVIOUS_UNKNOWN = 0, - DS_ROLE_PREVIOUS_PRIMARY = 1, - DS_ROLE_PREVIOUS_BACKUP = 2 - } dssetup_DsPrevious; - - typedef struct { - dssetup_DsUpgrade upgrading; - dssetup_DsPrevious previous_role; - } dssetup_DsRoleUpgradeStatus; - - typedef enum { - DS_ROLE_OP_IDLE = 0, - DS_ROLE_OP_ACTIVE = 1, - DS_ROLE_OP_NEEDS_REBOOT = 2 - } dssetup_DsRoleOp; - - typedef struct { - dssetup_DsRoleOp status; - } dssetup_DsRoleOpStatus; - - typedef enum { - DS_ROLE_BASIC_INFORMATION = 1, - DS_ROLE_UPGRADE_STATUS = 2, - DS_ROLE_OP_STATUS = 3 - } dssetup_DsRoleInfoLevel; - - typedef [switch_type(dssetup_DsRoleInfoLevel)] union { - [case(DS_ROLE_BASIC_INFORMATION)] dssetup_DsRolePrimaryDomInfoBasic basic; - [case(DS_ROLE_UPGRADE_STATUS)] dssetup_DsRoleUpgradeStatus upgrade; - [case(DS_ROLE_OP_STATUS)] dssetup_DsRoleOpStatus opstatus; - } dssetup_DsRoleInfo; - - WERROR dssetup_DsRoleGetPrimaryDomainInformation( - [in] dssetup_DsRoleInfoLevel level, - [out,switch_is(level),unique] dssetup_DsRoleInfo *info - ); - - /* - w2k3 has removed all the calls below from their implementation. - These stubs are left here only as a way of documenting the names - of the calls in case they ever turn up on the wire. - */ - [todo] WERROR dssetup_DsRoleDnsNameToFlatName(); - [todo] WERROR dssetup_DsRoleDcAsDc(); - [todo] WERROR dssetup_DsRoleDcAsReplica(); - [todo] WERROR dssetup_DsRoleDemoteDc(); - [todo] WERROR dssetup_DsRoleGetDcOperationProgress(); - [todo] WERROR dssetup_DsRoleGetDcOperationResults(); - [todo] WERROR dssetup_DsRoleCancel(); - [todo] WERROR dssetup_DsRoleServerSaveStateForUpgrade(); - [todo] WERROR dssetup_DsRoleUpgradeDownlevelServer(); - [todo] WERROR dssetup_DsRoleAbortDownlevelServerUpgrade(); -} diff --git a/source4/librpc/idl/echo.idl b/source4/librpc/idl/echo.idl deleted file mode 100644 index bf1e318674..0000000000 --- a/source4/librpc/idl/echo.idl +++ /dev/null @@ -1,127 +0,0 @@ - -[ - uuid("60a15ec5-4de8-11d7-a637-005056a20182"), - endpoint("ncacn_np:[\\pipe\\rpcecho]", "ncacn_ip_tcp:", "ncalrpc:"), - pointer_default(unique), - version(1.0), - helpstring("Simple echo pipe") -] -interface rpcecho -{ - /* Add one to an integer */ - void echo_AddOne( - [in] uint32 in_data, - [out] uint32 *out_data - ); - /* Echo an array of bytes back at the caller */ - void echo_EchoData( - [in] uint32 len, - [in] [size_is(len)] uint8 in_data[], - [out] [size_is(len)] uint8 out_data[] - ); - /* Sink data to the server */ - void echo_SinkData( - [in] uint32 len, - [in,size_is(len)] uint8 data[] - ); - /* Source data from server */ - void echo_SourceData( - [in] uint32 len, - [out,size_is(len)] uint8 data[] - ); - - /* test strings */ - void echo_TestCall ( - [in,string,charset(UTF16)] uint16 *s1, - [out,string,charset(UTF16)] uint16 **s2 - ); - - - /* test some alignment issues */ - typedef [public] struct { - uint8 v; - } echo_info1; - - typedef struct { - uint16 v; - } echo_info2; - - typedef struct { - uint32 v; - } echo_info3; - - struct echo_info4 { - hyper v; - }; - - typedef struct { - uint8 v1; - hyper v2; - } echo_info5; - - typedef struct { - uint8 v1; - echo_info1 info1; - } echo_info6; - - typedef struct { - uint8 v1; - struct echo_info4 info4; - } echo_info7; - - typedef [switch_type(uint16)] union { - [case(1)] echo_info1 info1; - [case(2)] echo_info2 info2; - [case(3)] echo_info3 info3; - [case(4)] struct echo_info4 info4; - [case(5)] echo_info5 info5; - [case(6)] echo_info6 info6; - [case(7)] echo_info7 info7; - } echo_Info; - - NTSTATUS echo_TestCall2 ( - [in] uint16 level, - [out,switch_is(level)] echo_Info *info - ); - - uint32 echo_TestSleep( - [in] uint32 seconds - ); - - typedef enum { - ECHO_ENUM1 = 1, - ECHO_ENUM2 = 2 - } echo_Enum1; - - typedef [v1_enum] enum { - ECHO_ENUM1_32 = 1, - ECHO_ENUM2_32 = 2 - } echo_Enum1_32; - - typedef struct { - echo_Enum1 e1; - echo_Enum1_32 e2; - } echo_Enum2; - - typedef [switch_type(uint16)] union { - [case(ECHO_ENUM1)] echo_Enum1 e1; - [case(ECHO_ENUM2)] echo_Enum2 e2; - } echo_Enum3; - - void echo_TestEnum( - [in,out,ref] echo_Enum1 *foo1, - [in,out,ref] echo_Enum2 *foo2, - [in,out,ref,switch_is(*foo1)] echo_Enum3 *foo3 - ); - - typedef struct { - uint32 x; - [size_is(x)] uint16 surrounding[*]; - } echo_Surrounding; - - void echo_TestSurrounding( - [in,out,ref] echo_Surrounding *data - ); - - uint16 echo_TestDoublePointer([in] uint16 ***data); -} diff --git a/source4/librpc/idl/idl_types.h b/source4/librpc/idl/idl_types.h deleted file mode 100644 index 9885ca5bf6..0000000000 --- a/source4/librpc/idl/idl_types.h +++ /dev/null @@ -1,69 +0,0 @@ -#define STR_ASCII LIBNDR_FLAG_STR_ASCII -#define STR_LEN4 LIBNDR_FLAG_STR_LEN4 -#define STR_SIZE4 LIBNDR_FLAG_STR_SIZE4 -#define STR_SIZE2 LIBNDR_FLAG_STR_SIZE2 -#define STR_NOTERM LIBNDR_FLAG_STR_NOTERM -#define STR_NULLTERM LIBNDR_FLAG_STR_NULLTERM -#define STR_BYTESIZE LIBNDR_FLAG_STR_BYTESIZE -#define STR_CONFORMANT LIBNDR_FLAG_STR_CONFORMANT -#define STR_CHARLEN LIBNDR_FLAG_STR_CHARLEN -#define STR_UTF8 LIBNDR_FLAG_STR_UTF8 - -/* - a null terminated UCS2 string -*/ -#define nstring [flag(STR_NULLTERM)] string - -/* - an ascii string prefixed with [offset] [length], both 32 bits - null terminated -*/ -#define ascstr2 [flag(STR_ASCII|STR_LEN4)] string - -/* - an ascii string prefixed with [size], 32 bits -*/ -#define asclstr [flag(STR_ASCII|STR_SIZE4)] string - -/* - an ascii string prefixed with [size], 16 bits - null terminated -*/ -#define ascstr3 [flag(STR_ASCII|STR_SIZE2)] string - -/* - an ascii string prefixed with [size] [offset] [length], all 32 bits - not null terminated -*/ -#define ascstr_noterm [flag(STR_NOTERM|STR_ASCII|STR_SIZE4|STR_LEN4)] string - -/* - a null terminated ascii string -*/ -#define astring [flag(STR_ASCII|STR_NULLTERM)] string - -/* - a null terminated UTF8 string -*/ -#define utf8string [flag(STR_UTF8|STR_NULLTERM)] string - -/* - a null terminated UCS2 string -*/ -#define nstring_array [flag(STR_NULLTERM)] string_array - -#define NDR_NOALIGN LIBNDR_FLAG_NOALIGN -#define NDR_REMAINING LIBNDR_FLAG_REMAINING -#define NDR_ALIGN2 LIBNDR_FLAG_ALIGN2 -#define NDR_ALIGN4 LIBNDR_FLAG_ALIGN4 -#define NDR_ALIGN8 LIBNDR_FLAG_ALIGN8 - -/* this flag is used to force a section of IDL as little endian. It is - needed for the epmapper IDL, which is defined as always being LE */ -#define NDR_LITTLE_ENDIAN LIBNDR_FLAG_LITTLE_ENDIAN -#define NDR_BIG_ENDIAN LIBNDR_FLAG_BIGENDIAN - -/* - this is used to control formatting of uint8 arrays -*/ -#define NDR_PAHEX LIBNDR_PRINT_ARRAY_HEX diff --git a/source4/librpc/idl/misc.idl b/source4/librpc/idl/misc.idl deleted file mode 100644 index 791b86466c..0000000000 --- a/source4/librpc/idl/misc.idl +++ /dev/null @@ -1,60 +0,0 @@ -/* - miscellaneous IDL structures -*/ - - -[ - pointer_default(unique) -] -interface misc -{ - typedef [public,noprint,gensize,noejs] struct { - uint32 time_low; - uint16 time_mid; - uint16 time_hi_and_version; - uint8 clock_seq[2]; - uint8 node[6]; - } GUID; - - typedef [public] struct { - GUID uuid; - uint32 if_version; - } ndr_syntax_id; - - typedef [public] struct { - uint32 handle_type; - GUID uuid; - } policy_handle; - - /* secure channel types */ - /* Only SEC_CHAN_WKSTA can forward requests to other domains. */ - - typedef [public] enum { - SEC_CHAN_NULL = 0, - SEC_CHAN_WKSTA = 2, - SEC_CHAN_DNS_DOMAIN = 3, - SEC_CHAN_DOMAIN = 4, - SEC_CHAN_BDC = 6 - } netr_SchannelType; - - /* SAM database types */ - typedef [public,v1_enum] enum { - SAM_DATABASE_DOMAIN = 0, /* Domain users and groups */ - SAM_DATABASE_BUILTIN = 1, /* BUILTIN users and groups */ - SAM_DATABASE_PRIVS = 2 /* Privileges */ - } netr_SamDatabaseID; - - typedef [public,v1_enum] enum { - SAMR_REJECT_OTHER = 0, - SAMR_REJECT_TOO_SHORT = 1, - SAMR_REJECT_IN_HISTORY = 2, - SAMR_REJECT_COMPLEXITY = 5 - } samr_RejectReason; - - /* id used to identify a endpoint, possibly in a cluster */ - typedef [public] struct { - hyper id; - uint32 id2; - uint32 node; - } server_id; -} diff --git a/source4/librpc/idl/notify.idl b/source4/librpc/idl/notify.idl deleted file mode 100644 index 6f9ad25f09..0000000000 --- a/source4/librpc/idl/notify.idl +++ /dev/null @@ -1,58 +0,0 @@ -#include "idl_types.h" - -/* - IDL structures for notify change code - - this defines the structures used in the notify database code, and - the change notify buffers -*/ - -import "misc.idl"; - -[ - pointer_default(unique) -] -interface notify -{ - - /* structure used in the notify database */ - typedef [public] struct { - server_id server; - uint32 filter; /* filter to apply in this directory */ - uint32 subdir_filter; /* filter to apply in child directories */ - utf8string path; - uint32 path_len; /* saves some computation on search */ - pointer private_data; - } notify_entry; - - /* - to allow for efficient search for matching entries, we - divide them by the directory depth, with a separate array - per depth. The entries within each depth are sorted by path, - allowing for a bisection search. - - The max_mask and max_mask_subdir at each depth is the - bitwise or of the filters and subdir filters for all entries - at that depth. This allows a depth to be quickly skipped if - no entries will match the target filter - */ - typedef struct { - uint32 max_mask; - uint32 max_mask_subdir; - uint32 num_entries; - notify_entry entries[num_entries]; - } notify_depth; - - typedef [public] struct { - uint32 num_depths; - notify_depth depth[num_depths]; - } notify_array; - - /* structure sent between servers in notify messages */ - typedef [public] struct { - uint32 action; - utf8string path; - pointer private_data; - } notify_event; - -} diff --git a/source4/librpc/idl/opendb.idl b/source4/librpc/idl/opendb.idl index cdbaa6cb1b..265cfaf7ad 100644 --- a/source4/librpc/idl/opendb.idl +++ b/source4/librpc/idl/opendb.idl @@ -7,7 +7,7 @@ ntvfs/common/opendb.c */ -import "misc.idl"; +import "security.idl"; [ pointer_default(unique) diff --git a/source4/librpc/idl/security.idl b/source4/librpc/idl/security.idl index ac7641c0af..40aa698176 100644 --- a/source4/librpc/idl/security.idl +++ b/source4/librpc/idl/security.idl @@ -252,6 +252,13 @@ interface security uint32 sub_auths[num_auths]; } dom_sid; + /* id used to identify a endpoint, possibly in a cluster */ + typedef [public] struct { + hyper id; + uint32 id2; + uint32 node; + } server_id; + typedef [bitmap8bit] bitmap { SEC_ACE_FLAG_OBJECT_INHERIT = 0x01, SEC_ACE_FLAG_CONTAINER_INHERIT = 0x02, diff --git a/source4/librpc/idl/spoolss.idl b/source4/librpc/idl/spoolss.idl deleted file mode 100644 index 6b4b0b8a16..0000000000 --- a/source4/librpc/idl/spoolss.idl +++ /dev/null @@ -1,1571 +0,0 @@ -#include "idl_types.h" - -/* - spoolss interface definitions -*/ -import "misc.idl", "security.idl", "winreg.idl"; - -[ uuid("12345678-1234-abcd-ef00-0123456789ab"), - version(1.0), - endpoint("ncacn_np:[\\pipe\\spoolss]"), - pointer_default(unique), - helpstring("Spooler SubSystem"), - helper("librpc/ndr/ndr_spoolss_buf.h") -] interface spoolss -{ - typedef [v1_enum] enum winreg_Type winreg_Type; - typedef struct { - uint16 year; - uint16 month; - uint16 day_of_week; - uint16 day; - uint16 hour; - uint16 minute; - uint16 second; - uint16 millisecond; - } spoolss_Time; - - typedef struct { - [relative] nstring *printername; - [relative] nstring *servername; - uint32 cjobs; - uint32 total_jobs; - uint32 total_bytes; - spoolss_Time time; - uint32 global_counter; - uint32 total_pages; - uint32 version; - uint32 unknown10; - uint32 unknown11; - uint32 unknown12; - uint32 session_counter; - uint32 unknown14; - uint32 printer_errors; - uint32 unknown16; - uint32 unknown17; - uint32 unknown18; - uint32 unknown19; - uint32 change_id; - uint32 unknown21; - uint32 status; - uint32 unknown23; - uint32 c_setprinter; - uint16 unknown25; - uint16 unknown26; - uint32 unknown27; - uint32 unknown28; - uint32 unknown29; - } spoolss_PrinterInfo0; - - typedef [public,gensize] struct { - [charset(UTF16)] uint16 devicename[32]; - uint16 specversion; - uint16 driverversion; - uint16 size; - [value(r->driverextra_data.length)] uint16 __driverextra_length; - uint32 fields; - uint16 orientation; - uint16 papersize; - uint16 paperlength; - uint16 paperwidth; - uint16 scale; - uint16 copies; - uint16 defaultsource; - uint16 printquality; - uint16 color; - uint16 duplex; - uint16 yresolution; - uint16 ttoption; - uint16 collate; - [charset(UTF16)] uint16 formname[32]; - uint16 logpixels; - uint32 bitsperpel; - uint32 pelswidth; - uint32 pelsheight; - uint32 displayflags; - uint32 displayfrequency; - uint32 icmmethod; - uint32 icmintent; - uint32 mediatype; - uint32 dithertype; - uint32 reserved1; - uint32 reserved2; - uint32 panningwidth; - uint32 panningheight; - [subcontext_size(__driverextra_length),subcontext(0),flag(NDR_REMAINING)] DATA_BLOB driverextra_data; - } spoolss_DeviceMode; - - typedef [public] bitmap { - PRINTER_ENUM_DEFAULT = 0x00000001, - PRINTER_ENUM_LOCAL = 0x00000002, - PRINTER_ENUM_CONNECTIONS = 0x00000004, - PRINTER_ENUM_FAVORITE = 0x00000004, - PRINTER_ENUM_NAME = 0x00000008, - PRINTER_ENUM_REMOTE = 0x00000010, - PRINTER_ENUM_SHARED = 0x00000020, - PRINTER_ENUM_NETWORK = 0x00000040, - PRINTER_ENUM_EXPAND = 0x00004000, - PRINTER_ENUM_CONTAINER = 0x00008000, - PRINTER_ENUM_ICON1 = 0x00010000, - PRINTER_ENUM_ICON2 = 0x00020000, - PRINTER_ENUM_ICON3 = 0x00040000, - PRINTER_ENUM_ICON4 = 0x00080000, - PRINTER_ENUM_ICON5 = 0x00100000, - PRINTER_ENUM_ICON6 = 0x00200000, - PRINTER_ENUM_ICON7 = 0x00400000, - PRINTER_ENUM_ICON8 = 0x00800000, - PRINTER_ENUM_HIDE = 0x01000000 - } spoolss_EnumPrinterFlags; - - typedef struct { - spoolss_EnumPrinterFlags flags; - [relative] nstring *name; - [relative] nstring *description; - [relative] nstring *comment; - } spoolss_PrinterInfo1; - - typedef bitmap { - PRINTER_ATTRIBUTE_QUEUED = 0x00000001, - PRINTER_ATTRIBUTE_DIRECT = 0x00000002, - PRINTER_ATTRIBUTE_DEFAULT = 0x00000004, - PRINTER_ATTRIBUTE_SHARED = 0x00000008, - PRINTER_ATTRIBUTE_NETWORK = 0x00000010, - PRINTER_ATTRIBUTE_HIDDEN = 0x00000020, - PRINTER_ATTRIBUTE_LOCAL = 0x00000040, - PRINTER_ATTRIBUTE_ENABLE_DEVQ = 0x00000080, - PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS = 0x00000100, - PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST = 0x00000200, - PRINTER_ATTRIBUTE_WORK_OFFLINE = 0x00000400, - PRINTER_ATTRIBUTE_ENABLE_BIDI = 0x00000800, - PRINTER_ATTRIBUTE_RAW_ONLY = 0x00001000, - PRINTER_ATTRIBUTE_PUBLISHED = 0x00002000, - PRINTER_ATTRIBUTE_FAX = 0x00004000, - PRINTER_ATTRIBUTE_TS = 0x00008000 - } spoolss_PrinterAttributes; - - typedef bitmap { - PRINTER_STATUS_PAUSED = 0x00000001, - PRINTER_STATUS_ERROR = 0x00000002, - PRINTER_STATUS_PENDING_DELETION = 0x00000004, - PRINTER_STATUS_PAPER_JAM = 0x00000008, - PRINTER_STATUS_PAPER_OUT = 0x00000010, - PRINTER_STATUS_MANUAL_FEED = 0x00000020, - PRINTER_STATUS_PAPER_PROBLEM = 0x00000040, - PRINTER_STATUS_OFFLINE = 0x00000080, - PRINTER_STATUS_IO_ACTIVE = 0x00000100, - PRINTER_STATUS_BUSY = 0x00000200, - PRINTER_STATUS_PRINTING = 0x00000400, - PRINTER_STATUS_OUTPUT_BIN_FULL = 0x00000800, - PRINTER_STATUS_NOT_AVAILABLE = 0x00001000, - PRINTER_STATUS_WAITING = 0x00002000, - PRINTER_STATUS_PROCESSING = 0x00004000, - PRINTER_STATUS_INITIALIZING = 0x00008000, - PRINTER_STATUS_WARMING_UP = 0x00010000, - PRINTER_STATUS_TONER_LOW = 0x00020000, - PRINTER_STATUS_NO_TONER = 0x00040000, - PRINTER_STATUS_PAGE_PUNT = 0x00080000, - PRINTER_STATUS_USER_INTERVENTION= 0x00100000, - PRINTER_STATUS_OUT_OF_MEMORY = 0x00200000, - PRINTER_STATUS_DOOR_OPEN = 0x00400000, - PRINTER_STATUS_SERVER_UNKNOWN = 0x00800000, - PRINTER_STATUS_POWER_SAVE = 0x01000000 - } spoolss_PrinterStatus; - - typedef struct { - [relative] nstring *servername; - [relative] nstring *printername; - [relative] nstring *sharename; - [relative] nstring *portname; - [relative] nstring *drivername; - [relative] nstring *comment; - [relative] nstring *location; - [relative,subcontext(0)] spoolss_DeviceMode *devmode; - [relative] nstring *sepfile; - [relative] nstring *printprocessor; - [relative] nstring *datatype; - [relative] nstring *parameters; - [relative,subcontext(0)] security_descriptor *secdesc; - spoolss_PrinterAttributes attributes; - uint32 priority; - uint32 defaultpriority; - uint32 starttime; - uint32 untiltime; - spoolss_PrinterStatus status; - uint32 cjobs; - uint32 averageppm; - } spoolss_PrinterInfo2; - - typedef struct { - [relative,subcontext(0)] security_descriptor *secdesc; - } spoolss_PrinterInfo3; - - typedef struct { - [relative] nstring *printername; - [relative] nstring *servername; - spoolss_PrinterAttributes attributes; - } spoolss_PrinterInfo4; - - typedef struct { - [relative] nstring *printername; - [relative] nstring *portname; - spoolss_PrinterAttributes attributes; - uint32 device_not_selected_timeout; - uint32 transmission_retry_timeout; - } spoolss_PrinterInfo5; - - typedef struct { - spoolss_PrinterStatus status; - } spoolss_PrinterInfo6; - - typedef bitmap { - DSPRINT_PUBLISH = 0x00000001, - DSPRINT_UPDATE = 0x00000002, - DSPRINT_UNPUBLISH = 0x00000004, - DSPRINT_REPUBLISH = 0x00000008, - DSPRINT_PENDING = 0x80000000 - } spoolss_DsPrintAction; - - typedef struct { - [relative] nstring *guid; /* text form of printer guid */ - spoolss_DsPrintAction action; - } spoolss_PrinterInfo7; - - typedef struct { - [relative,subcontext(0)] spoolss_DeviceMode *devmode; - } spoolss_DeviceModeInfo; - - typedef [nodiscriminant,relative_base,public] union { - [case(0)] spoolss_PrinterInfo0 info0; - [case(1)] spoolss_PrinterInfo1 info1; - [case(2)] spoolss_PrinterInfo2 info2; - [case(3)] spoolss_PrinterInfo3 info3; - [case(4)] spoolss_PrinterInfo4 info4; - [case(5)] spoolss_PrinterInfo5 info5; - [case(6)] spoolss_PrinterInfo6 info6; - [case(7)] spoolss_PrinterInfo7 info7; - [case(8)] spoolss_DeviceModeInfo info8; - [case(9)] spoolss_DeviceModeInfo info9; - [default]; - } spoolss_PrinterInfo; - - /******************/ - /* Function: 0x00 */ - /* we are using this as internal parsing code */ - [public,noopnum,noprint] WERROR _spoolss_EnumPrinters( - [in] spoolss_EnumPrinterFlags flags, - [in,unique] [string,charset(UTF16)] uint16 *server, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumPrinters( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_PrinterInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumPrinters( - [in] spoolss_EnumPrinterFlags flags, - [in,unique] [string,charset(UTF16)] uint16 *server, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - /* what we have here is a subcontext containing an array of no discriminant unions - * and the array has no size in front - */ - [out,unique,switch_is(level),size_is(count)] spoolss_PrinterInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x01 */ - typedef struct { - [value(_ndr_size_spoolss_DeviceMode(devmode, ndr->flags))] uint32 _ndr_size; - [subcontext(4),subcontext_size(_ndr_size)] spoolss_DeviceMode *devmode; - } spoolss_DevmodeContainer; - - [public] WERROR spoolss_OpenPrinter( - [in,unique] [string,charset(UTF16)] uint16 *printername, - [in,unique] [string,charset(UTF16)] uint16 *datatype, - [in] spoolss_DevmodeContainer devmode_ctr, - [in] uint32 access_mask, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x02 */ - typedef struct { - uint32 job_id; - [relative] nstring *printer_name; - [relative] nstring *server_name; - [relative] nstring *user_name; - [relative] nstring *document_name; - [relative] nstring *data_type; - [relative] nstring *text_status; - uint32 status; - uint32 priority; - uint32 position; - uint32 total_pages; - uint32 pages_printed; - spoolss_Time time; - } spoolss_JobInfo1; - - typedef [nodiscriminant,relative_base,public] union { - [case(1)] spoolss_JobInfo1 info1; - [case(2)]; /* TODO */ - [case(3)]; /* TODO */ - [default]; - } spoolss_JobInfo; - - typedef struct { - uint32 level; - [switch_is(level)] spoolss_JobInfo info; - } spoolss_JobInfoContainer; - - typedef [v1_enum] enum { - SPOOLSS_JOB_CONTROL_PAUSE = 1, - SPOOLSS_JOB_CONTROL_RESUME = 2, - SPOOLSS_JOB_CONTROL_CANCEL = 3, - SPOOLSS_JOB_CONTROL_RESTART = 4, - SPOOLSS_JOB_CONTROL_DELETE = 5, - SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER = 6, - SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED = 7 - } spoolss_JobControl; - - WERROR spoolss_SetJob( - [in,ref] policy_handle *handle, - [in] uint32 job_id, - [in,unique] spoolss_JobInfoContainer *ctr, - [in] spoolss_JobControl command - ); - - /******************/ - /* Function: 0x03 */ - WERROR spoolss_GetJob( - [in,ref] policy_handle *handle, - [in] uint32 job_id, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_JobInfo *info, - [out] uint32 needed - ); - - /******************/ - /* Function: 0x04 */ - [public,noopnum,noprint] WERROR _spoolss_EnumJobs( - [in,ref] policy_handle *handle, - [in] uint32 firstjob, - [in] uint32 numjobs, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumJobs( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_JobInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumJobs( - [in,ref] policy_handle *handle, - [in] uint32 firstjob, - [in] uint32 numjobs, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,switch_is(level),size_is(count)] spoolss_JobInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x05 */ - [todo] WERROR spoolss_AddPrinter( - /* This function is not implemented in Samba 3 as no - clients have been observed using it. */ - ); - - /******************/ - /* Function: 0x06 */ - [todo] WERROR spoolss_DeletePrinter( - ); - - /******************/ - /* Function: 0x07 */ - typedef [v1_enum] enum { - SPOOLSS_PRINTER_CONTROL_UNPAUSE = 0, - SPOOLSS_PRINTER_CONTROL_PAUSE = 1, - SPOOLSS_PRINTER_CONTROL_RESUME = 2, - SPOOLSS_PRINTER_CONTROL_PURGE = 3, - SPOOLSS_PRINTER_CONTROL_SET_STATUS = 4 - } spoolss_PrinterControl; - - typedef [switch_type(uint32)] union { - [case(0)] spoolss_PrinterInfo0 *info0; - [case(1)] spoolss_PrinterInfo1 *info1; - [case(2)] spoolss_PrinterInfo2 *info2; - [case(3)] spoolss_PrinterInfo3 *info3; - [case(4)] spoolss_PrinterInfo4 *info4; - [case(5)] spoolss_PrinterInfo5 *info5; - [case(6)] spoolss_PrinterInfo6 *info6; - [case(7)] spoolss_PrinterInfo7 *info7; - [case(8)] spoolss_DeviceModeInfo *info8; - [case(9)] spoolss_DeviceModeInfo *info9; - [default]; - } spoolss_SetPrinterInfo; - - WERROR spoolss_SetPrinter( - [in,ref] policy_handle *handle, - [in] uint32 level, - [in,switch_is(level)] spoolss_SetPrinterInfo info, - [in] spoolss_DevmodeContainer devmode_ctr, - [in] sec_desc_buf secdesc_ctr, - [in] spoolss_PrinterControl command - ); - - /******************/ - /* Function: 0x08 */ - [public] WERROR spoolss_GetPrinter( - [in,ref] policy_handle *handle, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_PrinterInfo *info, - [out] uint32 needed - ); - - /******************/ - /* Function: 0x09 */ - [todo] WERROR spoolss_AddPrinterDriver( - ); - - typedef struct { - [relative] nstring *driver_name; - } spoolss_DriverInfo1; - - typedef [v1_enum] enum { - SPOOLSS_DRIVER_VERSION_9X = 0, - SPOOLSS_DRIVER_VERSION_NT35 = 1, - SPOOLSS_DRIVER_VERSION_NT4 = 2, - SPOOLSS_DRIVER_VERSION_200X = 3 - } spoolss_DriverOSVersion; - - typedef struct { - spoolss_DriverOSVersion version; - [relative] nstring *driver_name; - [relative] nstring *architecture; - [relative] nstring *driver_path; - [relative] nstring *data_file; - [relative] nstring *config_file; - } spoolss_DriverInfo2; - - typedef struct { - spoolss_DriverOSVersion version; - [relative] nstring *driver_name; - [relative] nstring *architecture; - [relative] nstring *driver_path; - [relative] nstring *data_file; - [relative] nstring *config_file; - [relative] nstring *help_file; - [relative] nstring_array *dependent_files; - [relative] nstring *monitor_name; - [relative] nstring *default_datatype; - } spoolss_DriverInfo3; - - typedef struct { - spoolss_DriverOSVersion version; - [relative] nstring *driver_name; - [relative] nstring *architecture; - [relative] nstring *driver_path; - [relative] nstring *data_file; - [relative] nstring *config_file; - [relative] nstring *help_file; - [relative] nstring_array *dependent_files; - [relative] nstring *monitor_name; - [relative] nstring *default_datatype; - [relative] nstring_array *previous_names; - } spoolss_DriverInfo4; - - typedef struct { - spoolss_DriverOSVersion version; - [relative] nstring *driver_name; - [relative] nstring *architecture; - [relative] nstring *driver_path; - [relative] nstring *data_file; - [relative] nstring *config_file; - uint32 driver_attributes; - uint32 config_version; - uint32 driver_version; - } spoolss_DriverInfo5; - - typedef struct { - spoolss_DriverOSVersion version; - [relative] nstring *driver_name; - [relative] nstring *architecture; - [relative] nstring *driver_path; - [relative] nstring *data_file; - [relative] nstring *config_file; - [relative] nstring *help_file; - [relative] nstring_array *dependent_files; - [relative] nstring *monitor_name; - [relative] nstring *default_datatype; - [relative] nstring_array *previous_names; - NTTIME driver_data; - hyper driver_version; - [relative] nstring *manufacturer_name; - [relative] nstring *manufacturer_url; - [relative] nstring *hardware_id; - [relative] nstring *provider; - } spoolss_DriverInfo6; - - typedef [nodiscriminant,relative_base,public] union { - [case(1)] spoolss_DriverInfo1 info1; - [case(2)] spoolss_DriverInfo2 info2; - [case(3)] spoolss_DriverInfo3 info3; - [case(4)] spoolss_DriverInfo4 info4; - [case(5)] spoolss_DriverInfo5 info5; - [case(6)] spoolss_DriverInfo6 info6; - [default]; - } spoolss_DriverInfo; - - /******************/ - /* Function: 0x0a */ - [public,noopnum,noprint] WERROR _spoolss_EnumPrinterDrivers( - [in,unique] [string,charset(UTF16)] uint16 *server, - [in,unique] [string,charset(UTF16)] uint16 *environment, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumPrinterDrivers( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_DriverInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumPrinterDrivers( - [in,unique] [string,charset(UTF16)] uint16 *server, - [in,unique] [string,charset(UTF16)] uint16 *environment, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,switch_is(level),size_is(count)] spoolss_DriverInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x0b */ - [todo] WERROR spoolss_GetPrinterDriver( - ); - - /******************/ - /* Function: 0x0c */ - typedef struct { - nstring directory_name; - } spoolss_DriverDirectoryInfo1; - - /* NOTE: it's seems that w2k3 completly ignores the level - in its server code - */ - typedef [nodiscriminant,relative_base,gensize,public] union { - [case(1)] spoolss_DriverDirectoryInfo1 info1; - [default] spoolss_DriverDirectoryInfo1 info1; - } spoolss_DriverDirectoryInfo; - - [public] WERROR spoolss_GetPrinterDriverDirectory( - [in,unique] [string,charset(UTF16)] uint16 *server, - [in,unique] [string,charset(UTF16)] uint16 *environment, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_DriverDirectoryInfo *info, - [out] uint32 needed - ); - - /******************/ - /* Function: 0x0d */ - WERROR spoolss_DeletePrinterDriver( - [in,ref] policy_handle *handle, - [in,unique] [string,charset(UTF16)] uint16 *server, - [in] [string,charset(UTF16)] uint16 architecture[], - [in] [string,charset(UTF16)] uint16 driver[] - ); - - /******************/ - /* Function: 0x0e */ - [todo] WERROR spoolss_AddPrintProcessor( - ); - - /******************/ - /* Function: 0x0f */ - typedef struct { - [relative] nstring *print_processor_name; - } spoolss_PrintProcessorInfo1; - - typedef [nodiscriminant,relative_base,public] union { - [case(1)] spoolss_PrintProcessorInfo1 info1; - [default]; - } spoolss_PrintProcessorInfo; - - [public,noopnum,noprint] WERROR _spoolss_EnumPrintProcessors( - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in,unique] [string,charset(UTF16)] uint16 *environment, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumPrintProcessors( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_PrintProcessorInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumPrintProcessors( - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in,unique] [string,charset(UTF16)] uint16 *environment, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,switch_is(level),size_is(count)] spoolss_PrintProcessorInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x10 */ - [todo] WERROR spoolss_GetPrintProcessorDirectory( - ); - - /******************/ - /* Function: 0x11 */ - typedef struct { - [string,charset(UTF16)] uint16 *document_name; - [string,charset(UTF16)] uint16 *output_file; - [string,charset(UTF16)] uint16 *datatype; - } spoolss_DocumentInfo1; - - typedef [switch_type(uint32)] union { - [case(1)] spoolss_DocumentInfo1 *info1; - [case(2)]; /* TODO */ - [case(3)]; /* TODO */ - [default]; - } spoolss_DocumentInfo; - - WERROR spoolss_StartDocPrinter( - [in,ref] policy_handle *handle, - [in] uint32 level, - [in,switch_is(level)] spoolss_DocumentInfo info, - [out] uint32 job_id - ); - - /******************/ - /* Function: 0x12 */ - WERROR spoolss_StartPagePrinter( - [in,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x13 */ - WERROR spoolss_WritePrinter( - [in,ref] policy_handle *handle, - [in] DATA_BLOB data, - [in,value(r->in.data.length)] uint32 _data_size, - [out] uint32 num_written - ); - - /******************/ - /* Function: 0x14 */ - WERROR spoolss_EndPagePrinter( - [in,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x15 */ - WERROR spoolss_AbortPrinter( - [in,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x16 */ - WERROR spoolss_ReadPrinter( - [in,ref] policy_handle *handle, - [in] uint32 data_size, - [out] DATA_BLOB data, - [out,value(r->out.data.length)] uint32 _data_size - ); - - /******************/ - /* Function: 0x17 */ - WERROR spoolss_EndDocPrinter( - [in,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x18 */ - [todo] WERROR spoolss_AddJob( - ); - - /******************/ - /* Function: 0x19 */ - [todo] WERROR spoolss_ScheduleJob( - ); - - /******************/ - /* Function: 0x1a */ - const string SPOOLSS_ARCHITECTURE_NT_X86 = "Windows NT x86"; - - typedef [public,gensize] struct { - [value(ndr_size_spoolss_OSVersion(r,ndr->flags))] uint32 _ndr_size; - uint32 major; - uint32 minor; - uint32 build; - [value(2)] uint32 unknown; - [subcontext(0),subcontext_size(256)] nstring extra_string; - } spoolss_OSVersion; - - typedef [public,gensize] struct { - [value(ndr_size_spoolss_OSVersionEx(r,ndr->flags))] uint32 _ndr_size; - uint32 major; - uint32 minor; - uint32 build; - [value(2)] uint32 unknown1; - [subcontext(0),subcontext_size(256)] nstring extra_string; - uint32 unknown2;/* service pack number? I saw 0 from w2k3 and 1 from winxp sp1*/ - uint32 unknown3;/* hmm? w2k3: 131346(0x20112) winxp sp1: 503382272 0x1E010100 */ - } spoolss_OSVersionEx; - - typedef [v1_enum] enum { - SPOOLSS_PRINTER_DATA_TYPE_NULL = 0, - SPOOLSS_PRINTER_DATA_TYPE_STRING = 1, - SPOOLSS_PRINTER_DATA_TYPE_BINARY = 3, - SPOOLSS_PRINTER_DATA_TYPE_UINT32 = 4, - SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY = 7 - } spoolss_PrinterDataType; - - typedef [nodiscriminant,public,gensize] union { - [case(SPOOLSS_PRINTER_DATA_TYPE_NULL)]; - [case(SPOOLSS_PRINTER_DATA_TYPE_STRING)] nstring string; - [case(SPOOLSS_PRINTER_DATA_TYPE_BINARY),flag(NDR_REMAINING)] DATA_BLOB binary; - [case(SPOOLSS_PRINTER_DATA_TYPE_UINT32)] uint32 value; - [case(SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY)] nstring_array string_array; - [default,flag(NDR_REMAINING)] DATA_BLOB data; - } spoolss_PrinterData; - - [noopnum,noprint,public] WERROR _spoolss_GetPrinterData( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 value_name[], - [in] uint32 offered, - [out] spoolss_PrinterDataType type, - [out] DATA_BLOB data, - [out] uint32 needed - ); - [noopnum,noprint,public] void __spoolss_GetPrinterData( - [in] spoolss_PrinterDataType type, - [out,switch_is(type)] spoolss_PrinterData data - ); - [nopull,nopush,public] WERROR spoolss_GetPrinterData( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 value_name[], - [in] uint32 offered, - [out] spoolss_PrinterDataType type, - [out,subcontext(4),subcontext_size(offered),switch_is(type)] spoolss_PrinterData data, - [out] uint32 needed - ); - - /******************/ - /* Function: 0x1b */ - [noopnum,nopull,noprint,public] WERROR _spoolss_SetPrinterData( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 value_name[], - [in] spoolss_PrinterDataType type, - [in] DATA_BLOB data, - [in] uint32 _offered - ); - [noopnum,nopull,noprint,public] void __spoolss_SetPrinterData( - [in] spoolss_PrinterDataType type, - [out,switch_is(type)] spoolss_PrinterData data - ); - [nopush] WERROR spoolss_SetPrinterData( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 value_name[], - [in] spoolss_PrinterDataType type, - [in,subcontext(4),switch_is(type)] spoolss_PrinterData data, - [in,value(ndr_size_spoolss_PrinterData(&data,type,flags))] uint32 _offered - ); - - /******************/ - /* Function: 0x1c */ - [todo] WERROR spoolss_WaitForPrinterChange( - ); - - /******************/ - /* Function: 0x1d */ - [public] WERROR spoolss_ClosePrinter( - [in,out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x1e */ - typedef [v1_enum] enum { - SPOOLSS_FORM_USER = 0, - SPOOLSS_FORM_BUILTIN = 1, - SPOOLSS_FORM_PRINTER = 2 - } spoolss_FormFlags; - - typedef struct { - uint32 width; - uint32 height; - } spoolss_FormSize; - - typedef struct { - uint32 left; - uint32 top; - uint32 right; - uint32 bottom; - } spoolss_FormArea; - - typedef struct { - spoolss_FormFlags flags; - [relative] nstring *form_name; - spoolss_FormSize size; - spoolss_FormArea area; - } spoolss_FormInfo1; - - typedef [nodiscriminant,relative_base,public,gensize] union { - [case(1)] spoolss_FormInfo1 info1; - [default]; - } spoolss_FormInfo; - - typedef struct { - spoolss_FormFlags flags; - [string,charset(UTF16)] uint16 *form_name; - spoolss_FormSize size; - spoolss_FormArea area; - } spoolss_AddFormInfo1; - - typedef [switch_type(uint32)] union { - [case(1)] spoolss_AddFormInfo1 *info1; - } spoolss_AddFormInfo; - - WERROR spoolss_AddForm( - [in,ref] policy_handle *handle, - [in] uint32 level, - [in,switch_is(level)] spoolss_AddFormInfo info - ); - - /******************/ - /* Function: 0x1f */ - WERROR spoolss_DeleteForm( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 form_name[] - ); - - /******************/ - /* Function: 0x20 */ - WERROR spoolss_GetForm( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 form_name[], - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,subcontext(4),subcontext_size(offered),switch_is(level)] spoolss_FormInfo *info, - [out] uint32 needed - ); - - /******************/ - /* Function: 0x21 */ - WERROR spoolss_SetForm( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 form_name[], - [in] uint32 level, - [in,switch_is(level)] spoolss_AddFormInfo info - ); - - /******************/ - /* Function: 0x22 */ - [public,noopnum,noprint] WERROR _spoolss_EnumForms( - [in,ref] policy_handle *handle, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumForms( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_FormInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumForms( - [in,ref] policy_handle *handle, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,switch_is(level),size_is(count)] spoolss_FormInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - typedef struct { - [relative] nstring *port_name; - } spoolss_PortInfo1; - - typedef bitmap { - SPOOLSS_PORT_TYPE_WRITE = 0x00000001, - SPOOLSS_PORT_TYPE_READ = 0x00000002, - SPOOLSS_PORT_TYPE_REDIRECTED = 0x00000004, - SPOOLSS_PORT_TYPE_NET_ATTACHED = 0x00000008 - } spoolss_PortType; - - typedef struct { - [relative] nstring *port_name; - [relative] nstring *monitor_name; - [relative] nstring *description; - spoolss_PortType port_type; - uint32 reserved; - } spoolss_PortInfo2; - - typedef [nodiscriminant,relative_base,public] union { - [case(1)] spoolss_PortInfo1 info1; - [case(2)] spoolss_PortInfo2 info2; - [case(3)]; /* TODO */ - [default]; - } spoolss_PortInfo; - - /******************/ - /* Function: 0x23 */ - [public,noopnum,noprint] WERROR _spoolss_EnumPorts( - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumPorts( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_PortInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumPorts( - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,switch_is(level),size_is(count)] spoolss_PortInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x24 */ - typedef struct { - [relative] nstring *monitor_name; - } spoolss_MonitorInfo1; - - typedef struct { - [relative] nstring *monitor_name; - [relative] nstring *environment; - [relative] nstring *dll_name; - } spoolss_MonitorInfo2; - - typedef [nodiscriminant,relative_base,public] union { - [case(1)] spoolss_MonitorInfo1 info1; - [case(2)] spoolss_MonitorInfo2 info2; - [default]; - } spoolss_MonitorInfo; - - [public,noopnum,noprint] WERROR _spoolss_EnumMonitors( - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 count - ); - [public,noopnum,noprint] void __spoolss_EnumMonitors( - [in] uint32 level, - [in] uint32 count, - [out,switch_is(level)] spoolss_MonitorInfo info[count] - ); - [nopull,nopush] WERROR spoolss_EnumMonitors( - [in,unique] [string,charset(UTF16)] uint16 *servername, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [out,unique,switch_is(level),size_is(count)] spoolss_MonitorInfo *info, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x25 */ - WERROR spoolss_AddPort( - [in,unique] [string,charset(UTF16)] uint16 *server_name, - [in] uint32 unknown, - [in] [string,charset(UTF16)] uint16 monitor_name[] - ); - - /******************/ - /* Function: 0x26 */ - [todo] WERROR spoolss_ConfigurePort( - ); - - /******************/ - /* Function: 0x27 */ - [todo] WERROR spoolss_DeletePort( - ); - - /******************/ - /* Function: 0x28 */ - [todo] WERROR spoolss_CreatePrinterIC( - ); - - /******************/ - /* Function: 0x29 */ - [todo] WERROR spoolss_PlayGDIScriptOnPrinterIC( - ); - - /******************/ - /* Function: 0x2a */ - [todo] WERROR spoolss_DeletePrinterIC( - ); - - /******************/ - /* Function: 0x2b */ - [todo] WERROR spoolss_AddPrinterConnection( - ); - - /******************/ - /* Function: 0x2c */ - [todo] WERROR spoolss_DeletePrinterConnection( - ); - - /******************/ - /* Function: 0x2d */ - [todo] WERROR spoolss_PrinterMessageBox( - /* Marked as obsolete in MSDN. "Not necessary and has - no effect". */ - ); - - /******************/ - /* Function: 0x2e */ - [todo] WERROR spoolss_AddMonitor( - ); - - /******************/ - /* Function: 0x2f */ - [todo] WERROR spoolss_DeleteMonitor( - ); - - /******************/ - /* Function: 0x30 */ - [todo] WERROR spoolss_DeletePrintProcessor( - ); - - /******************/ - /* Function: 0x31 */ - [todo] WERROR spoolss_AddPrintProvidor( - ); - - /******************/ - /* Function: 0x32 */ - [todo] WERROR spoolss_DeletePrintProvidor( - ); - - /******************/ - /* Function: 0x33 */ - [todo] WERROR spoolss_EnumPrintProcDataTypes( - ); - - /******************/ - /* Function: 0x34 */ - [todo] WERROR spoolss_ResetPrinter( - ); - - /******************/ - /* Function: 0x35 */ - WERROR spoolss_GetPrinterDriver2( - [in,ref] policy_handle *handle, - [in,unique] [string,charset(UTF16)] uint16 *architecture, - [in] uint32 level, - [in,unique] DATA_BLOB *buffer, - [in] uint32 offered, - [in] uint32 client_major_version, - [in] uint32 client_minor_version, - [out,unique] DATA_BLOB *info, - [out] uint32 needed, - [out] uint32 server_major_version, - [out] uint32 server_minor_version - ); - - /******************/ - /* Function: 0x36 */ - [todo] WERROR spoolss_FindFirstPrinterChangeNotification( - ); - - /******************/ - /* Function: 0x37 */ - [todo] WERROR spoolss_FindNextPrinterChangeNotification( - ); - - /******************/ - /* Function: 0x38 */ - [public] WERROR spoolss_FindClosePrinterNotify( - [in,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x39 */ - [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotificationOld( - ); - - /******************/ - /* Function: 0x3a */ - [public] WERROR spoolss_ReplyOpenPrinter( - [in,string,charset(UTF16)] uint16 server_name[], - [in] uint32 printer_local, - [in] winreg_Type type, - [in] uint32 unknown1, - [in] uint32 unknown2, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x3b */ - [todo] WERROR spoolss_RouterReplyPrinter( - ); - - /******************/ - /* Function: 0x3c */ - [public] WERROR spoolss_ReplyClosePrinter( - [in,out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x3d */ - [todo] WERROR spoolss_AddPortEx( - ); - - /******************/ - /* Function: 0x3e */ - [todo] WERROR spoolss_RouterFindFirstPrinterChangeNotification( - ); - - /******************/ - /* Function: 0x3f */ - [todo] WERROR spoolss_SpoolerInit( - ); - - /******************/ - /* Function: 0x40 */ - [todo] WERROR spoolss_ResetPrinterEx( - ); - - typedef [enum16bit] enum { - SPOOLSS_FIELD_SERVER_NAME = 0, - SPOOLSS_FIELD_PRINTER_NAME = 1, - SPOOLSS_FIELD_SHARE_NAME = 2, - SPOOLSS_FIELD_PORT_NAME = 3, - SPOOLSS_FIELD_DRIVER_NAME = 4, - SPOOLSS_FIELD_COMMENT = 5, - SPOOLSS_FIELD_LOCATION = 6, - SPOOLSS_FIELD_DEVMODE = 7, - SPOOLSS_FIELD_SEPFILE = 8, - SPOOLSS_FIELD_PRINT_PROCESSOR = 9, - SPOOLSS_FIELD_PARAMETERS = 10, - SPOOLSS_FIELD_DATATYPE = 11, - SPOOLSS_FIELD_SECURITY_DESCRIPTOR=12, - SPOOLSS_FIELD_ATTRIBUTES = 13, - SPOOLSS_FIELD_PRIORITY = 14, - SPOOLSS_FIELD_DEFAULT_PRIORITY = 15, - SPOOLSS_FIELD_START_TIME = 16, - SPOOLSS_FIELD_UNTIL_TIME = 17, - SPOOLSS_FIELD_STATUS = 18, - SPOOLSS_FIELD_STATUS_STRING = 19, - SPOOLSS_FIELD_CJOBS = 20, - SPOOLSS_FIELD_AVERAGE_PPM = 21, - SPOOLSS_FIELD_TOTAL_PAGES = 22, - SPOOLSS_FIELD_PAGES_PRINTED = 23, - SPOOLSS_FIELD_TOTAL_BYTES = 24, - SPOOLSS_FIELD_BYTES_PRINTED = 25 - } spoolss_Field; - - typedef [enum16bit] enum { - SPOOLSS_NOTIFY_PRINTER = 0, - SPOOLSS_NOTIFY_JOB = 1 - } spoolss_NotifyType; - - /******************/ - /* Function: 0x41 */ - typedef struct { - spoolss_NotifyType type; - uint16 u1; - uint32 u2; - uint32 u3; - uint32 count; - [size_is(count)] spoolss_Field *fields; - } spoolss_NotifyOptionsArray; - - typedef struct { - uint32 version; - uint32 flags; - uint32 count; - [size_is(count)] spoolss_NotifyOptionsArray *options; - } spoolss_NotifyOptionsContainer; - - [public] WERROR spoolss_RemoteFindFirstPrinterChangeNotifyEx( - [in,ref] policy_handle *handle, - [in] uint32 flags, - [in] uint32 options, - [in,unique] [string,charset(UTF16)] uint16 *str, - [in] uint32 printer_local, - [in,unique] spoolss_NotifyOptionsContainer *t1 - ); - - /******************/ - /* Function: 0x42 */ - [todo] WERROR spoolss_RouterRefreshPrinterChangeNotification( - ); - - typedef struct { - uint32 size; - [size_is(size/2),unique,charset(UTF16)] uint16 *string; - } spoolss_NotifyUTF16String; - - typedef struct { - uint32 size; - [size_is(size),charset(DOS)] uint8 *string; - } spoolss_NotifyDOSString; - - typedef struct { - uint16 data[8]; - } spoolss_NotifyBlobData; - - typedef struct { - uint32 len; - [unique] spoolss_NotifyBlobData *data; - } spoolss_NotifyBlob; - - typedef [switch_type(uint32)] union { - [case(1)] dlong integer; - [case(2)] spoolss_NotifyUTF16String utf16_string; - [case(3)] spoolss_NotifyDOSString ascii_string; - [case(4)] spoolss_NotifyBlob blob; - [case(5)] spoolss_NotifyDOSString ascii_string; - } spoolss_NotifyData; - - typedef struct { - spoolss_NotifyType type; - spoolss_Field field; - uint32 variable_type; - uint32 job_id; - [switch_is(variable_type)] spoolss_NotifyData data; - } spoolss_Notify; - - typedef struct { - uint32 version; - uint32 flags; - uint32 count; - [size_is(count)] spoolss_Notify notifies[]; - } spoolss_NotifyInfo; - - /******************/ - /* Function: 0x43 */ - [public] WERROR spoolss_RemoteFindNextPrinterChangeNotifyEx( - [in,ref] policy_handle *handle, - [in] uint32 change_low, - [in,unique] spoolss_NotifyOptionsContainer *container, - [out, unique] spoolss_NotifyInfo *info - ); - - /******************/ - /* Function: 0x44 */ - [todo] WERROR spoolss_44( - ); - - typedef struct { - uint32 size; - [string,charset(UTF16)] uint16 *client; - [string,charset(UTF16)] uint16 *user; - uint32 build; - uint32 major; - uint32 minor; - uint32 processor; - } spoolss_UserLevel1; - - typedef union { - [case(1)] spoolss_UserLevel1 *level1; - } spoolss_UserLevel; - - typedef bitmap { - SERVER_ACCESS_ADMINISTER = 0x00000001, - SERVER_ACCESS_ENUMERATE = 0x00000002, - PRINTER_ACCESS_ADMINISTER = 0x00000004, - PRINTER_ACCESS_USE = 0x00000008, - JOB_ACCESS_ADMINISTER = 0x00000010 - } spoolss_AccessRights; - - /* Access rights for print servers */ - const int SERVER_ALL_ACCESS = SEC_STD_REQUIRED | - SERVER_ACCESS_ADMINISTER | - SERVER_ACCESS_ENUMERATE; - - const int SERVER_READ = SEC_STD_READ_CONTROL | - SERVER_ACCESS_ENUMERATE; - - const int SERVER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS | - SERVER_ACCESS_ADMINISTER | - SERVER_ACCESS_ENUMERATE; - - const int SERVER_EXECUTE = SEC_STD_READ_CONTROL | - SERVER_ACCESS_ENUMERATE; - - /* Access rights for printers */ - const int PRINTER_ALL_ACCESS = SEC_STD_REQUIRED | - PRINTER_ACCESS_ADMINISTER | - PRINTER_ACCESS_USE; - - const int PRINTER_READ = SEC_STD_READ_CONTROL | - PRINTER_ACCESS_USE; - - const int PRINTER_WRITE = STANDARD_RIGHTS_WRITE_ACCESS | - PRINTER_ACCESS_USE; - - const int PRINTER_EXECUTE = SEC_STD_READ_CONTROL | - PRINTER_ACCESS_USE; - - /* Access rights for jobs */ - const int JOB_ALL_ACCESS = SEC_STD_REQUIRED | - JOB_ACCESS_ADMINISTER; - - const int JOB_READ = SEC_STD_READ_CONTROL | - JOB_ACCESS_ADMINISTER; - - const int JOB_WRITE = STANDARD_RIGHTS_WRITE_ACCESS | - JOB_ACCESS_ADMINISTER; - - const int JOB_EXECUTE = SEC_STD_READ_CONTROL | - JOB_ACCESS_ADMINISTER; - - /* ACE masks for various print permissions */ - const int PRINTER_ACE_FULL_CONTROL = SEC_GENERIC_ALL | - PRINTER_ALL_ACCESS; - - const int PRINTER_ACE_MANAGE_DOCUMENTS = SEC_GENERIC_ALL | - READ_CONTROL_ACCESS; - - const int PRINTER_ACE_PRINT = GENERIC_EXECUTE_ACCESS | - READ_CONTROL_ACCESS | - PRINTER_ACCESS_USE; - - /******************/ - /* Function: 0x45 */ - [public] WERROR spoolss_OpenPrinterEx( - [in,unique] [string,charset(UTF16)] uint16 *printername, - [in,unique] [string,charset(UTF16)] uint16 *datatype, - [in] spoolss_DevmodeContainer devmode_ctr, - [in] uint32 access_mask, - [in] uint32 level, - [in,switch_is(level)] spoolss_UserLevel userlevel, - [out,ref] policy_handle *handle - ); - - /******************/ - /* Function: 0x46 */ - WERROR spoolss_AddPrinterEx( - [in,unique] [string,charset(UTF16)] uint16 *server, - [in] uint32 level, - [in,unique,switch_is(level)] spoolss_PrinterInfo *info, - [in] spoolss_DevmodeContainer devmode_ctr, - [in,unique] security_descriptor *secdesc, - [in] uint32 ulevel, - [in,switch_is(ulevel)] spoolss_UserLevel userlevel - ); - - /******************/ - /* Function: 0x47 */ - [todo] WERROR spoolss_47( - ); - - /******************/ - /* Function: 0x48 */ - WERROR spoolss_EnumPrinterData( - [in,ref] policy_handle *handle, - [in] uint32 enum_index, - [out,ref,size_is(value_offered/2),charset(UTF16)] uint16 *value_name, - [in] uint32 value_offered, - [out,ref] uint32 *value_needed, - [out,ref] uint32 *printerdata_type, - [out,ref] DATA_BLOB *buffer, - [in] uint32 data_offered, - [out,ref] uint32 *data_needed - ); - - /******************/ - /* Function: 0x49 */ - WERROR spoolss_DeletePrinterData( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 value_name[] - ); - - /******************/ - /* Function: 0x4a */ - [todo] WERROR spoolss_4a( - ); - - /******************/ - /* Function: 0x4b */ - [todo] WERROR spoolss_4b( - ); - - /******************/ - /* Function: 0x4c */ - [todo] WERROR spoolss_4c( - ); - - /******************/ - /* Function: 0x4d */ - WERROR spoolss_SetPrinterDataEx( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 key_name[], - [in] [string,charset(UTF16)] uint16 value_name[], - [in] uint32 type, - [in] DATA_BLOB buffer, - [in] uint32 offered - ); - - /******************/ - /* Function: 0x4e */ - WERROR spoolss_GetPrinterDataEx( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 key_name[], - [in] [string,charset(UTF16)] uint16 value_name[], - [in] uint32 offered, - [out] uint32 type, - [out] DATA_BLOB buffer, - [out] uint32 needed - ); - - /******************/ - /* Function: 0x4f */ - [public] WERROR spoolss_EnumPrinterDataEx( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 key_name[], - [in] uint32 offered, - [out] DATA_BLOB buffer, - [out] uint32 needed, - [out] uint32 count - ); - - /******************/ - /* Function: 0x50 */ - [public] WERROR spoolss_EnumPrinterKey( - [in, ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 key_name[], - [out] uint32 key_buffer_size, - [out] uint16 key_buffer[key_buffer_size], - [in,out] uint32 needed - ); - - /******************/ - /* Function: 0x51 */ - WERROR spoolss_DeletePrinterDataEx( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 key_name[], - [in] [string,charset(UTF16)] uint16 value_name[] - ); - - /******************/ - /* Function: 0x52 */ - [todo] WERROR spoolss_DeletePrinterKey( - ); - - /******************/ - /* Function: 0x53 */ - [todo] WERROR spoolss_53( - ); - - /******************/ - /* Function: 0x54 */ - [todo] WERROR spoolss_DeletePrinterDriverEx( - ); - - /******************/ - /* Function: 0x55 */ - [todo] WERROR spoolss_55( - ); - - /******************/ - /* Function: 0x56 */ - [todo] WERROR spoolss_56( - ); - - /******************/ - /* Function: 0x57 */ - [todo] WERROR spoolss_57( - ); - - /******************/ - /* Function: 0x58 */ - WERROR spoolss_XcvData( - [in,ref] policy_handle *handle, - [in] [string,charset(UTF16)] uint16 function_name[], - [in] DATA_BLOB in_data, - [in,value(r->in.in_data.length)] uint32 _in_data_length, - [in] uint32 offered, - [in] uint32 unknown1, - [out] DATA_BLOB out_data, - [out] uint32 needed, - [out] uint32 unknown2 - ); - - /******************/ - /* Function: 0x59 */ - [public,todo] WERROR spoolss_AddPrinterDriverEx( - ); - - /******************/ - /* Function: 0x5a */ - [todo] WERROR spoolss_5a( - ); - - /******************/ - /* Function: 0x5b */ - [todo] WERROR spoolss_5b( - ); - - /******************/ - /* Function: 0x5c */ - [todo] WERROR spoolss_5c( - ); - - /******************/ - /* Function: 0x5d */ - [todo] WERROR spoolss_5d( - ); - - /******************/ - /* Function: 0x5e */ - [todo] WERROR spoolss_5e( - ); - - /******************/ - /* Function: 0x5f */ - [todo] WERROR spoolss_5f( - ); -} diff --git a/source4/librpc/scripts/build_idl.sh b/source4/librpc/scripts/build_idl.sh index 8aa93942b9..230939bb48 100755 --- a/source4/librpc/scripts/build_idl.sh +++ b/source4/librpc/scripts/build_idl.sh @@ -1,24 +1,23 @@ #!/bin/sh FULLBUILD=$1 -IDLDIR=$2 -OUTDIR=$3 -shift 3 -PIDL_EXTRA_ARGS="$*" +OUTDIR=$2 +shift 2 +IDL_FILES="$*" [ -d $OUTDIR ] || mkdir -p $OUTDIR || exit 1 -PIDL="$PIDL --outputdir $OUTDIR --header --ndr-parser --server --client --swig --python --dcom-proxy --com-header -- $PIDL_EXTRA_ARGS" +PIDL="$PIDL --outputdir $OUTDIR --header --ndr-parser --server --client --swig --python --dcom-proxy --com-header --includedir ../librpc/idl -- " if [ x$FULLBUILD = xFULL ]; then echo Rebuilding all idl files in $IDLDIR - $PIDL $IDLDIR/*.idl || exit 1 + $PIDL $IDL_FILES || exit 1 exit 0 fi list="" -for f in $IDLDIR/*.idl ; do +for f in $IDL_FILES ; do basename=`basename $f .idl` ndr="$OUTDIR/ndr_$basename.c" # blergh - most shells don't have the -nt function diff --git a/source4/ntvfs/ntvfs.h b/source4/ntvfs/ntvfs.h index 5de8a8b649..0d5738d9f0 100644 --- a/source4/ntvfs/ntvfs.h +++ b/source4/ntvfs/ntvfs.h @@ -23,6 +23,7 @@ #include "libcli/raw/interfaces.h" #include "param/share.h" +#include "librpc/gen_ndr/security.h" /* modules can use the following to determine if the interface has changed */ /* version 1 -> 0 - make module stacking easier -- metze */ diff --git a/source4/rpc_server/dcerpc_server.h b/source4/rpc_server/dcerpc_server.h index b5672b41ac..59a4bab083 100644 --- a/source4/rpc_server/dcerpc_server.h +++ b/source4/rpc_server/dcerpc_server.h @@ -23,7 +23,7 @@ #ifndef SAMBA_DCERPC_SERVER_H #define SAMBA_DCERPC_SERVER_H -#include "librpc/gen_ndr/misc.h" +#include "librpc/gen_ndr/security.h" #include "librpc/rpc/dcerpc.h" #include "librpc/ndr/libndr.h" diff --git a/source4/smbd/service_stream.h b/source4/smbd/service_stream.h index d57a54cdc9..7ec2a0538b 100644 --- a/source4/smbd/service_stream.h +++ b/source4/smbd/service_stream.h @@ -23,7 +23,7 @@ #ifndef __SERVICE_STREAM_H__ #define __SERVICE_STREAM_H__ -#include "librpc/gen_ndr/misc.h" +#include "librpc/gen_ndr/security.h" /* modules can use the following to determine if the interface has changed * please increment the version number after each interface change diff --git a/source4/smbd/service_task.h b/source4/smbd/service_task.h index 207e2cbbca..ddd56bc9c9 100644 --- a/source4/smbd/service_task.h +++ b/source4/smbd/service_task.h @@ -22,7 +22,7 @@ #ifndef __SERVICE_TASK_H__ #define __SERVICE_TASK_H__ -#include "librpc/gen_ndr/misc.h" +#include "librpc/gen_ndr/security.h" struct task_server { struct event_context *event_ctx; |