summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-19 14:27:08 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-19 14:27:08 +0200
commite09c0c1185b4a4ad1d28023549074875028f3e55 (patch)
tree158cd066a2dd19169748a6d94fc990953d49b6c9 /source3
parent33032d591f8e39edae0ce4b35ca1b6e25f04a04b (diff)
parent085e7b0b6cc882b31c11b6d6ea7834235588e1ed (diff)
downloadsamba-e09c0c1185b4a4ad1d28023549074875028f3e55.tar.gz
samba-e09c0c1185b4a4ad1d28023549074875028f3e55.tar.bz2
samba-e09c0c1185b4a4ad1d28023549074875028f3e55.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into crypt
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in71
-rw-r--r--source3/include/includes.h50
-rw-r--r--source3/include/msdfs.h8
-rw-r--r--source3/include/proto.h10
-rw-r--r--source3/lib/genrand.c10
-rw-r--r--source3/lib/util.c11
-rw-r--r--source3/lib/util_str.c229
-rw-r--r--source3/libads/util.c2
-rw-r--r--source3/libnet/libnet_join.c2
-rw-r--r--source3/librpc/gen_ndr/cli_ntsvcs.c19
-rw-r--r--source3/librpc/gen_ndr/cli_ntsvcs.h8
-rw-r--r--source3/librpc/gen_ndr/drsblobs.h189
-rw-r--r--source3/librpc/gen_ndr/ndr_drsblobs.c1311
-rw-r--r--source3/librpc/gen_ndr/ndr_drsblobs.h50
-rw-r--r--source3/librpc/gen_ndr/ndr_drsuapi.h2
-rw-r--r--source3/librpc/gen_ndr/ndr_ntsvcs.c167
-rw-r--r--source3/librpc/gen_ndr/ntsvcs.h14
-rw-r--r--source3/librpc/gen_ndr/srv_ntsvcs.c10
-rw-r--r--source3/librpc/idl/drsblobs.idl436
-rw-r--r--source3/librpc/idl/drsuapi.idl1602
-rw-r--r--source3/librpc/ndr/ndr_drsuapi.c351
-rw-r--r--source3/librpc/ndr/ndr_drsuapi.h35
-rw-r--r--source3/libsmb/trusts_util.c5
-rw-r--r--source3/printing/nt_printing.c9
-rw-r--r--source3/printing/pcap.c2
-rw-r--r--source3/printing/print_aix.c8
-rw-r--r--source3/smbd/reply.c7
-rw-r--r--source3/smbd/server.c2
-rw-r--r--source3/utils/net_ads.c4
-rw-r--r--source3/utils/net_rpc_join.c10
-rw-r--r--source3/utils/net_rpc_printer.c2
-rw-r--r--source3/utils/nmblookup.c2
32 files changed, 1473 insertions, 3165 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 1a607c463d..12d37ce6b0 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -196,7 +196,7 @@ TORTURE_PROGS = bin/smbtorture@EXEEXT@ bin/msgtest@EXEEXT@ \
bin/locktest2@EXEEXT@ bin/nsstest@EXEEXT@ bin/vfstest@EXEEXT@ \
bin/pdbtest@EXEEXT@ bin/talloctort@EXEEXT@ bin/replacetort@EXEEXT@ \
bin/tdbtorture@EXEEXT@ \
- bin/smbconftort@EXEEXT@
+ bin/smbconftort@EXEEXT@ bin/vlp@EXEEXT@
BIN_PROGS = @EXTRA_BIN_PROGS@ \
$(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) $(BIN_PROGS4)
@@ -247,9 +247,10 @@ SERVER_MUTEX_OBJ = lib/server_mutex.o
PASSCHANGE_OBJ = libsmb/passchange.o
-LIBNDR_DRSUAPI_OBJ = librpc/ndr/ndr_drsuapi.o \
+LIBNDR_DRSUAPI_OBJ = ../librpc/ndr/ndr_drsuapi.o \
../librpc/ndr/ndr_compression.o \
librpc/gen_ndr/ndr_drsuapi.o \
+ ../librpc/ndr/ndr_drsblobs.o \
librpc/gen_ndr/ndr_drsblobs.o
ZLIB_OBJ = @ZLIB_OBJS@
@@ -318,7 +319,8 @@ LIBSAMBAUTIL_OBJ = @LIBTALLOC_STATIC@ \
UTIL_OBJ = ../lib/util/rbtree.o ../lib/util/signal.o ../lib/util/time.o \
../lib/util/xfile.o ../lib/util/util_strlist.o \
../lib/util/util_file.o ../lib/util/data_blob.o \
- ../lib/util/util.o ../lib/util/fsusage.o
+ ../lib/util/util.o ../lib/util/fsusage.o \
+ ../lib/util/params.o
CRYPTO_OBJ = ../lib/crypto/crc32.o ../lib/crypto/md5.o \
../lib/crypto/hmacmd5.o ../lib/crypto/arcfour.o \
@@ -360,7 +362,7 @@ READLINE_OBJ = lib/readline.o
# Be sure to include them into your application
POPT_LIB_OBJ = lib/popt_common.o
-PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o ../lib/util/params.o param/util.o lib/sharesec.o lib/ldap_debug_handler.o
+PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o param/util.o lib/sharesec.o lib/ldap_debug_handler.o
PARAM_REG_ADD_OBJ = $(REG_SMBCONF_OBJ) $(LIBSMBCONF_OBJ) $(PRIVILEGES_BASIC_OBJ)
PARAM_OBJ = $(PARAM_WITHOUT_REG_OBJ) $(PARAM_REG_ADD_OBJ)
@@ -918,7 +920,7 @@ SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) \
MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
$(LIB_NONSMBD_OBJ) \
- $(LIBNDR_GEN_OBJ0)
+ $(LIBNDR_GEN_OBJ0) $(ZLIB_LIBS)
MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
$(LIB_NONSMBD_OBJ) \
@@ -926,7 +928,7 @@ MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
LOCKTEST_OBJ = torture/locktest.o $(PARAM_OBJ) $(LOCKING_OBJ) $(KRBCLIENT_OBJ) \
$(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \
- $(LIBNDR_GEN_OBJ0)
+ $(LIBNDR_GEN_OBJ0) $(ZLIB_LIBS)
NSSTEST_OBJ = torture/nsstest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
$(LIB_NONSMBD_OBJ) \
@@ -945,7 +947,7 @@ LOG2PCAP_OBJ = utils/log2pcaphex.o
LOCKTEST2_OBJ = torture/locktest2.o $(PARAM_OBJ) $(LOCKING_OBJ) $(LIBSMB_OBJ) \
$(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
- $(LIBNDR_GEN_OBJ0)
+ $(LIBNDR_GEN_OBJ0) $(ZLIB_LIBS)
SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
$(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \
@@ -1161,7 +1163,7 @@ pam_winbind: SHOWFLAGS bin/pam_winbind.@SHLIBEXT@
gpext_modules:: $(GPEXT_MODULES)
-torture:: SHOWFLAGS $(TORTURE_PROGS)
+torture:: SHOWFLAGS $(TORTURE_PROGS)
smbtorture : SHOWFLAGS bin/smbtorture@EXEEXT@
@@ -1212,8 +1214,8 @@ samba3-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
+ ../librpc/idl/ntsvcs.idl librpc/idl/libnetapi.idl ../librpc/idl/drsuapi.idl \
+ ../librpc/idl/drsblobs.idl ../librpc/idl/nbt.idl
#####################################################################
@@ -1327,40 +1329,41 @@ bin/smbd@EXEEXT@: $(BINARY_PREREQS) $(SMBD_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARE
$(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
$(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) \
$(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
- $(WINBIND_LIBS)
+ $(WINBIND_LIBS) $(ZLIB_LIBS)
bin/nmbd@EXEEXT@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(POPT_LIBS) \
- $(KRB5LIBS) $(LDAP_LIBS)
+ $(KRB5LIBS) $(LDAP_LIBS) $(ZLIB_LIBS)
bin/swat@EXEEXT@: $(BINARY_PREREQS) $(SWAT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \
$(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) $(POPT_LIBS) $(KRB5LIBS) \
- $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+ $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
bin/rpcclient@EXEEXT@: $(BINARY_PREREQS) $(RPCCLIENT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(PASSDB_LIBS) $(RPCCLIENT_OBJ) \
$(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
$(KRB5LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
- $(WINBIND_LIBS)
+ $(WINBIND_LIBS) $(ZLIB_LIBS)
bin/smbclient@EXEEXT@: $(BINARY_PREREQS) $(CLIENT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) \
$(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
$(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(DNSSD_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
bin/net@EXEEXT@: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @LIBNETAPI_SHARED@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
$(POPT_LIBS) $(KRB5LIBS) $(UUID_LIBS) $(LDAP_LIBS) \
$(PASSDB_LIBS) $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) \
- @INIPARSERLIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(LIBNETAPI_LIBS)
+ @INIPARSERLIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(LIBNETAPI_LIBS) \
+ $(ZLIB_LIBS)
bin/profiles@EXEEXT@: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
@echo Linking $@
@@ -1370,7 +1373,7 @@ bin/profiles@EXEEXT@: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ @LIBTALLOC_
bin/smbspool@EXEEXT@: $(BINARY_PREREQS) $(CUPS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
- $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+ $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
bin/mount.cifs@EXEEXT@: $(BINARY_PREREQS) $(CIFS_MOUNT_OBJ) @BUILD_POPT@
@echo Linking $@
@@ -1408,13 +1411,13 @@ bin/smbtree@EXEEXT@: $(BINARY_PREREQS) $(SMBTREE_OBJ) @BUILD_POPT@ @LIBTALLOC_SH
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) \
$(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
bin/smbpasswd@EXEEXT@: $(BINARY_PREREQS) $(SMBPASSWD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(PASSDB_LIBS) \
$(DYNEXP) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
bin/pdbedit@EXEEXT@: $(BINARY_PREREQS) $(PDBEDIT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking $@
@@ -1426,7 +1429,7 @@ bin/smbget@EXEEXT@: $(BINARY_PREREQS) $(SMBGET_OBJ) @BUILD_POPT@ @LIBTALLOC_SHAR
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
$(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
bin/nmblookup@EXEEXT@: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
@echo Linking $@
@@ -1437,7 +1440,7 @@ bin/smbtorture@EXEEXT@: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ @LIBTAL
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) \
$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) \
- $(LIBTDB_LIBS)
+ $(LIBTDB_LIBS) $(ZLIB_LIBS)
bin/talloctort@EXEEXT@: $(BINARY_PREREQS) $(TALLOCTORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
@echo Linking $@
@@ -1460,25 +1463,25 @@ bin/masktest@EXEEXT@: $(BINARY_PREREQS) $(MASKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
bin/msgtest@EXEEXT@: $(BINARY_PREREQS) $(MSGTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
bin/smbcacls@EXEEXT@: $(BINARY_PREREQS) $(SMBCACLS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SMBCACLS_OBJ) $(DYNEXP) $(LDFLAGS) \
$(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
bin/smbcquotas@EXEEXT@: $(BINARY_PREREQS) $(SMBCQUOTAS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) \
$(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
bin/eventlogadm@EXEEXT@: $(BINARY_PREREQS) $(EVTLOGADM_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
@echo Linking $@
@@ -1494,19 +1497,19 @@ bin/locktest@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
bin/nsstest@EXEEXT@: $(BINARY_PREREQS) $(NSSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
bin/pdbtest@EXEEXT@: $(BINARY_PREREQS) $(PDBTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(PDBTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) \
- $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+ $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
bin/vfstest@EXEEXT@: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking $@
@@ -1514,7 +1517,7 @@ bin/vfstest@EXEEXT@: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SH
$(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
$(ACL_LIBS) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
@SMBD_LIBS@ $(NSCD_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
- $(WINBIND_LIBS)
+ $(WINBIND_LIBS) $(ZLIB_LIBS)
bin/smbiconv@EXEEXT@: $(BINARY_PREREQS) $(SMBICONV_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
@echo Linking $@
@@ -1531,7 +1534,7 @@ bin/locktest2@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST2_OBJ) @BUILD_POPT@ @LIBTALLO
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) \
$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
bin/ndrdump@EXEEXT@: $(BINARY_PREREQS) $(NDRDUMP_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
@echo Linking $@
@@ -1547,7 +1550,7 @@ bin/smbfilter@EXEEXT@: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@ @LIBTALLO
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) \
$(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
bin/ldbedit: $(BINARY_PREREQS) $(LDBEDIT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo Linking $@
@@ -2171,14 +2174,16 @@ bin/winbindd@EXEEXT@: $(BINARY_PREREQS) $(WINBINDD_OBJ) @BUILD_POPT@ @LIBTALLOC_
@echo "Linking $@"
@$(CC) $(FLAGS) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
$(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
- $(PASSDB_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+ $(PASSDB_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) \
+ $(ZLIB_LIBS)
bin/vlp@EXEEXT@: $(BINARY_PREREQS) $(VLP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
@echo "Linking $@"
@$(CC) $(FLAGS) -o $@ $(VLP_OBJ) $(LDFLAGS) $(DYNEXP) \
$(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
$(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
- $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) \
+ $(ZLIB_LIBS)
@WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ)
@echo "Linking $@"
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 9594393474..ac5b2b215c 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -71,23 +71,6 @@
#undef HAVE_TERMIOS_H
#endif
-#ifndef _PUBLIC_
-#ifdef HAVE_VISIBILITY_ATTR
-# define _PUBLIC_ __attribute__((visibility("default")))
-#else
-# define _PUBLIC_
-#endif
-#endif
-
-#if defined(__GNUC__) && !defined(__cplusplus)
-/** gcc attribute used on function parameters so that it does not emit
- * warnings about them being unused. **/
-# define UNUSED(param) param __attribute__ ((unused))
-#else
-# define UNUSED(param) param
-/** Feel free to add definitions for other compilers here. */
-#endif
-
#ifdef RELIANTUNIX
/*
* <unistd.h> has to be included before any other to get
@@ -288,12 +271,10 @@ typedef int ber_int_t;
/*
* Define additional missing types
*/
-#if defined(HAVE_SIG_ATOMIC_T_TYPE) && defined(AIX)
+#if defined(AIX)
typedef sig_atomic_t SIG_ATOMIC_T;
-#elif defined(HAVE_SIG_ATOMIC_T_TYPE) && !defined(AIX)
-typedef sig_atomic_t volatile SIG_ATOMIC_T;
#else
-typedef int volatile SIG_ATOMIC_T;
+typedef sig_atomic_t volatile SIG_ATOMIC_T;
#endif
#ifndef uchar
@@ -593,6 +574,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
/* Lists, trees, caching, database... */
#include "../lib/util/xfile.h"
#include "../lib/util/memory.h"
+#include "../lib/util/attr.h"
#include "intl.h"
#include "../lib/util/dlinklist.h"
#include "tdb.h"
@@ -782,14 +764,6 @@ enum flush_reason_enum {
/* prototypes from lib/util_transfer_file.c */
#include "transfer_file.h"
-#ifdef __COMPAR_FN_T
-#define QSORT_CAST (__compar_fn_t)
-#endif
-
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif
-
#ifndef DEFAULT_PRINTING
#ifdef HAVE_CUPS
#define DEFAULT_PRINTING PRINT_CUPS
@@ -1107,19 +1081,11 @@ ssize_t readahead(int fd, off64_t offset, size_t count);
#define CONST_DISCARD(type, ptr) ((type) ((void *) (ptr)))
#define CONST_ADD(type, ptr) ((type) ((const void *) (ptr)))
-#ifndef NORETURN_ATTRIBUTE
-#if (__GNUC__ >= 3)
-#define NORETURN_ATTRIBUTE __attribute__ ((noreturn))
-#else
-#define NORETURN_ATTRIBUTE
-#endif
-#endif
-
-void smb_panic( const char *why ) NORETURN_ATTRIBUTE ;
-void dump_core(void) NORETURN_ATTRIBUTE ;
-void exit_server(const char *const reason) NORETURN_ATTRIBUTE ;
-void exit_server_cleanly(const char *const reason) NORETURN_ATTRIBUTE ;
-void exit_server_fault(void) NORETURN_ATTRIBUTE ;
+void smb_panic( const char *why ) _NORETURN_;
+void dump_core(void) _NORETURN_;
+void exit_server(const char *const reason) _NORETURN_;
+void exit_server_cleanly(const char *const reason) _NORETURN_;
+void exit_server_fault(void) _NORETURN_;
#ifdef HAVE_LIBNSCD
#include "libnscd.h"
diff --git a/source3/include/msdfs.h b/source3/include/msdfs.h
index 4551325843..800393c75d 100644
--- a/source3/include/msdfs.h
+++ b/source3/include/msdfs.h
@@ -64,12 +64,4 @@ struct dfs_path {
bool posix_path;
};
-#define init_dfsroot(conn, inbuf, outbuf) \
-{ if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) { \
- DEBUG(2,("Serving %s as a Dfs root\n", \
- lp_servicename(SNUM(conn)) )); \
- SSVAL(outbuf, smb_vwv2, SMB_SHARE_IN_DFS \
- | SVAL(outbuf, smb_vwv2)); \
-} }
-
#endif /* _MSDFS_H */
diff --git a/source3/include/proto.h b/source3/include/proto.h
index c4c89b0448..18bbd11ab9 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -577,8 +577,8 @@ void gencache_unlock_entry( const char *key );
void set_rand_reseed_callback(void (*fn)(int *));
void set_need_random_reseed(void);
-void generate_random_buffer( unsigned char *out, int len);
-char *generate_random_str(size_t len);
+void generate_random_buffer(uint8_t *out, int len);
+char *generate_random_str(TALLOC_CTX *mem_ctx, size_t len);
/* The following definitions come from lib/iconv.c */
@@ -770,12 +770,6 @@ int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorf
/* The following definitions come from lib/sendfile.c */
ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
/* The following definitions come from lib/server_mutex.c */
diff --git a/source3/lib/genrand.c b/source3/lib/genrand.c
index 57314c55df..076a2fd518 100644
--- a/source3/lib/genrand.c
+++ b/source3/lib/genrand.c
@@ -156,7 +156,7 @@ static int do_reseed(bool use_fd, int fd)
Interface to the (hopefully) good crypto random number generator.
********************************************************************/
-void generate_random_buffer( unsigned char *out, int len)
+void generate_random_buffer(uint8_t *out, int len)
{
static int urand_fd = -1;
unsigned char md4_buf[64];
@@ -205,15 +205,11 @@ void generate_random_buffer( unsigned char *out, int len)
static char c_list[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+_-#.,";
-char *generate_random_str(size_t len)
+char *generate_random_str(TALLOC_CTX *mem_ctx, size_t len)
{
- static unsigned char retstr[256];
+ unsigned char *retstr = talloc_zero_array(mem_ctx, unsigned char, len);
size_t i;
- memset(retstr, '\0', sizeof(retstr));
-
- if (len > sizeof(retstr)-1)
- len = sizeof(retstr) -1;
generate_random_buffer( retstr, len);
for (i = 0; i < len; i++)
retstr[i] = c_list[ retstr[i] % (sizeof(c_list)-1) ];
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 92b818b0aa..820cf376be 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1228,17 +1228,6 @@ void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size,
}
/****************************************************************************
- Free memory, checks for NULL.
- Use directly SAFE_FREE()
- Exists only because we need to pass a function pointer somewhere --SSS
-****************************************************************************/
-
-void safe_free(void *p)
-{
- SAFE_FREE(p);
-}
-
-/****************************************************************************
Get my own name and IP.
****************************************************************************/
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c
index f6783f10ff..046ce61ea3 100644
--- a/source3/lib/util_str.c
+++ b/source3/lib/util_str.c
@@ -558,47 +558,6 @@ bool trim_char(char *s,char cfront,char cback)
}
/**
- Trim the specified elements off the front and back of a string.
-**/
-
-bool trim_string(char *s,const char *front,const char *back)
-{
- bool ret = false;
- size_t front_len;
- size_t back_len;
- size_t len;
-
- /* Ignore null or empty strings. */
- if (!s || (s[0] == '\0'))
- return false;
-
- front_len = front? strlen(front) : 0;
- back_len = back? strlen(back) : 0;
-
- len = strlen(s);
-
- if (front_len) {
- while (len && strncmp(s, front, front_len)==0) {
- /* Must use memmove here as src & dest can
- * easily overlap. Found by valgrind. JRA. */
- memmove(s, s+front_len, (len-front_len)+1);
- len -= front_len;
- ret=true;
- }
- }
-
- if (back_len) {
- while ((len >= back_len) &&
- strncmp(s+len-back_len,back,back_len)==0) {
- s[len-back_len]='\0';
- len -= back_len;
- ret=true;
- }
- }
- return ret;
-}
-
-/**
Does a string have any uppercase chars in it?
**/
@@ -649,29 +608,6 @@ bool strhaslower(const char *s)
}
/**
- Find the number of 'c' chars in a string
-**/
-
-size_t count_chars(const char *s,char c)
-{
- smb_ucs2_t *ptr;
- int count;
- smb_ucs2_t *alloc_tmpbuf = NULL;
- size_t converted_size;
-
- if (!push_ucs2_allocate(&alloc_tmpbuf, s, &converted_size)) {
- return 0;
- }
-
- for(count=0,ptr=alloc_tmpbuf;*ptr;ptr++)
- if(*ptr==UCS2_CHAR(c))
- count++;
-
- SAFE_FREE(alloc_tmpbuf);
- return(count);
-}
-
-/**
Safe string copy into a known length string. maxlength does not
include the terminating zero.
**/
@@ -871,88 +807,6 @@ static char *strncpyn(char *dest, const char *src, size_t n, char c)
#endif
/**
- Routine to get hex characters and turn them into a 16 byte array.
- the array can be variable length, and any non-hex-numeric
- characters are skipped. "0xnn" or "0Xnn" is specially catered
- for.
-
- valid examples: "0A5D15"; "0x15, 0x49, 0xa2"; "59\ta9\te3\n"
-
-**/
-
-size_t strhex_to_str(char *buf, size_t buf_len, const char *strhex, size_t strhex_len)
-{
- size_t i;
- size_t num_chars = 0;
- unsigned char lonybble, hinybble;
- const char *hexchars = "0123456789ABCDEF";
- char *p1 = NULL, *p2 = NULL;
-
- for (i = 0; i < strhex_len && strhex[i] != 0; i++) {
- if (strnequal(hexchars, "0x", 2)) {
- i++; /* skip two chars */
- continue;
- }
-
- if (!(p1 = strchr_m(hexchars, toupper_ascii(strhex[i]))))
- break;
-
- i++; /* next hex digit */
-
- if (!(p2 = strchr_m(hexchars, toupper_ascii(strhex[i]))))
- break;
-
- /* get the two nybbles */
- hinybble = PTR_DIFF(p1, hexchars);
- lonybble = PTR_DIFF(p2, hexchars);
-
- if (num_chars >= buf_len) {
- break;
- }
- buf[num_chars] = (hinybble << 4) | lonybble;
- num_chars++;
-
- p1 = NULL;
- p2 = NULL;
- }
- return num_chars;
-}
-
-DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex)
-{
- DATA_BLOB ret_blob;
-
- if (mem_ctx != NULL)
- ret_blob = data_blob_talloc(mem_ctx, NULL, strlen(strhex)/2+1);
- else
- ret_blob = data_blob(NULL, strlen(strhex)/2+1);
-
- ret_blob.length = strhex_to_str((char*)ret_blob.data,
- ret_blob.length,
- strhex,
- strlen(strhex));
-
- return ret_blob;
-}
-
-/**
- * Routine to print a buffer as HEX digits, into an allocated string.
- */
-
-char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len)
-{
- int i;
- char *hex_buffer;
-
- hex_buffer = TALLOC_ARRAY(mem_ctx, char, (len*2)+1);
-
- for (i = 0; i < len; i++)
- slprintf(&hex_buffer[i*2], 3, "%02X", buff_in[i]);
-
- return hex_buffer;
-}
-
-/**
Check if a string is part of a list.
**/
@@ -2105,41 +1959,6 @@ void ipstr_list_free(char* ipstr_list)
SAFE_FREE(ipstr_list);
}
-/**
- Unescape a URL encoded string, in place.
-**/
-
-void rfc1738_unescape(char *buf)
-{
- char *p=buf;
-
- while (p && *p && (p=strchr_m(p,'%'))) {
- int c1 = p[1];
- int c2 = p[2];
-
- if (c1 >= '0' && c1 <= '9')
- c1 = c1 - '0';
- else if (c1 >= 'A' && c1 <= 'F')
- c1 = 10 + c1 - 'A';
- else if (c1 >= 'a' && c1 <= 'f')
- c1 = 10 + c1 - 'a';
- else {p++; continue;}
-
- if (c2 >= '0' && c2 <= '9')
- c2 = c2 - '0';
- else if (c2 >= 'A' && c2 <= 'F')
- c2 = 10 + c2 - 'A';
- else if (c2 >= 'a' && c2 <= 'f')
- c2 = 10 + c2 - 'a';
- else {p++; continue;}
-
- *p = (c1<<4) | c2;
-
- memmove(p+1, p+3, strlen(p+3)+1);
- p++;
- }
-}
-
static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/**
@@ -2550,54 +2369,6 @@ bool validate_net_name( const char *name,
}
-/**
-return the number of bytes occupied by a buffer in ASCII format
-the result includes the null termination
-limited by 'n' bytes
-**/
-size_t ascii_len_n(const char *src, size_t n)
-{
- size_t len;
-
- len = strnlen(src, n);
- if (len+1 <= n) {
- len += 1;
- }
-
- return len;
-}
-
-/**
-return the number of bytes occupied by a buffer in CH_UTF16 format
-the result includes the null termination
-**/
-size_t utf16_len(const void *buf)
-{
- size_t len;
-
- for (len = 0; SVAL(buf,len); len += 2) ;
-
- return len + 2;
-}
-
-/**
-return the number of bytes occupied by a buffer in CH_UTF16 format
-the result includes the null termination
-limited by 'n' bytes
-**/
-size_t utf16_len_n(const void *src, size_t n)
-{
- size_t len;
-
- for (len = 0; (len+2 < n) && SVAL(src, len); len += 2) ;
-
- if (len+2 <= n) {
- len += 2;
- }
-
- return len;
-}
-
/*******************************************************************
Add a shell escape character '\' to any character not in a known list
of characters. UNIX charset format.
diff --git a/source3/libads/util.c b/source3/libads/util.c
index d23c36f326..9866a15285 100644
--- a/source3/libads/util.c
+++ b/source3/libads/util.c
@@ -33,7 +33,7 @@ ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_princip
return ADS_ERROR_SYSTEM(ENOENT);
}
- new_password = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
+ new_password = generate_random_str(talloc_tos(), DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
ret = kerberos_set_password(ads->auth.kdc_server, host_principal, password, host_principal, new_password, ads->auth.time_offset);
diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index ab8af0be6b..6935e000dc 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -775,7 +775,7 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
ZERO_STRUCT(user_pol);
if (!r->in.machine_password) {
- r->in.machine_password = talloc_strdup(mem_ctx, generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH));
+ r->in.machine_password = generate_random_str(mem_ctx, DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
NT_STATUS_HAVE_NO_MEMORY(r->in.machine_password);
}
diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.c b/source3/librpc/gen_ndr/cli_ntsvcs.c
index bc5dba4d91..f8ef7a99ad 100644
--- a/source3/librpc/gen_ndr/cli_ntsvcs.c
+++ b/source3/librpc/gen_ndr/cli_ntsvcs.c
@@ -424,12 +424,19 @@ NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli,
NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ const char *filter /* [in] [unique,charset(UTF16)] */,
+ uint16_t *buffer /* [out] [ref,length_is(*length),size_is(*length)] */,
+ uint32_t *length /* [in,out] [ref] */,
+ uint32_t flags /* [in] */,
WERROR *werror)
{
struct PNP_GetDeviceList r;
NTSTATUS status;
/* In parameters */
+ r.in.filter = filter;
+ r.in.length = length;
+ r.in.flags = flags;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, &r);
@@ -454,6 +461,8 @@ NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
}
/* Return variables */
+ memcpy(buffer, r.out.buffer, *r.in.length * sizeof(*buffer));
+ *length = *r.out.length;
/* Return result */
if (werror) {
@@ -555,11 +564,11 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *devicepath /* [in] [ref,charset(UTF16)] */,
uint32_t property /* [in] */,
- uint32_t *unknown1 /* [in,out] [ref] */,
+ uint32_t *reg_data_type /* [in,out] [ref] */,
uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
uint32_t *buffer_size /* [in,out] [ref] */,
uint32_t *needed /* [in,out] [ref] */,
- uint32_t unknown3 /* [in] */,
+ uint32_t flags /* [in] */,
WERROR *werror)
{
struct PNP_GetDeviceRegProp r;
@@ -568,10 +577,10 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
/* In parameters */
r.in.devicepath = devicepath;
r.in.property = property;
- r.in.unknown1 = unknown1;
+ r.in.reg_data_type = reg_data_type;
r.in.buffer_size = buffer_size;
r.in.needed = needed;
- r.in.unknown3 = unknown3;
+ r.in.flags = flags;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, &r);
@@ -596,7 +605,7 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
}
/* Return variables */
- *unknown1 = *r.out.unknown1;
+ *reg_data_type = *r.out.reg_data_type;
memcpy(buffer, r.out.buffer, *r.in.buffer_size * sizeof(*buffer));
*buffer_size = *r.out.buffer_size;
*needed = *r.out.needed;
diff --git a/source3/librpc/gen_ndr/cli_ntsvcs.h b/source3/librpc/gen_ndr/cli_ntsvcs.h
index a52a79ecc5..4ed8a401ec 100644
--- a/source3/librpc/gen_ndr/cli_ntsvcs.h
+++ b/source3/librpc/gen_ndr/cli_ntsvcs.h
@@ -36,6 +36,10 @@ NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli,
WERROR *werror);
NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
+ const char *filter /* [in] [unique,charset(UTF16)] */,
+ uint16_t *buffer /* [out] [ref,length_is(*length),size_is(*length)] */,
+ uint32_t *length /* [in,out] [ref] */,
+ uint32_t flags /* [in] */,
WERROR *werror);
NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
@@ -50,11 +54,11 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const char *devicepath /* [in] [ref,charset(UTF16)] */,
uint32_t property /* [in] */,
- uint32_t *unknown1 /* [in,out] [ref] */,
+ uint32_t *reg_data_type /* [in,out] [ref] */,
uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
uint32_t *buffer_size /* [in,out] [ref] */,
uint32_t *needed /* [in,out] [ref] */,
- uint32_t unknown3 /* [in] */,
+ uint32_t flags /* [in] */,
WERROR *werror);
NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/source3/librpc/gen_ndr/drsblobs.h b/source3/librpc/gen_ndr/drsblobs.h
index b0ab9aea2a..692746468e 100644
--- a/source3/librpc/gen_ndr/drsblobs.h
+++ b/source3/librpc/gen_ndr/drsblobs.h
@@ -4,12 +4,16 @@
#include "librpc/gen_ndr/drsuapi.h"
#include "librpc/gen_ndr/misc.h"
+#include "librpc/gen_ndr/samr.h"
+#include "librpc/gen_ndr/lsa.h"
#ifndef _HEADER_drsblobs
#define _HEADER_drsblobs
#define SUPPLEMENTAL_CREDENTIALS_PREFIX ( " " )
enum drsuapi_DsAttributeId;
+enum lsa_TrustAuthType;
+
struct replPropertyMetaData1 {
enum drsuapi_DsAttributeId attid;
uint32_t version;
@@ -247,7 +251,7 @@ struct package_PrimaryKerberosBlob {
}/* [public] */;
struct package_PrimaryCLEARTEXTBlob {
- const char * cleartext;/* [flag(LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING)] */
+ DATA_BLOB cleartext;/* [flag(LIBNDR_FLAG_REMAINING)] */
}/* [public] */;
struct package_PrimaryWDigestHash {
@@ -263,63 +267,158 @@ struct package_PrimaryWDigestBlob {
struct package_PrimaryWDigestHash *hashes;
}/* [public] */;
-struct trustAuthInOutSecret1 {
- NTTIME time1;
- uint32_t unknown1;
- DATA_BLOB value;
- DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
+struct AuthInfoNone {
+ uint32_t size;/* [value(0)] */
};
-struct trustAuthInOutCtr1 {
- struct trustAuthInOutSecret1 *value1;/* [relative] */
- struct trustAuthInOutSecret1 *value2;/* [relative] */
+struct AuthInfoNT4Owf {
+ uint32_t size;/* [value(16)] */
+ struct samr_Password password;
};
-struct trustAuthInOutSecret2V1 {
- NTTIME time1;
- uint32_t unknown1;
- DATA_BLOB value;
- NTTIME time2;
- uint32_t unknown2;
- uint32_t unknown3;
- uint32_t unknown4;
- DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
+struct AuthInfoClear {
+ uint32_t size;
+ uint8_t *password;
};
-struct trustAuthInOutSecret2V2 {
- NTTIME time1;
- uint32_t unknown1;
- DATA_BLOB value;
- NTTIME time2;
- uint32_t unknown2;
- uint32_t unknown3;
- DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
-};
-
-struct trustAuthInOutCtr2 {
- struct trustAuthInOutSecret2V1 *value1;/* [relative] */
- struct trustAuthInOutSecret2V2 *value2;/* [relative] */
+struct AuthInfoVersion {
+ uint32_t size;/* [value(4)] */
+ uint32_t version;
};
-union trustAuthInOutCtr {
- struct trustAuthInOutCtr1 ctr1;/* [case] */
- struct trustAuthInOutCtr2 ctr2;/* [case(2)] */
+union AuthInfo {
+ struct AuthInfoNone none;/* [case(TRUST_AUTH_TYPE_NONE)] */
+ struct AuthInfoNT4Owf nt4owf;/* [case(TRUST_AUTH_TYPE_NT4OWF)] */
+ struct AuthInfoClear clear;/* [case(TRUST_AUTH_TYPE_CLEAR)] */
+ struct AuthInfoVersion version;/* [case(TRUST_AUTH_TYPE_VERSION)] */
}/* [nodiscriminant] */;
-struct trustAuthInOutBlob {
- uint32_t version;
- union trustAuthInOutCtr ctr;/* [switch_is(version)] */
+struct AuthenticationInformation {
+ NTTIME LastUpdateTime;
+ enum lsa_TrustAuthType AuthType;
+ union AuthInfo AuthInfo;/* [switch_is(AuthType)] */
+ DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
}/* [public] */;
+struct AuthenticationInformationArray {
+ struct AuthenticationInformation *array;/* [size_is] */
+}/* [noprint,nopush,nopull] */;
+
+struct trustAuthInOutBlob {
+ uint32_t count;
+ struct AuthenticationInformationArray *current;/* [relative] */
+ struct AuthenticationInformationArray *previous;/* [relative] */
+}/* [noprint,gensize,nopull,public,nopush] */;
+
+struct trustCurrentPasswords {
+ uint32_t count;
+ struct AuthenticationInformation **current;/* [relative] */
+}/* [gensize,public] */;
+
+struct trustDomainPasswords {
+ uint8_t confounder[512];
+ struct trustCurrentPasswords outgoing;/* [subcontext_size(outgoing_size),subcontext(0)] */
+ struct trustCurrentPasswords incoming;/* [subcontext_size(incoming_size),subcontext(0)] */
+ uint32_t outgoing_size;/* [value(ndr_size_trustCurrentPasswords(&outgoing,ndr->flags))] */
+ uint32_t incoming_size;/* [value(ndr_size_trustCurrentPasswords(&incoming,ndr->flags))] */
+}/* [public,nopull] */;
+
struct DsCompressedChunk {
uint32_t marker;
DATA_BLOB data;
}/* [public] */;
-struct DsCompressedBlob {
- struct DsCompressedChunk chunks[5];
+struct ExtendedErrorAString {
+ uint16_t __size;
+ const char *string;/* [unique,charset(DOS),size_is(__size)] */
+};
+
+struct ExtendedErrorUString {
+ uint16_t __size;
+ const char *string;/* [unique,charset(UTF16),size_is(__size)] */
+};
+
+struct ExtendedErrorBlob {
+ uint16_t length;
+ uint8_t *data;/* [unique,size_is(length)] */
+};
+
+enum ExtendedErrorComputerNamePresent
+#ifndef USE_UINT_ENUMS
+ {
+ EXTENDED_ERROR_COMPUTER_NAME_PRESENT=1,
+ EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT=2
+}
+#else
+ { __donnot_use_enum_ExtendedErrorComputerNamePresent=0x7FFFFFFF}
+#define EXTENDED_ERROR_COMPUTER_NAME_PRESENT ( 1 )
+#define EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT ( 2 )
+#endif
+;
+
+union ExtendedErrorComputerNameU {
+ struct ExtendedErrorUString name;/* [case(EXTENDED_ERROR_COMPUTER_NAME_PRESENT)] */
+}/* [switch_type(ExtendedErrorComputerNamePresent)] */;
+
+struct ExtendedErrorComputerName {
+ enum ExtendedErrorComputerNamePresent present;
+ union ExtendedErrorComputerNameU n;/* [switch_is(present)] */
+};
+
+enum ExtendedErrorParamType
+#ifndef USE_UINT_ENUMS
+ {
+ EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING=1,
+ EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING=2,
+ EXTENDED_ERROR_PARAM_TYPE_UINT32=3,
+ EXTENDED_ERROR_PARAM_TYPE_UINT16=4,
+ EXTENDED_ERROR_PARAM_TYPE_UINT64=5,
+ EXTENDED_ERROR_PARAM_TYPE_NONE=6,
+ EXTENDED_ERROR_PARAM_TYPE_BLOB=7
+}
+#else
+ { __donnot_use_enum_ExtendedErrorParamType=0x7FFFFFFF}
+#define EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING ( 1 )
+#define EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING ( 2 )
+#define EXTENDED_ERROR_PARAM_TYPE_UINT32 ( 3 )
+#define EXTENDED_ERROR_PARAM_TYPE_UINT16 ( 4 )
+#define EXTENDED_ERROR_PARAM_TYPE_UINT64 ( 5 )
+#define EXTENDED_ERROR_PARAM_TYPE_NONE ( 6 )
+#define EXTENDED_ERROR_PARAM_TYPE_BLOB ( 7 )
+#endif
+;
+
+union ExtendedErrorParamU {
+ struct ExtendedErrorAString a_string;/* [case(EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING)] */
+ struct ExtendedErrorUString u_string;/* [case(EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING)] */
+ uint32_t uint32;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT32)] */
+ uint16_t uint16;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT16)] */
+ uint64_t uint64;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT64)] */
+ struct ExtendedErrorBlob blob;/* [case(EXTENDED_ERROR_PARAM_TYPE_BLOB)] */
+}/* [switch_type(ExtendedErrorParamType)] */;
+
+struct ExtendedErrorParam {
+ enum ExtendedErrorParamType type;
+ union ExtendedErrorParamU p;/* [switch_is(type)] */
+};
+
+struct ExtendedErrorInfo {
+ struct ExtendedErrorInfo *next;/* [unique] */
+ struct ExtendedErrorComputerName computer_name;
+ uint64_t pid;
+ NTTIME time;
+ uint32_t generating_component;
+ WERROR status;
+ uint16_t detection_location;
+ uint16_t flags;
+ uint16_t num_params;
+ struct ExtendedErrorParam *params;/* [size_is(num_params)] */
}/* [public] */;
+struct ExtendedErrorInfoPtr {
+ struct ExtendedErrorInfo *info;/* [unique] */
+};
+
struct decode_replPropertyMetaData {
struct {
@@ -417,9 +516,17 @@ struct decode_trustAuthInOut {
};
-struct decode_DsCompressed {
+struct decode_trustDomainPasswords {
+ struct {
+ struct trustDomainPasswords blob;
+ } in;
+
+};
+
+
+struct decode_ExtendedErrorInfo {
struct {
- struct DsCompressedBlob blob;
+ struct ExtendedErrorInfoPtr ptr;/* [subcontext(0xFFFFFC01)] */
} in;
};
diff --git a/source3/librpc/gen_ndr/ndr_drsblobs.c b/source3/librpc/gen_ndr/ndr_drsblobs.c
index 41a448cbe3..dd8d77ea15 100644
--- a/source3/librpc/gen_ndr/ndr_drsblobs.c
+++ b/source3/librpc/gen_ndr/ndr_drsblobs.c
@@ -5,6 +5,8 @@
#include "librpc/gen_ndr/ndr_drsuapi.h"
#include "librpc/gen_ndr/ndr_misc.h"
+#include "librpc/gen_ndr/ndr_samr.h"
+#include "librpc/gen_ndr/ndr_lsa.h"
static enum ndr_err_code ndr_push_replPropertyMetaData1(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaData1 *r)
{
if (ndr_flags & NDR_SCALARS) {
@@ -2165,10 +2167,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
{
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
- NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->cleartext));
- ndr->flags = _flags_save_string;
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->cleartext));
+ ndr->flags = _flags_save_DATA_BLOB;
}
}
if (ndr_flags & NDR_BUFFERS) {
@@ -2181,10 +2183,10 @@ _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
{
- uint32_t _flags_save_string = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
- NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->cleartext));
- ndr->flags = _flags_save_string;
+ uint32_t _flags_save_DATA_BLOB = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->cleartext));
+ ndr->flags = _flags_save_DATA_BLOB;
}
}
if (ndr_flags & NDR_BUFFERS) {
@@ -2196,7 +2198,7 @@ _PUBLIC_ void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, cons
{
ndr_print_struct(ndr, name, "package_PrimaryCLEARTEXTBlob");
ndr->depth++;
- ndr_print_string(ndr, "cleartext", r->cleartext);
+ ndr_print_DATA_BLOB(ndr, "cleartext", r->cleartext);
ndr->depth--;
}
@@ -2311,13 +2313,269 @@ _PUBLIC_ void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const
ndr->depth--;
}
-static enum ndr_err_code ndr_push_trustAuthInOutSecret1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret1 *r)
+static enum ndr_err_code ndr_push_AuthInfoNone(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNone *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfoNone(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNone *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r)
+{
+ ndr_print_struct(ndr, name, "AuthInfoNone");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->size);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_AuthInfoNT4Owf(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNT4Owf *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 16));
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->password));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->password));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfoNT4Owf(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNT4Owf *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->password));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->password));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r)
+{
+ ndr_print_struct(ndr, name, "AuthInfoNT4Owf");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?16:r->size);
+ ndr_print_samr_Password(ndr, "password", &r->password);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_AuthInfoClear(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoClear *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfoClear(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoClear *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+ NDR_PULL_ALLOC_N(ndr, r->password, r->size);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r)
+{
+ ndr_print_struct(ndr, name, "AuthInfoClear");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "size", r->size);
+ ndr_print_array_uint8(ndr, "password", r->password, r->size);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_AuthInfoVersion(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoVersion *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
- NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfoVersion(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoVersion *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r)
+{
+ ndr_print_struct(ndr, name, "AuthInfoVersion");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->size);
+ ndr_print_uint32(ndr, "version", r->version);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_AuthInfo(struct ndr_push *ndr, int ndr_flags, const union AuthInfo *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case TRUST_AUTH_TYPE_NONE: {
+ NDR_CHECK(ndr_push_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
+ break; }
+
+ case TRUST_AUTH_TYPE_NT4OWF: {
+ NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
+ break; }
+
+ case TRUST_AUTH_TYPE_CLEAR: {
+ NDR_CHECK(ndr_push_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
+ break; }
+
+ case TRUST_AUTH_TYPE_VERSION: {
+ NDR_CHECK(ndr_push_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
+ break; }
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case TRUST_AUTH_TYPE_NONE:
+ break;
+
+ case TRUST_AUTH_TYPE_NT4OWF:
+ NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_BUFFERS, &r->nt4owf));
+ break;
+
+ case TRUST_AUTH_TYPE_CLEAR:
+ break;
+
+ case TRUST_AUTH_TYPE_VERSION:
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfo(struct ndr_pull *ndr, int ndr_flags, union AuthInfo *r)
+{
+ int level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ switch (level) {
+ case TRUST_AUTH_TYPE_NONE: {
+ NDR_CHECK(ndr_pull_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
+ break; }
+
+ case TRUST_AUTH_TYPE_NT4OWF: {
+ NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
+ break; }
+
+ case TRUST_AUTH_TYPE_CLEAR: {
+ NDR_CHECK(ndr_pull_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
+ break; }
+
+ case TRUST_AUTH_TYPE_VERSION: {
+ NDR_CHECK(ndr_pull_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case TRUST_AUTH_TYPE_NONE:
+ break;
+
+ case TRUST_AUTH_TYPE_NT4OWF:
+ NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_BUFFERS, &r->nt4owf));
+ break;
+
+ case TRUST_AUTH_TYPE_CLEAR:
+ break;
+
+ case TRUST_AUTH_TYPE_VERSION:
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "AuthInfo");
+ switch (level) {
+ case TRUST_AUTH_TYPE_NONE:
+ ndr_print_AuthInfoNone(ndr, "none", &r->none);
+ break;
+
+ case TRUST_AUTH_TYPE_NT4OWF:
+ ndr_print_AuthInfoNT4Owf(ndr, "nt4owf", &r->nt4owf);
+ break;
+
+ case TRUST_AUTH_TYPE_CLEAR:
+ ndr_print_AuthInfoClear(ndr, "clear", &r->clear);
+ break;
+
+ case TRUST_AUTH_TYPE_VERSION:
+ ndr_print_AuthInfoVersion(ndr, "version", &r->version);
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->LastUpdateTime));
+ NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
+ NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
{
uint32_t _flags_save_DATA_BLOB = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
@@ -2326,17 +2584,19 @@ static enum ndr_err_code ndr_push_trustAuthInOutSecret1(struct ndr_push *ndr, in
}
}
if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_BUFFERS, &r->AuthInfo));
}
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_trustAuthInOutSecret1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret1 *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
- NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->LastUpdateTime));
+ NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
+ NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
{
uint32_t _flags_save_DATA_BLOB = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
@@ -2345,325 +2605,405 @@ static enum ndr_err_code ndr_pull_trustAuthInOutSecret1(struct ndr_pull *ndr, in
}
}
if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_BUFFERS, &r->AuthInfo));
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_trustAuthInOutSecret1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret1 *r)
+_PUBLIC_ void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r)
{
- ndr_print_struct(ndr, name, "trustAuthInOutSecret1");
+ ndr_print_struct(ndr, name, "AuthenticationInformation");
ndr->depth++;
- ndr_print_NTTIME(ndr, "time1", r->time1);
- ndr_print_uint32(ndr, "unknown1", r->unknown1);
- ndr_print_DATA_BLOB(ndr, "value", r->value);
+ ndr_print_NTTIME(ndr, "LastUpdateTime", r->LastUpdateTime);
+ ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
+ ndr_print_set_switch_value(ndr, &r->AuthInfo, r->AuthType);
+ ndr_print_AuthInfo(ndr, "AuthInfo", &r->AuthInfo);
ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
ndr->depth--;
}
-static enum ndr_err_code ndr_push_trustAuthInOutCtr1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutCtr1 *r)
+_PUBLIC_ size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, int flags)
{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r)
+{
+ uint32_t cntr_current_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value1));
- NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value2));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+ for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
+ NDR_CHECK(ndr_push_relative_ptr1(ndr, r->current[cntr_current_0]));
+ }
}
if (ndr_flags & NDR_BUFFERS) {
- if (r->value1) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value1));
- NDR_CHECK(ndr_push_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value1));
- }
- if (r->value2) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value2));
- NDR_CHECK(ndr_push_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value2));
+ for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
+ if (r->current[cntr_current_0]) {
+ NDR_CHECK(ndr_push_relative_ptr2(ndr, r->current[cntr_current_0]));
+ NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->current[cntr_current_0]));
+ }
}
}
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_trustAuthInOutCtr1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutCtr1 *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r)
{
- uint32_t _ptr_value1;
- TALLOC_CTX *_mem_save_value1_0;
- uint32_t _ptr_value2;
- TALLOC_CTX *_mem_save_value2_0;
+ uint32_t _ptr_current;
+ uint32_t cntr_current_0;
+ TALLOC_CTX *_mem_save_current_0;
+ TALLOC_CTX *_mem_save_current_1;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value1));
- if (_ptr_value1) {
- NDR_PULL_ALLOC(ndr, r->value1);
- NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value1, _ptr_value1));
- } else {
- r->value1 = NULL;
- }
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value2));
- if (_ptr_value2) {
- NDR_PULL_ALLOC(ndr, r->value2);
- NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value2, _ptr_value2));
- } else {
- r->value2 = NULL;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+ NDR_PULL_ALLOC_N(ndr, r->current, r->count);
+ _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
+ for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_current));
+ if (_ptr_current) {
+ NDR_PULL_ALLOC(ndr, r->current[cntr_current_0]);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->current[cntr_current_0], _ptr_current));
+ } else {
+ r->current[cntr_current_0] = NULL;
+ }
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
}
if (ndr_flags & NDR_BUFFERS) {
- if (r->value1) {
- uint32_t _relative_save_offset;
- _relative_save_offset = ndr->offset;
- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value1));
- _mem_save_value1_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->value1, 0);
- NDR_CHECK(ndr_pull_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value1));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value1_0, 0);
- ndr->offset = _relative_save_offset;
- }
- if (r->value2) {
- uint32_t _relative_save_offset;
- _relative_save_offset = ndr->offset;
- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value2));
- _mem_save_value2_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->value2, 0);
- NDR_CHECK(ndr_pull_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value2));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value2_0, 0);
- ndr->offset = _relative_save_offset;
+ _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
+ for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
+ if (r->current[cntr_current_0]) {
+ uint32_t _relative_save_offset;
+ _relative_save_offset = ndr->offset;
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->current[cntr_current_0]));
+ _mem_save_current_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->current[cntr_current_0], 0);
+ NDR_CHECK(ndr_pull_AuthenticationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->current[cntr_current_0]));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_1, 0);
+ ndr->offset = _relative_save_offset;
+ }
}
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_trustAuthInOutCtr1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr1 *r)
+_PUBLIC_ void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r)
{
- ndr_print_struct(ndr, name, "trustAuthInOutCtr1");
+ uint32_t cntr_current_0;
+ ndr_print_struct(ndr, name, "trustCurrentPasswords");
ndr->depth++;
- ndr_print_ptr(ndr, "value1", r->value1);
- ndr->depth++;
- if (r->value1) {
- ndr_print_trustAuthInOutSecret1(ndr, "value1", r->value1);
- }
- ndr->depth--;
- ndr_print_ptr(ndr, "value2", r->value2);
+ ndr_print_uint32(ndr, "count", r->count);
+ ndr->print(ndr, "%s: ARRAY(%d)", "current", (int)r->count);
ndr->depth++;
- if (r->value2) {
- ndr_print_trustAuthInOutSecret1(ndr, "value2", r->value2);
+ for (cntr_current_0=0;cntr_current_0<r->count;cntr_current_0++) {
+ char *idx_0=NULL;
+ if (asprintf(&idx_0, "[%d]", cntr_current_0) != -1) {
+ ndr_print_ptr(ndr, "current", r->current[cntr_current_0]);
+ ndr->depth++;
+ if (r->current[cntr_current_0]) {
+ ndr_print_AuthenticationInformation(ndr, "current", r->current[cntr_current_0]);
+ }
+ ndr->depth--;
+ free(idx_0);
+ }
}
ndr->depth--;
ndr->depth--;
}
-static enum ndr_err_code ndr_push_trustAuthInOutSecret2V1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret2V1 *r)
+_PUBLIC_ size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustCurrentPasswords);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
- NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
- NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time2));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->confounder, 512));
{
- uint32_t _flags_save_DATA_BLOB = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
- NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
- ndr->flags = _flags_save_DATA_BLOB;
+ struct ndr_push *_ndr_outgoing;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags)));
+ NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_outgoing, NDR_SCALARS|NDR_BUFFERS, &r->outgoing));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags)));
}
+ {
+ struct ndr_push *_ndr_incoming;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags)));
+ NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_incoming, NDR_SCALARS|NDR_BUFFERS, &r->incoming));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags)));
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags)));
}
if (ndr_flags & NDR_BUFFERS) {
}
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_trustAuthInOutSecret2V1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret2V1 *r)
+_PUBLIC_ void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r)
+{
+ ndr_print_struct(ndr, name, "trustDomainPasswords");
+ ndr->depth++;
+ ndr_print_array_uint8(ndr, "confounder", r->confounder, 512);
+ ndr_print_trustCurrentPasswords(ndr, "outgoing", &r->outgoing);
+ ndr_print_trustCurrentPasswords(ndr, "incoming", &r->incoming);
+ ndr_print_uint32(ndr, "outgoing_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags):r->outgoing_size);
+ ndr_print_uint32(ndr, "incoming_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags):r->incoming_size);
+ ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
+ NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
- NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
- NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time2));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
- {
- uint32_t _flags_save_DATA_BLOB = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
- NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
- ndr->flags = _flags_save_DATA_BLOB;
- }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
+ NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
}
if (ndr_flags & NDR_BUFFERS) {
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_trustAuthInOutSecret2V1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V1 *r)
+_PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
{
- ndr_print_struct(ndr, name, "trustAuthInOutSecret2V1");
+ ndr_print_struct(ndr, name, "DsCompressedChunk");
ndr->depth++;
- ndr_print_NTTIME(ndr, "time1", r->time1);
- ndr_print_uint32(ndr, "unknown1", r->unknown1);
- ndr_print_DATA_BLOB(ndr, "value", r->value);
- ndr_print_NTTIME(ndr, "time2", r->time2);
- ndr_print_uint32(ndr, "unknown2", r->unknown2);
- ndr_print_uint32(ndr, "unknown3", r->unknown3);
- ndr_print_uint32(ndr, "unknown4", r->unknown4);
- ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
+ ndr_print_uint32(ndr, "marker", r->marker);
+ ndr_print_DATA_BLOB(ndr, "data", r->data);
ndr->depth--;
}
-static enum ndr_err_code ndr_push_trustAuthInOutSecret2V2(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret2V2 *r)
+static enum ndr_err_code ndr_push_ExtendedErrorAString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorAString *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
- NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
- NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time2));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
- {
- uint32_t _flags_save_DATA_BLOB = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
- NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
- ndr->flags = _flags_save_DATA_BLOB;
- }
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
}
if (ndr_flags & NDR_BUFFERS) {
+ if (r->string) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint8_t), CH_DOS));
+ }
}
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_trustAuthInOutSecret2V2(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret2V2 *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorAString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorAString *r)
{
+ uint32_t _ptr_string;
+ TALLOC_CTX *_mem_save_string_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
- NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
- NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time2));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
- {
- uint32_t _flags_save_DATA_BLOB = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
- NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
- ndr->flags = _flags_save_DATA_BLOB;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
+ if (_ptr_string) {
+ NDR_PULL_ALLOC(ndr, r->string);
+ } else {
+ r->string = NULL;
}
}
if (ndr_flags & NDR_BUFFERS) {
+ if (r->string) {
+ _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint8_t), CH_DOS));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
+ }
+ if (r->string) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
+ }
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_trustAuthInOutSecret2V2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V2 *r)
+_PUBLIC_ void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r)
{
- ndr_print_struct(ndr, name, "trustAuthInOutSecret2V2");
+ ndr_print_struct(ndr, name, "ExtendedErrorAString");
ndr->depth++;
- ndr_print_NTTIME(ndr, "time1", r->time1);
- ndr_print_uint32(ndr, "unknown1", r->unknown1);
- ndr_print_DATA_BLOB(ndr, "value", r->value);
- ndr_print_NTTIME(ndr, "time2", r->time2);
- ndr_print_uint32(ndr, "unknown2", r->unknown2);
- ndr_print_uint32(ndr, "unknown3", r->unknown3);
- ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
+ ndr_print_uint16(ndr, "__size", r->__size);
+ ndr_print_ptr(ndr, "string", r->string);
+ ndr->depth++;
+ if (r->string) {
+ ndr_print_string(ndr, "string", r->string);
+ }
+ ndr->depth--;
ndr->depth--;
}
-static enum ndr_err_code ndr_push_trustAuthInOutCtr2(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutCtr2 *r)
+static enum ndr_err_code ndr_push_ExtendedErrorUString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorUString *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value1));
- NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value2));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
}
if (ndr_flags & NDR_BUFFERS) {
- if (r->value1) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value1));
- NDR_CHECK(ndr_push_trustAuthInOutSecret2V1(ndr, NDR_SCALARS, r->value1));
- }
- if (r->value2) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value2));
- NDR_CHECK(ndr_push_trustAuthInOutSecret2V2(ndr, NDR_SCALARS, r->value2));
+ if (r->string) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint16_t), CH_UTF16));
}
}
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_trustAuthInOutCtr2(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutCtr2 *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorUString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorUString *r)
{
- uint32_t _ptr_value1;
- TALLOC_CTX *_mem_save_value1_0;
- uint32_t _ptr_value2;
- TALLOC_CTX *_mem_save_value2_0;
+ uint32_t _ptr_string;
+ TALLOC_CTX *_mem_save_string_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value1));
- if (_ptr_value1) {
- NDR_PULL_ALLOC(ndr, r->value1);
- NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value1, _ptr_value1));
- } else {
- r->value1 = NULL;
- }
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value2));
- if (_ptr_value2) {
- NDR_PULL_ALLOC(ndr, r->value2);
- NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value2, _ptr_value2));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
+ if (_ptr_string) {
+ NDR_PULL_ALLOC(ndr, r->string);
} else {
- r->value2 = NULL;
+ r->string = NULL;
}
}
if (ndr_flags & NDR_BUFFERS) {
- if (r->value1) {
- uint32_t _relative_save_offset;
- _relative_save_offset = ndr->offset;
- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value1));
- _mem_save_value1_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->value1, 0);
- NDR_CHECK(ndr_pull_trustAuthInOutSecret2V1(ndr, NDR_SCALARS, r->value1));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value1_0, 0);
- ndr->offset = _relative_save_offset;
+ if (r->string) {
+ _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
}
- if (r->value2) {
- uint32_t _relative_save_offset;
- _relative_save_offset = ndr->offset;
- NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value2));
- _mem_save_value2_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->value2, 0);
- NDR_CHECK(ndr_pull_trustAuthInOutSecret2V2(ndr, NDR_SCALARS, r->value2));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value2_0, 0);
- ndr->offset = _relative_save_offset;
+ if (r->string) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
}
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_trustAuthInOutCtr2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr2 *r)
+_PUBLIC_ void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r)
{
- ndr_print_struct(ndr, name, "trustAuthInOutCtr2");
+ ndr_print_struct(ndr, name, "ExtendedErrorUString");
ndr->depth++;
- ndr_print_ptr(ndr, "value1", r->value1);
+ ndr_print_uint16(ndr, "__size", r->__size);
+ ndr_print_ptr(ndr, "string", r->string);
ndr->depth++;
- if (r->value1) {
- ndr_print_trustAuthInOutSecret2V1(ndr, "value1", r->value1);
+ if (r->string) {
+ ndr_print_string(ndr, "string", r->string);
}
ndr->depth--;
- ndr_print_ptr(ndr, "value2", r->value2);
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_ExtendedErrorBlob(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorBlob *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->data) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ExtendedErrorBlob(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorBlob *r)
+{
+ uint32_t _ptr_data;
+ TALLOC_CTX *_mem_save_data_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
+ if (_ptr_data) {
+ NDR_PULL_ALLOC(ndr, r->data);
+ } else {
+ r->data = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->data) {
+ _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
+ NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
+ }
+ if (r->data) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r)
+{
+ ndr_print_struct(ndr, name, "ExtendedErrorBlob");
ndr->depth++;
- if (r->value2) {
- ndr_print_trustAuthInOutSecret2V2(ndr, "value2", r->value2);
+ ndr_print_uint16(ndr, "length", r->length);
+ ndr_print_ptr(ndr, "data", r->data);
+ ndr->depth++;
+ if (r->data) {
+ ndr_print_array_uint8(ndr, "data", r->data, r->length);
}
ndr->depth--;
ndr->depth--;
}
-static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int ndr_flags, const union trustAuthInOutCtr *r)
+static enum ndr_err_code ndr_push_ExtendedErrorComputerNamePresent(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ExtendedErrorComputerNamePresent(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_PRESENT"; break;
+ case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_ExtendedErrorComputerNameU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorComputerNameU *r)
{
if (ndr_flags & NDR_SCALARS) {
int level = ndr_push_get_switch_value(ndr, r);
+ NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, level));
switch (level) {
- case 1: {
- NDR_CHECK(ndr_push_trustAuthInOutCtr1(ndr, NDR_SCALARS, &r->ctr1));
+ case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
+ NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
break; }
- case 2: {
- NDR_CHECK(ndr_push_trustAuthInOutCtr2(ndr, NDR_SCALARS, &r->ctr2));
+ case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
break; }
default:
@@ -2673,12 +3013,11 @@ static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int nd
if (ndr_flags & NDR_BUFFERS) {
int level = ndr_push_get_switch_value(ndr, r);
switch (level) {
- case 1:
- NDR_CHECK(ndr_push_trustAuthInOutCtr1(ndr, NDR_BUFFERS, &r->ctr1));
+ case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
+ NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
break;
- case 2:
- NDR_CHECK(ndr_push_trustAuthInOutCtr2(ndr, NDR_BUFFERS, &r->ctr2));
+ case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
break;
default:
@@ -2688,18 +3027,22 @@ static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int nd
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int ndr_flags, union trustAuthInOutCtr *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorComputerNameU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorComputerNameU *r)
{
int level;
+ uint16_t _level;
level = ndr_pull_get_switch_value(ndr, r);
if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+ }
switch (level) {
- case 1: {
- NDR_CHECK(ndr_pull_trustAuthInOutCtr1(ndr, NDR_SCALARS, &r->ctr1));
+ case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
+ NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
break; }
- case 2: {
- NDR_CHECK(ndr_pull_trustAuthInOutCtr2(ndr, NDR_SCALARS, &r->ctr2));
+ case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
break; }
default:
@@ -2708,12 +3051,11 @@ static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int nd
}
if (ndr_flags & NDR_BUFFERS) {
switch (level) {
- case 1:
- NDR_CHECK(ndr_pull_trustAuthInOutCtr1(ndr, NDR_BUFFERS, &r->ctr1));
+ case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
+ NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
break;
- case 2:
- NDR_CHECK(ndr_pull_trustAuthInOutCtr2(ndr, NDR_BUFFERS, &r->ctr2));
+ case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
break;
default:
@@ -2723,18 +3065,17 @@ static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int nd
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *name, const union trustAuthInOutCtr *r)
+_PUBLIC_ void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r)
{
int level;
level = ndr_print_get_switch_value(ndr, r);
- ndr_print_union(ndr, name, level, "trustAuthInOutCtr");
+ ndr_print_union(ndr, name, level, "ExtendedErrorComputerNameU");
switch (level) {
- case 1:
- ndr_print_trustAuthInOutCtr1(ndr, "ctr1", &r->ctr1);
+ case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
+ ndr_print_ExtendedErrorUString(ndr, "name", &r->name);
break;
- case 2:
- ndr_print_trustAuthInOutCtr2(ndr, "ctr2", &r->ctr2);
+ case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
break;
default:
@@ -2742,116 +3083,404 @@ _PUBLIC_ void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *nam
}
}
-_PUBLIC_ enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r)
+static enum ndr_err_code ndr_push_ExtendedErrorComputerName(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorComputerName *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
- NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
- NDR_CHECK(ndr_push_trustAuthInOutCtr(ndr, NDR_SCALARS, &r->ctr));
+ NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, r->present));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->n, r->present));
+ NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_push_trustAuthInOutCtr(ndr, NDR_BUFFERS, &r->ctr));
+ NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorComputerName(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorComputerName *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
- NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
- NDR_CHECK(ndr_pull_trustAuthInOutCtr(ndr, NDR_SCALARS, &r->ctr));
+ NDR_CHECK(ndr_pull_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, &r->present));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->n, r->present));
+ NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_pull_trustAuthInOutCtr(ndr, NDR_BUFFERS, &r->ctr));
+ NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r)
+_PUBLIC_ void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r)
{
- ndr_print_struct(ndr, name, "trustAuthInOutBlob");
+ ndr_print_struct(ndr, name, "ExtendedErrorComputerName");
ndr->depth++;
- ndr_print_uint32(ndr, "version", r->version);
- ndr_print_set_switch_value(ndr, &r->ctr, r->version);
- ndr_print_trustAuthInOutCtr(ndr, "ctr", &r->ctr);
+ ndr_print_ExtendedErrorComputerNamePresent(ndr, "present", r->present);
+ ndr_print_set_switch_value(ndr, &r->n, r->present);
+ ndr_print_ExtendedErrorComputerNameU(ndr, "n", &r->n);
ndr->depth--;
}
-_PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
+static enum ndr_err_code ndr_push_ExtendedErrorParamType(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorParamType r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ExtendedErrorParamType(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorParamType *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING"; break;
+ case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING"; break;
+ case EXTENDED_ERROR_PARAM_TYPE_UINT32: val = "EXTENDED_ERROR_PARAM_TYPE_UINT32"; break;
+ case EXTENDED_ERROR_PARAM_TYPE_UINT16: val = "EXTENDED_ERROR_PARAM_TYPE_UINT16"; break;
+ case EXTENDED_ERROR_PARAM_TYPE_UINT64: val = "EXTENDED_ERROR_PARAM_TYPE_UINT64"; break;
+ case EXTENDED_ERROR_PARAM_TYPE_NONE: val = "EXTENDED_ERROR_PARAM_TYPE_NONE"; break;
+ case EXTENDED_ERROR_PARAM_TYPE_BLOB: val = "EXTENDED_ERROR_PARAM_TYPE_BLOB"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_ExtendedErrorParamU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorParamU *r)
{
if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
- NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
+ int level = ndr_push_get_switch_value(ndr, r);
+ NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, level));
+ switch (level) {
+ case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
+ NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
+ break; }
+
+ case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
+ NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
+ break; }
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uint32));
+ break; }
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->uint16));
+ break; }
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
+ NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uint64));
+ break; }
+
+ case EXTENDED_ERROR_PARAM_TYPE_NONE: {
+ break; }
+
+ case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
+ NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
+ break; }
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
}
if (ndr_flags & NDR_BUFFERS) {
+ int level = ndr_push_get_switch_value(ndr, r);
+ switch (level) {
+ case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
+ NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
+ NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT32:
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT16:
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT64:
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_NONE:
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_BLOB:
+ NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
+ break;
+
+ default:
+ return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorParamU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorParamU *r)
{
+ int level;
+ uint16_t _level;
+ level = ndr_pull_get_switch_value(ndr, r);
if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
- NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
+ if (_level != level) {
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+ }
+ switch (level) {
+ case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
+ NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
+ break; }
+
+ case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
+ NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
+ break; }
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uint32));
+ break; }
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->uint16));
+ break; }
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
+ NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uint64));
+ break; }
+
+ case EXTENDED_ERROR_PARAM_TYPE_NONE: {
+ break; }
+
+ case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
+ NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
+ break; }
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
+ NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
+ NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT32:
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT16:
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT64:
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_NONE:
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_BLOB:
+ NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
+ break;
+
+ default:
+ return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "ExtendedErrorParamU");
+ switch (level) {
+ case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
+ ndr_print_ExtendedErrorAString(ndr, "a_string", &r->a_string);
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
+ ndr_print_ExtendedErrorUString(ndr, "u_string", &r->u_string);
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT32:
+ ndr_print_uint32(ndr, "uint32", r->uint32);
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT16:
+ ndr_print_uint16(ndr, "uint16", r->uint16);
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_UINT64:
+ ndr_print_hyper(ndr, "uint64", r->uint64);
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_NONE:
+ break;
+
+ case EXTENDED_ERROR_PARAM_TYPE_BLOB:
+ ndr_print_ExtendedErrorBlob(ndr, "blob", &r->blob);
+ break;
+
+ default:
+ ndr_print_bad_level(ndr, name, level);
+ }
+}
+
+static enum ndr_err_code ndr_push_ExtendedErrorParam(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorParam *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 8));
+ NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, r->type));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type));
+ NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
}
if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorParam(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorParam *r)
{
- ndr_print_struct(ndr, name, "DsCompressedChunk");
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 8));
+ NDR_CHECK(ndr_pull_ExtendedErrorParamType(ndr, NDR_SCALARS, &r->type));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type));
+ NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r)
+{
+ ndr_print_struct(ndr, name, "ExtendedErrorParam");
ndr->depth++;
- ndr_print_uint32(ndr, "marker", r->marker);
- ndr_print_DATA_BLOB(ndr, "data", r->data);
+ ndr_print_ExtendedErrorParamType(ndr, "type", r->type);
+ ndr_print_set_switch_value(ndr, &r->p, r->type);
+ ndr_print_ExtendedErrorParamU(ndr, "p", &r->p);
ndr->depth--;
}
-_PUBLIC_ enum ndr_err_code ndr_push_DsCompressedBlob(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedBlob *r)
+_PUBLIC_ enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r)
{
- uint32_t cntr_chunks_0;
+ uint32_t cntr_params_0;
if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- for (cntr_chunks_0 = 0; cntr_chunks_0 < 5; cntr_chunks_0++) {
- NDR_CHECK(ndr_push_DsCompressedChunk(ndr, NDR_SCALARS, &r->chunks[cntr_chunks_0]));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_params));
+ NDR_CHECK(ndr_push_align(ndr, 8));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
+ NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
+ NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->pid));
+ NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->generating_component));
+ NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->detection_location));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_params));
+ for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
+ NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
}
}
if (ndr_flags & NDR_BUFFERS) {
+ if (r->next) {
+ NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
+ }
+ NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
+ for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
+ NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
+ }
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedBlob(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedBlob *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r)
{
- uint32_t cntr_chunks_0;
+ uint32_t _ptr_next;
+ TALLOC_CTX *_mem_save_next_0;
+ uint32_t cntr_params_0;
+ TALLOC_CTX *_mem_save_params_0;
if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- for (cntr_chunks_0 = 0; cntr_chunks_0 < 5; cntr_chunks_0++) {
- NDR_CHECK(ndr_pull_DsCompressedChunk(ndr, NDR_SCALARS, &r->chunks[cntr_chunks_0]));
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->params));
+ NDR_CHECK(ndr_pull_align(ndr, 8));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
+ if (_ptr_next) {
+ NDR_PULL_ALLOC(ndr, r->next);
+ } else {
+ r->next = NULL;
+ }
+ NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
+ NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->pid));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->generating_component));
+ NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->detection_location));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_params));
+ NDR_PULL_ALLOC_N(ndr, r->params, ndr_get_array_size(ndr, &r->params));
+ _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
+ for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
+ NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
+ if (r->params) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->params, r->num_params));
}
}
if (ndr_flags & NDR_BUFFERS) {
+ if (r->next) {
+ _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
+ NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
+ }
+ NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
+ _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
+ for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
+ NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_DsCompressedBlob(struct ndr_print *ndr, const char *name, const struct DsCompressedBlob *r)
+_PUBLIC_ void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r)
{
- uint32_t cntr_chunks_0;
- ndr_print_struct(ndr, name, "DsCompressedBlob");
+ uint32_t cntr_params_0;
+ ndr_print_struct(ndr, name, "ExtendedErrorInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "next", r->next);
ndr->depth++;
- ndr->print(ndr, "%s: ARRAY(%d)", "chunks", (int)5);
+ if (r->next) {
+ ndr_print_ExtendedErrorInfo(ndr, "next", r->next);
+ }
+ ndr->depth--;
+ ndr_print_ExtendedErrorComputerName(ndr, "computer_name", &r->computer_name);
+ ndr_print_hyper(ndr, "pid", r->pid);
+ ndr_print_NTTIME(ndr, "time", r->time);
+ ndr_print_uint32(ndr, "generating_component", r->generating_component);
+ ndr_print_WERROR(ndr, "status", r->status);
+ ndr_print_uint16(ndr, "detection_location", r->detection_location);
+ ndr_print_uint16(ndr, "flags", r->flags);
+ ndr_print_uint16(ndr, "num_params", r->num_params);
+ ndr->print(ndr, "%s: ARRAY(%d)", "params", (int)r->num_params);
ndr->depth++;
- for (cntr_chunks_0=0;cntr_chunks_0<5;cntr_chunks_0++) {
+ for (cntr_params_0=0;cntr_params_0<r->num_params;cntr_params_0++) {
char *idx_0=NULL;
- if (asprintf(&idx_0, "[%d]", cntr_chunks_0) != -1) {
- ndr_print_DsCompressedChunk(ndr, "chunks", &r->chunks[cntr_chunks_0]);
+ if (asprintf(&idx_0, "[%d]", cntr_params_0) != -1) {
+ ndr_print_ExtendedErrorParam(ndr, "params", &r->params[cntr_params_0]);
free(idx_0);
}
}
@@ -2859,6 +3488,57 @@ _PUBLIC_ void ndr_print_DsCompressedBlob(struct ndr_print *ndr, const char *name
ndr->depth--;
}
+static enum ndr_err_code ndr_push_ExtendedErrorInfoPtr(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfoPtr *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->info) {
+ NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ExtendedErrorInfoPtr(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfoPtr *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_info_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->info);
+ } else {
+ r->info = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
+ NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r)
+{
+ ndr_print_struct(ndr, name, "ExtendedErrorInfoPtr");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->info);
+ ndr->depth++;
+ if (r->info) {
+ ndr_print_ExtendedErrorInfo(ndr, "info", r->info);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
static enum ndr_err_code ndr_push_decode_replPropertyMetaData(struct ndr_push *ndr, int flags, const struct decode_replPropertyMetaData *r)
{
if (flags & NDR_IN) {
@@ -3351,41 +4031,92 @@ _PUBLIC_ void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char
ndr->depth--;
}
-static enum ndr_err_code ndr_push_decode_DsCompressed(struct ndr_push *ndr, int flags, const struct decode_DsCompressed *r)
+static enum ndr_err_code ndr_push_decode_trustDomainPasswords(struct ndr_push *ndr, int flags, const struct decode_trustDomainPasswords *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
+ }
+ if (flags & NDR_OUT) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_decode_trustDomainPasswords(struct ndr_pull *ndr, int flags, struct decode_trustDomainPasswords *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_pull_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
+ }
+ if (flags & NDR_OUT) {
+ }
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r)
+{
+ ndr_print_struct(ndr, name, "decode_trustDomainPasswords");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "decode_trustDomainPasswords");
+ ndr->depth++;
+ ndr_print_trustDomainPasswords(ndr, "blob", &r->in.blob);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "decode_trustDomainPasswords");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_decode_ExtendedErrorInfo(struct ndr_push *ndr, int flags, const struct decode_ExtendedErrorInfo *r)
{
if (flags & NDR_IN) {
- NDR_CHECK(ndr_push_DsCompressedBlob(ndr, NDR_SCALARS, &r->in.blob));
+ {
+ struct ndr_push *_ndr_ptr;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
+ NDR_CHECK(ndr_push_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
+ }
}
if (flags & NDR_OUT) {
}
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_decode_DsCompressed(struct ndr_pull *ndr, int flags, struct decode_DsCompressed *r)
+static enum ndr_err_code ndr_pull_decode_ExtendedErrorInfo(struct ndr_pull *ndr, int flags, struct decode_ExtendedErrorInfo *r)
{
if (flags & NDR_IN) {
- NDR_CHECK(ndr_pull_DsCompressedBlob(ndr, NDR_SCALARS, &r->in.blob));
+ {
+ struct ndr_pull *_ndr_ptr;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
+ NDR_CHECK(ndr_pull_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
+ }
}
if (flags & NDR_OUT) {
}
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_decode_DsCompressed(struct ndr_print *ndr, const char *name, int flags, const struct decode_DsCompressed *r)
+_PUBLIC_ void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r)
{
- ndr_print_struct(ndr, name, "decode_DsCompressed");
+ ndr_print_struct(ndr, name, "decode_ExtendedErrorInfo");
ndr->depth++;
if (flags & NDR_SET_VALUES) {
ndr->flags |= LIBNDR_PRINT_SET_VALUES;
}
if (flags & NDR_IN) {
- ndr_print_struct(ndr, "in", "decode_DsCompressed");
+ ndr_print_struct(ndr, "in", "decode_ExtendedErrorInfo");
ndr->depth++;
- ndr_print_DsCompressedBlob(ndr, "blob", &r->in.blob);
+ ndr_print_ExtendedErrorInfoPtr(ndr, "ptr", &r->in.ptr);
ndr->depth--;
}
if (flags & NDR_OUT) {
- ndr_print_struct(ndr, "out", "decode_DsCompressed");
+ ndr_print_struct(ndr, "out", "decode_ExtendedErrorInfo");
ndr->depth++;
ndr->depth--;
}
@@ -3490,11 +4221,19 @@ static const struct ndr_interface_call drsblobs_calls[] = {
false,
},
{
- "decode_DsCompressed",
- sizeof(struct decode_DsCompressed),
- (ndr_push_flags_fn_t) ndr_push_decode_DsCompressed,
- (ndr_pull_flags_fn_t) ndr_pull_decode_DsCompressed,
- (ndr_print_function_t) ndr_print_decode_DsCompressed,
+ "decode_trustDomainPasswords",
+ sizeof(struct decode_trustDomainPasswords),
+ (ndr_push_flags_fn_t) ndr_push_decode_trustDomainPasswords,
+ (ndr_pull_flags_fn_t) ndr_pull_decode_trustDomainPasswords,
+ (ndr_print_function_t) ndr_print_decode_trustDomainPasswords,
+ false,
+ },
+ {
+ "decode_ExtendedErrorInfo",
+ sizeof(struct decode_ExtendedErrorInfo),
+ (ndr_push_flags_fn_t) ndr_push_decode_ExtendedErrorInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_decode_ExtendedErrorInfo,
+ (ndr_print_function_t) ndr_print_decode_ExtendedErrorInfo,
false,
},
{ NULL, 0, NULL, NULL, NULL, false }
@@ -3526,7 +4265,7 @@ const struct ndr_interface_table ndr_table_drsblobs = {
NDR_DRSBLOBS_VERSION
},
.helpstring = NDR_DRSBLOBS_HELPSTRING,
- .num_calls = 13,
+ .num_calls = 14,
.calls = drsblobs_calls,
.endpoints = &drsblobs_endpoints,
.authservices = &drsblobs_authservices
diff --git a/source3/librpc/gen_ndr/ndr_drsblobs.h b/source3/librpc/gen_ndr/ndr_drsblobs.h
index 171e7e25a1..8a5298874a 100644
--- a/source3/librpc/gen_ndr/ndr_drsblobs.h
+++ b/source3/librpc/gen_ndr/ndr_drsblobs.h
@@ -35,9 +35,11 @@ extern const struct ndr_interface_table ndr_table_drsblobs;
#define NDR_DECODE_TRUSTAUTHINOUT (0x0b)
-#define NDR_DECODE_DSCOMPRESSED (0x0c)
+#define NDR_DECODE_TRUSTDOMAINPASSWORDS (0x0c)
-#define NDR_DRSBLOBS_CALL_COUNT (13)
+#define NDR_DECODE_EXTENDEDERRORINFO (0x0d)
+
+#define NDR_DRSBLOBS_CALL_COUNT (14)
void ndr_print_replPropertyMetaData1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaData1 *r);
void ndr_print_replPropertyMetaDataCtr1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataCtr1 *r);
void ndr_print_replPropertyMetaDataCtr(struct ndr_print *ndr, const char *name, const union replPropertyMetaDataCtr *r);
@@ -102,21 +104,44 @@ void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *nam
enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestBlob *r);
enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestBlob *r);
void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r);
-void ndr_print_trustAuthInOutSecret1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret1 *r);
-void ndr_print_trustAuthInOutCtr1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr1 *r);
-void ndr_print_trustAuthInOutSecret2V1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V1 *r);
-void ndr_print_trustAuthInOutSecret2V2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V2 *r);
-void ndr_print_trustAuthInOutCtr2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr2 *r);
-void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *name, const union trustAuthInOutCtr *r);
+void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r);
+void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r);
+void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r);
+void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r);
+void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r);
+enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r);
+enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r);
+void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r);
+enum ndr_err_code ndr_push_AuthenticationInformationArray(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformationArray *r);
+enum ndr_err_code ndr_pull_AuthenticationInformationArray(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformationArray *r);
+void ndr_print_AuthenticationInformationArray(struct ndr_print *ndr, const char *name, const struct AuthenticationInformationArray *r);
enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r);
enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r);
void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r);
+size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, int flags);
+enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r);
+enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r);
+void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r);
+size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, int flags);
+enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r);
+enum ndr_err_code ndr_pull_trustDomainPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustDomainPasswords *r);
+void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r);
enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r);
enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r);
void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r);
-enum ndr_err_code ndr_push_DsCompressedBlob(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedBlob *r);
-enum ndr_err_code ndr_pull_DsCompressedBlob(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedBlob *r);
-void ndr_print_DsCompressedBlob(struct ndr_print *ndr, const char *name, const struct DsCompressedBlob *r);
+void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r);
+void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r);
+void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r);
+void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r);
+void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r);
+void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r);
+void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r);
+void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r);
+void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r);
+enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r);
+enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r);
+void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r);
+void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r);
void ndr_print_decode_replPropertyMetaData(struct ndr_print *ndr, const char *name, int flags, const struct decode_replPropertyMetaData *r);
void ndr_print_decode_replUpToDateVector(struct ndr_print *ndr, const char *name, int flags, const struct decode_replUpToDateVector *r);
void ndr_print_decode_repsFromTo(struct ndr_print *ndr, const char *name, int flags, const struct decode_repsFromTo *r);
@@ -129,5 +154,6 @@ void ndr_print_decode_PrimaryKerberos(struct ndr_print *ndr, const char *name, i
void ndr_print_decode_PrimaryCLEARTEXT(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryCLEARTEXT *r);
void ndr_print_decode_PrimaryWDigest(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryWDigest *r);
void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustAuthInOut *r);
-void ndr_print_decode_DsCompressed(struct ndr_print *ndr, const char *name, int flags, const struct decode_DsCompressed *r);
+void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r);
+void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r);
#endif /* _HEADER_NDR_drsblobs */
diff --git a/source3/librpc/gen_ndr/ndr_drsuapi.h b/source3/librpc/gen_ndr/ndr_drsuapi.h
index e65bc62301..4b5ead467f 100644
--- a/source3/librpc/gen_ndr/ndr_drsuapi.h
+++ b/source3/librpc/gen_ndr/ndr_drsuapi.h
@@ -6,7 +6,7 @@
#ifndef _HEADER_NDR_drsuapi
#define _HEADER_NDR_drsuapi
-#include "librpc/ndr/ndr_drsuapi.h"
+#include "../librpc/ndr/ndr_drsuapi.h"
#define NDR_DRSUAPI_UUID "e3514235-4b06-11d1-ab04-00c04fc2dcd2"
#define NDR_DRSUAPI_VERSION 4.0
#define NDR_DRSUAPI_NAME "drsuapi"
diff --git a/source3/librpc/gen_ndr/ndr_ntsvcs.c b/source3/librpc/gen_ndr/ndr_ntsvcs.c
index 62acf474ae..35d02a0dcb 100644
--- a/source3/librpc/gen_ndr/ndr_ntsvcs.c
+++ b/source3/librpc/gen_ndr/ndr_ntsvcs.c
@@ -508,9 +508,35 @@ _PUBLIC_ void ndr_print_PNP_EnumerateSubKeys(struct ndr_print *ndr, const char *
static enum ndr_err_code ndr_push_PNP_GetDeviceList(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceList *r)
{
+ uint32_t cntr_buffer_1;
if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.filter));
+ if (r->in.filter) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.filter, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.filter, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.filter, ndr_charset_length(r->in.filter, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->in.length == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.length));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
}
if (flags & NDR_OUT) {
+ if (r->out.buffer == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
+ for (cntr_buffer_1 = 0; cntr_buffer_1 < *r->out.length; cntr_buffer_1++) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.buffer[cntr_buffer_1]));
+ }
+ if (r->out.length == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -518,16 +544,81 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceList(struct ndr_push *ndr, int fl
static enum ndr_err_code ndr_pull_PNP_GetDeviceList(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceList *r)
{
+ uint32_t _ptr_filter;
+ uint32_t cntr_buffer_1;
+ TALLOC_CTX *_mem_save_filter_0;
+ TALLOC_CTX *_mem_save_buffer_1;
+ TALLOC_CTX *_mem_save_length_0;
if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_filter));
+ if (_ptr_filter) {
+ NDR_PULL_ALLOC(ndr, r->in.filter);
+ } else {
+ r->in.filter = NULL;
+ }
+ if (r->in.filter) {
+ _mem_save_filter_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.filter, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.filter));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.filter));
+ if (ndr_get_array_length(ndr, &r->in.filter) > ndr_get_array_size(ndr, &r->in.filter)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.filter), ndr_get_array_length(ndr, &r->in.filter));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.filter), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.filter, ndr_get_array_length(ndr, &r->in.filter), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filter_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.length);
+ }
+ _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.length, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.length));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.length);
+ memset(r->out.buffer, 0, (*r->in.length) * sizeof(*r->out.buffer));
+ NDR_PULL_ALLOC(ndr, r->out.length);
+ *r->out.length = *r->in.length;
}
if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer));
+ if (ndr_get_array_length(ndr, &r->out.buffer) > ndr_get_array_size(ndr, &r->out.buffer)) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.buffer), ndr_get_array_length(ndr, &r->out.buffer));
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
+ }
+ _mem_save_buffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, 0);
+ for (cntr_buffer_1 = 0; cntr_buffer_1 < *r->out.length; cntr_buffer_1++) {
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.buffer[cntr_buffer_1]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_1, 0);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.length);
+ }
+ _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.length, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.length));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+ if (r->out.buffer) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, *r->out.length));
+ }
+ if (r->out.buffer) {
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.buffer, *r->out.length));
+ }
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceList *r)
{
+ uint32_t cntr_buffer_1;
ndr_print_struct(ndr, name, "PNP_GetDeviceList");
ndr->depth++;
if (flags & NDR_SET_VALUES) {
@@ -536,11 +627,39 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *nam
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "PNP_GetDeviceList");
ndr->depth++;
+ ndr_print_ptr(ndr, "filter", r->in.filter);
+ ndr->depth++;
+ if (r->in.filter) {
+ ndr_print_string(ndr, "filter", r->in.filter);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "length", r->in.length);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "length", *r->in.length);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "flags", r->in.flags);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "PNP_GetDeviceList");
ndr->depth++;
+ ndr_print_ptr(ndr, "buffer", r->out.buffer);
+ ndr->depth++;
+ ndr->print(ndr, "%s: ARRAY(%d)", "buffer", (int)*r->out.length);
+ ndr->depth++;
+ for (cntr_buffer_1=0;cntr_buffer_1<*r->out.length;cntr_buffer_1++) {
+ char *idx_1=NULL;
+ if (asprintf(&idx_1, "[%d]", cntr_buffer_1) != -1) {
+ ndr_print_uint16(ndr, "buffer", r->out.buffer[cntr_buffer_1]);
+ free(idx_1);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+ ndr_print_ptr(ndr, "length", r->out.length);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "length", *r->out.length);
+ ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
}
@@ -696,10 +815,10 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16)));
NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicepath, ndr_charset_length(r->in.devicepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.property));
- if (r->in.unknown1 == NULL) {
+ if (r->in.reg_data_type == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unknown1));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.reg_data_type));
if (r->in.buffer_size == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -708,13 +827,13 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.needed));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
}
if (flags & NDR_OUT) {
- if (r->out.unknown1 == NULL) {
+ if (r->out.reg_data_type == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown1));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.reg_data_type));
if (r->out.buffer == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -737,7 +856,7 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int
static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceRegProp *r)
{
- TALLOC_CTX *_mem_save_unknown1_0;
+ TALLOC_CTX *_mem_save_reg_data_type_0;
TALLOC_CTX *_mem_save_buffer_size_0;
TALLOC_CTX *_mem_save_needed_0;
if (flags & NDR_IN) {
@@ -752,12 +871,12 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int
NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicepath, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t), CH_UTF16));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.property));
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->in.unknown1);
+ NDR_PULL_ALLOC(ndr, r->in.reg_data_type);
}
- _mem_save_unknown1_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown1, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unknown1));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown1_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_reg_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.reg_data_type, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.reg_data_type));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_data_type_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.buffer_size);
}
@@ -772,9 +891,9 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int
NDR_PULL_SET_MEM_CTX(ndr, r->in.needed, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.needed));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3));
- NDR_PULL_ALLOC(ndr, r->out.unknown1);
- *r->out.unknown1 = *r->in.unknown1;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+ NDR_PULL_ALLOC(ndr, r->out.reg_data_type);
+ *r->out.reg_data_type = *r->in.reg_data_type;
NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.buffer_size);
memset(r->out.buffer, 0, (*r->in.buffer_size) * sizeof(*r->out.buffer));
NDR_PULL_ALLOC(ndr, r->out.buffer_size);
@@ -784,12 +903,12 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int
}
if (flags & NDR_OUT) {
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC(ndr, r->out.unknown1);
+ NDR_PULL_ALLOC(ndr, r->out.reg_data_type);
}
- _mem_save_unknown1_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown1, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown1));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown1_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_reg_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.reg_data_type, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.reg_data_type));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_data_type_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer));
if (ndr_get_array_length(ndr, &r->out.buffer) > ndr_get_array_size(ndr, &r->out.buffer)) {
@@ -839,9 +958,9 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *
ndr_print_string(ndr, "devicepath", r->in.devicepath);
ndr->depth--;
ndr_print_uint32(ndr, "property", r->in.property);
- ndr_print_ptr(ndr, "unknown1", r->in.unknown1);
+ ndr_print_ptr(ndr, "reg_data_type", r->in.reg_data_type);
ndr->depth++;
- ndr_print_uint32(ndr, "unknown1", *r->in.unknown1);
+ ndr_print_uint32(ndr, "reg_data_type", *r->in.reg_data_type);
ndr->depth--;
ndr_print_ptr(ndr, "buffer_size", r->in.buffer_size);
ndr->depth++;
@@ -851,15 +970,15 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *
ndr->depth++;
ndr_print_uint32(ndr, "needed", *r->in.needed);
ndr->depth--;
- ndr_print_uint32(ndr, "unknown3", r->in.unknown3);
+ ndr_print_uint32(ndr, "flags", r->in.flags);
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "PNP_GetDeviceRegProp");
ndr->depth++;
- ndr_print_ptr(ndr, "unknown1", r->out.unknown1);
+ ndr_print_ptr(ndr, "reg_data_type", r->out.reg_data_type);
ndr->depth++;
- ndr_print_uint32(ndr, "unknown1", *r->out.unknown1);
+ ndr_print_uint32(ndr, "reg_data_type", *r->out.reg_data_type);
ndr->depth--;
ndr_print_ptr(ndr, "buffer", r->out.buffer);
ndr->depth++;
diff --git a/source3/librpc/gen_ndr/ntsvcs.h b/source3/librpc/gen_ndr/ntsvcs.h
index 95484e49f5..b56b552ae2 100644
--- a/source3/librpc/gen_ndr/ntsvcs.h
+++ b/source3/librpc/gen_ndr/ntsvcs.h
@@ -101,6 +101,14 @@ struct PNP_EnumerateSubKeys {
struct PNP_GetDeviceList {
struct {
+ const char *filter;/* [unique,charset(UTF16)] */
+ uint32_t flags;
+ uint32_t *length;/* [ref] */
+ } in;
+
+ struct {
+ uint16_t *buffer;/* [ref,length_is(*length),size_is(*length)] */
+ uint32_t *length;/* [ref] */
WERROR result;
} out;
@@ -133,15 +141,15 @@ struct PNP_GetDeviceRegProp {
struct {
const char *devicepath;/* [ref,charset(UTF16)] */
uint32_t property;
- uint32_t unknown3;
- uint32_t *unknown1;/* [ref] */
+ uint32_t flags;
+ uint32_t *reg_data_type;/* [ref] */
uint32_t *buffer_size;/* [ref] */
uint32_t *needed;/* [ref] */
} in;
struct {
uint8_t *buffer;/* [ref,length_is(*buffer_size),size_is(*buffer_size)] */
- uint32_t *unknown1;/* [ref] */
+ uint32_t *reg_data_type;/* [ref] */
uint32_t *buffer_size;/* [ref] */
uint32_t *needed;/* [ref] */
WERROR result;
diff --git a/source3/librpc/gen_ndr/srv_ntsvcs.c b/source3/librpc/gen_ndr/srv_ntsvcs.c
index 184d8608fb..87f5d51695 100644
--- a/source3/librpc/gen_ndr/srv_ntsvcs.c
+++ b/source3/librpc/gen_ndr/srv_ntsvcs.c
@@ -781,6 +781,14 @@ static bool api_PNP_GetDeviceList(pipes_struct *p)
NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.buffer = talloc_zero_array(r, uint16_t, *r->out.length);
+ if (r->out.buffer == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
+ r->out.length = r->in.length;
r->out.result = _PNP_GetDeviceList(p, r);
if (p->rng_fault_state) {
@@ -1008,7 +1016,7 @@ static bool api_PNP_GetDeviceRegProp(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.unknown1 = r->in.unknown1;
+ r->out.reg_data_type = r->in.reg_data_type;
r->out.buffer = talloc_zero_array(r, uint8_t, *r->out.buffer_size);
if (r->out.buffer == NULL) {
talloc_free(r);
diff --git a/source3/librpc/idl/drsblobs.idl b/source3/librpc/idl/drsblobs.idl
deleted file mode 100644
index 6fdca0ec43..0000000000
--- a/source3/librpc/idl/drsblobs.idl
+++ /dev/null
@@ -1,436 +0,0 @@
-#include "idl_types.h"
-
-import "drsuapi.idl", "misc.idl";
-
-[
- uuid("12345778-1234-abcd-0001-00000001"),
- version(0.0),
- pointer_default(unique),
- helpstring("Active Directory Replication LDAP Blobs")
-]
-interface drsblobs {
- typedef bitmap drsuapi_DsReplicaSyncOptions drsuapi_DsReplicaSyncOptions;
- typedef bitmap drsuapi_DsReplicaNeighbourFlags drsuapi_DsReplicaNeighbourFlags;
- typedef [v1_enum] enum drsuapi_DsAttributeId drsuapi_DsAttributeId;
-
- /*
- * replPropertyMetaData
- * w2k uses version 1
- * w2k3 uses version 1
- */
- typedef struct {
- drsuapi_DsAttributeId attid;
- uint32 version;
- NTTIME_1sec originating_change_time;
- GUID originating_invocation_id;
- hyper originating_usn;
- hyper local_usn;
- } replPropertyMetaData1;
-
- typedef struct {
- uint32 count;
- uint32 reserved;
- replPropertyMetaData1 array[count];
- } replPropertyMetaDataCtr1;
-
- typedef [nodiscriminant] union {
- [case(1)] replPropertyMetaDataCtr1 ctr1;
- } replPropertyMetaDataCtr;
-
- typedef [public] struct {
- uint32 version;
- uint32 reserved;
- [switch_is(version)] replPropertyMetaDataCtr ctr;
- } replPropertyMetaDataBlob;
-
- void decode_replPropertyMetaData(
- [in] replPropertyMetaDataBlob blob
- );
-
- /*
- * replUpToDateVector
- * w2k uses version 1
- * w2k3 uses version 2
- */
- typedef struct {
- uint32 count;
- uint32 reserved;
- drsuapi_DsReplicaCursor cursors[count];
- } replUpToDateVectorCtr1;
-
- typedef struct {
- uint32 count;
- uint32 reserved;
- drsuapi_DsReplicaCursor2 cursors[count];
- } replUpToDateVectorCtr2;
-
- typedef [nodiscriminant] union {
- [case(1)] replUpToDateVectorCtr1 ctr1;
- [case(2)] replUpToDateVectorCtr2 ctr2;
- } replUpToDateVectorCtr;
-
- typedef [public] struct {
- uint32 version;
- uint32 reserved;
- [switch_is(version)] replUpToDateVectorCtr ctr;
- } replUpToDateVectorBlob;
-
- void decode_replUpToDateVector(
- [in] replUpToDateVectorBlob blob
- );
-
- /*
- * repsFrom/repsTo
- * w2k uses version 1
- * w2k3 uses version 1
- */
- typedef [public,gensize] struct {
- [value(strlen(dns_name)+1)] uint32 __dns_name_size;
- [charset(DOS)] uint8 dns_name[__dns_name_size];
- } repsFromTo1OtherInfo;
-
- typedef [public,gensize,flag(NDR_PAHEX)] struct {
- /* this includes the 8 bytes of the repsFromToBlob header */
- [value(ndr_size_repsFromTo1(this, ndr->flags)+8)] uint32 blobsize;
- uint32 consecutive_sync_failures;
- NTTIME_1sec last_success;
- NTTIME_1sec last_attempt;
- WERROR result_last_attempt;
- [relative] repsFromTo1OtherInfo *other_info;
- [value(ndr_size_repsFromTo1OtherInfo(other_info, ndr->flags))] uint32 other_info_length;
- drsuapi_DsReplicaNeighbourFlags replica_flags;
- uint8 schedule[84];
- uint32 reserved;
- drsuapi_DsReplicaHighWaterMark highwatermark;
- GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */
- GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
- GUID transport_guid;
- } repsFromTo1;
-
- typedef [nodiscriminant] union {
- [case(1)] repsFromTo1 ctr1;
- } repsFromTo;
-
- typedef [public] struct {
- uint32 version;
- uint32 reserved;
- [switch_is(version)] repsFromTo ctr;
- } repsFromToBlob;
-
- void decode_repsFromTo(
- [in] repsFromToBlob blob
- );
-
- /*
- * partialAttributeSet
- * w2k uses version 1
- * w2k3 uses version 1
- */
- typedef struct {
- uint32 count;
- drsuapi_DsAttributeId array[count];
- } partialAttributeSetCtr1;
-
- typedef [nodiscriminant] union {
- [case(1)] partialAttributeSetCtr1 ctr1;
- } partialAttributeSetCtr;
-
- typedef [public] struct {
- uint32 version;
- uint32 reserved;
- [switch_is(version)] partialAttributeSetCtr ctr;
- } partialAttributeSetBlob;
-
- void decode_partialAttributeSet(
- [in] partialAttributeSetBlob blob
- );
-
- /*
- * prefixMap
- * w2k unknown
- * w2k3 unknown
- * samba4 uses 0x44534442 'DSDB'
- *
- * as we windows don't return the prefixMap attribute when you ask for
- * we don't know the format, but the attribute is not replicated
- * so that we can choose our own format...
- */
- typedef [v1_enum] enum {
- PREFIX_MAP_VERSION_DSDB = 0x44534442
- } prefixMapVersion;
-
- typedef [nodiscriminant] union {
- [case(PREFIX_MAP_VERSION_DSDB)] drsuapi_DsReplicaOIDMapping_Ctr dsdb;
- } prefixMapCtr;
-
- typedef [public] struct {
- prefixMapVersion version;
- uint32 reserved;
- [switch_is(version)] prefixMapCtr ctr;
- } prefixMapBlob;
-
- void decode_prefixMap(
- [in] prefixMapBlob blob
- );
-
- /*
- * the cookie for the LDAP dirsync control
- */
- typedef [nodiscriminant,gensize] union {
- [case(0)];
- [default] replUpToDateVectorBlob uptodateness_vector;
- } ldapControlDirSyncExtra;
-
- typedef struct {
- [value(3)] uint32 u1;
- NTTIME time;
- uint32 u2;
- uint32 u3;
- [value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, 0))]
- uint32 extra_length;
- drsuapi_DsReplicaHighWaterMark highwatermark;
- GUID guid1;
- [switch_is(extra_length)] ldapControlDirSyncExtra extra;
- } ldapControlDirSyncBlob;
-
- typedef [public,relative_base] struct {
- [charset(DOS),value("MSDS")] uint8 msds[4];
- [subcontext(0)] ldapControlDirSyncBlob blob;
- } ldapControlDirSyncCookie;
-
- void decode_ldapControlDirSync(
- [in] ldapControlDirSyncCookie cookie
- );
-
- typedef struct {
- [value(2*strlen_m(name))] uint16 name_len;
- [value(strlen(data))] uint16 data_len;
- uint16 reserved; /* 2 for 'Packages', 1 for 'Primary:*', but should be ignored */
- [charset(UTF16)] uint8 name[name_len];
- /*
- * the data field contains data as HEX strings
- *
- * 'Packages':
- * data contains the list of packages
- * as non termiated UTF16 strings with
- * a UTF16 NULL byte as separator
- *
- * 'Primary:Kerberos-Newer-Keys':
- * ...
- *
- * 'Primary:Kerberos':
- * ...
- *
- * 'Primary:WDigest':
- * ...
- *
- * 'Primary:CLEARTEXT':
- * data contains the cleartext password
- * as UTF16 string encoded as HEX string
- */
- [charset(DOS)] uint8 data[data_len];
- } supplementalCredentialsPackage;
-
- /* this are 0x30 (48) whitespaces (0x20) */
- const string SUPPLEMENTAL_CREDENTIALS_PREFIX = " ";
-
- typedef [flag(NDR_PAHEX)] enum {
- SUPPLEMENTAL_CREDENTIALS_SIGNATURE = 0x0050
- } supplementalCredentialsSignature;
-
- typedef [gensize] struct {
- [value(SUPPLEMENTAL_CREDENTIALS_PREFIX),charset(UTF16)] uint16 prefix[0x30];
- [value(SUPPLEMENTAL_CREDENTIALS_SIGNATURE)] supplementalCredentialsSignature signature;
- uint16 num_packages;
- supplementalCredentialsPackage packages[num_packages];
- } supplementalCredentialsSubBlob;
-
- typedef [public] struct {
- [value(0)] uint32 unknown1;
- [value(ndr_size_supplementalCredentialsSubBlob(&sub, ndr->flags))] uint32 __ndr_size;
- [value(0)] uint32 unknown2;
- [subcontext(0),subcontext_size(__ndr_size)] supplementalCredentialsSubBlob sub;
- [value(0)] uint8 unknown3;
- } supplementalCredentialsBlob;
-
- void decode_supplementalCredentials(
- [in] supplementalCredentialsBlob blob
- );
-
- typedef [public] struct {
- [flag(STR_NOTERM|NDR_REMAINING)] string_array names;
- } package_PackagesBlob;
-
- void decode_Packages(
- [in] package_PackagesBlob blob
- );
-
- typedef struct {
- [value(2*strlen_m(string))] uint16 length;
- [value(2*strlen_m(string))] uint16 size;
- [relative,subcontext(0),subcontext_size(size),flag(STR_NOTERM|NDR_REMAINING)] string *string;
- } package_PrimaryKerberosString;
-
- typedef struct {
- [value(0)] uint16 reserved1;
- [value(0)] uint16 reserved2;
- [value(0)] uint32 reserved3;
- uint32 keytype;
- [value((value?value->length:0))] uint32 value_len;
- [relative,subcontext(0),subcontext_size(value_len),flag(NDR_REMAINING)] DATA_BLOB *value;
- } package_PrimaryKerberosKey3;
-
- typedef struct {
- uint16 num_keys;
- uint16 num_old_keys;
- package_PrimaryKerberosString salt;
- package_PrimaryKerberosKey3 keys[num_keys];
- package_PrimaryKerberosKey3 old_keys[num_old_keys];
- [value(0)] uint32 padding1;
- [value(0)] uint32 padding2;
- [value(0)] uint32 padding3;
- [value(0)] uint32 padding4;
- [value(0)] uint32 padding5;
- } package_PrimaryKerberosCtr3;
-
- typedef struct {
- [value(0)] uint16 reserved1;
- [value(0)] uint16 reserved2;
- [value(0)] uint32 reserved3;
- uint32 iteration_count;
- uint32 keytype;
- [value((value?value->length:0))] uint32 value_len;
- [relative,subcontext(0),subcontext_size(value_len),flag(NDR_REMAINING)] DATA_BLOB *value;
- } package_PrimaryKerberosKey4;
-
- typedef struct {
- uint16 num_keys;
- [value(0)] uint16 num_service_keys;
- uint16 num_old_keys;
- uint16 num_older_keys;
- package_PrimaryKerberosString salt;
- uint32 default_iteration_count;
- package_PrimaryKerberosKey4 keys[num_keys];
- package_PrimaryKerberosKey4 service_keys[num_service_keys];
- package_PrimaryKerberosKey4 old_keys[num_old_keys];
- package_PrimaryKerberosKey4 older_keys[num_older_keys];
- } package_PrimaryKerberosCtr4;
-
- typedef [nodiscriminant] union {
- [case(3)] package_PrimaryKerberosCtr3 ctr3;
- [case(4)] package_PrimaryKerberosCtr4 ctr4;
- } package_PrimaryKerberosCtr;
-
- typedef [public] struct {
- uint16 version;
- [value(0)] uint16 flags;
- [switch_is(version)] package_PrimaryKerberosCtr ctr;
- } package_PrimaryKerberosBlob;
-
- void decode_PrimaryKerberos(
- [in] package_PrimaryKerberosBlob blob
- );
-
- typedef [public] struct {
- [flag(STR_NOTERM|NDR_REMAINING)] string cleartext;
- } package_PrimaryCLEARTEXTBlob;
-
- void decode_PrimaryCLEARTEXT(
- [in] package_PrimaryCLEARTEXTBlob blob
- );
-
- typedef [flag(NDR_PAHEX)] struct {
- uint8 hash[16];
- } package_PrimaryWDigestHash;
-
- typedef [public] struct {
- [value(0x31)] uint16 unknown1;
- [value(0x01)] uint8 unknown2;
- uint8 num_hashes;
- [value(0)] uint32 unknown3;
- [value(0)] udlong uuknown4;
- package_PrimaryWDigestHash hashes[num_hashes];
- } package_PrimaryWDigestBlob;
-
- void decode_PrimaryWDigest(
- [in] package_PrimaryWDigestBlob blob
- );
-
- typedef struct {
- NTTIME time1;
- uint32 unknown1;
- /*
- * the secret value is encoded as UTF16 if it's a string
- * but krb5 trusts have random bytes here, so converting to UTF16
- * mayfail...
- *
- * TODO: We should try handle the case of a random buffer in all places
- * we deal with cleartext passwords from windows
- *
- * so we don't use this:
- *
- * uint32 value_len;
- * [charset(UTF16)] uint8 value[value_len];
- */
- DATA_BLOB value;
- [flag(NDR_ALIGN4)] DATA_BLOB _pad;
- } trustAuthInOutSecret1;
-
- typedef struct {
- [relative] trustAuthInOutSecret1 *value1;
- [relative] trustAuthInOutSecret1 *value2;
- } trustAuthInOutCtr1;
-
- typedef struct {
- NTTIME time1;
- uint32 unknown1;
- DATA_BLOB value;
- NTTIME time2;
- uint32 unknown2;
- uint32 unknown3;
- uint32 unknown4;
- [flag(NDR_ALIGN4)] DATA_BLOB _pad;
- } trustAuthInOutSecret2V1;
-
- typedef struct {
- NTTIME time1;
- uint32 unknown1;
- DATA_BLOB value;
- NTTIME time2;
- uint32 unknown2;
- uint32 unknown3;
- [flag(NDR_ALIGN4)] DATA_BLOB _pad;
- } trustAuthInOutSecret2V2;
-
- typedef struct {
- [relative] trustAuthInOutSecret2V1 *value1;
- [relative] trustAuthInOutSecret2V2 *value2;
- } trustAuthInOutCtr2;
-
- typedef [nodiscriminant] union {
- [case(1)] trustAuthInOutCtr1 ctr1;
- [case(2)] trustAuthInOutCtr2 ctr2;
- } trustAuthInOutCtr;
-
- typedef [public] struct {
- uint32 version;
- [switch_is(version)] trustAuthInOutCtr ctr;
- } trustAuthInOutBlob;
-
- void decode_trustAuthInOut(
- [in] trustAuthInOutBlob blob
- );
-
- typedef [public] struct {
- uint32 marker;
- DATA_BLOB data;
- } DsCompressedChunk;
-
- typedef [public] struct {
- DsCompressedChunk chunks[5];
- } DsCompressedBlob;
-
- void decode_DsCompressed(
- [in] DsCompressedBlob blob
- );
-}
diff --git a/source3/librpc/idl/drsuapi.idl b/source3/librpc/idl/drsuapi.idl
deleted file mode 100644
index 9d7c9d9789..0000000000
--- a/source3/librpc/idl/drsuapi.idl
+++ /dev/null
@@ -1,1602 +0,0 @@
-#include "idl_types.h"
-
-import "security.idl", "misc.idl", "samr.idl";
-
-[
- uuid("e3514235-4b06-11d1-ab04-00c04fc2dcd2"),
- version(4.0),
- endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]", "ncacn_ip_tcp:", "ncalrpc:"),
- authservice("ldap"),
- helpstring("Active Directory Replication"),
- helper("librpc/ndr/ndr_drsuapi.h"),
- pointer_default(unique)
-]
-interface drsuapi
-{
- typedef bitmap samr_GroupAttrs samr_GroupAttrs;
-
- /*****************/
- /* Function 0x00 */
- typedef [bitmap32bit] bitmap {
- DRSUAPI_SUPPORTED_EXTENSION_BASE = 0x00000001,
- DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION = 0x00000002,
- DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI = 0x00000004,
- DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2 = 0x00000008,
- DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS = 0x00000010,
- DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1 = 0x00000020,
- DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION = 0x00000040,
- DRSUAPI_SUPPORTED_EXTENSION_00000080 = 0x00000080,
- DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE = 0x00000100,
- DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2 = 0x00000200,
- DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION = 0x00000400,
- DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2 = 0x00000800,
- DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD= 0x00001000,
- DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND = 0x00002000,
- DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO = 0x00004000,
- DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION = 0x00008000,
- DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01 = 0x00010000,
- DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP = 0x00020000,
- DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY = 0x00040000,
- DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3 = 0x00080000,
- DRSUAPI_SUPPORTED_EXTENSION_00100000 = 0x00100000,
- DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2 = 0x00200000,
- DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6 = 0x00400000,
- DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS = 0x00800000,
- DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8 = 0x01000000,
- DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5 = 0x02000000,
- DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6 = 0x04000000,
- /*
- * the following 3 have the same value
- * repadmin.exe /bind says that
- */
- DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3 = 0x08000000,
- DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7 = 0x08000000,
- DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT = 0x08000000,
- DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS = 0x10000000,
- DRSUAPI_SUPPORTED_EXTENSION_20000000 = 0x20000000,
- DRSUAPI_SUPPORTED_EXTENSION_40000000 = 0x40000000,
- DRSUAPI_SUPPORTED_EXTENSION_80000000 = 0x80000000
- } drsuapi_SupportedExtensions;
-
- typedef [bitmap32bit] bitmap {
- DRSUAPI_SUPPORTED_EXTENSION_ADAM = 0x00000001,
- DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2 = 0x00000002
- } drsuapi_SupportedExtensionsExt;
-
- /* this is used by w2k */
- typedef struct {
- drsuapi_SupportedExtensions supported_extensions;
- GUID site_guid;
- uint32 pid;
- } drsuapi_DsBindInfo24;
-
- /* this is used by w2k3 */
- typedef struct {
- drsuapi_SupportedExtensions supported_extensions;
- GUID site_guid;
- uint32 pid;
- uint32 repl_epoch;
- } drsuapi_DsBindInfo28;
-
- /* this is used by w2k8 */
- typedef struct {
- drsuapi_SupportedExtensions supported_extensions;
- GUID site_guid;
- uint32 pid;
- uint32 repl_epoch;
- drsuapi_SupportedExtensionsExt supported_extensions_ext;
- GUID config_dn_guid;
- } drsuapi_DsBindInfo48;
-
- typedef struct {
- [flag(NDR_REMAINING)] DATA_BLOB info;
- } drsuapi_DsBindInfoFallBack;
-
- typedef [nodiscriminant] union {
- [case(24)][subcontext(4)] drsuapi_DsBindInfo24 info24;
- [case(28)][subcontext(4)] drsuapi_DsBindInfo28 info28;
- [case(48)][subcontext(4)] drsuapi_DsBindInfo48 info48;
- [default][subcontext(4)] drsuapi_DsBindInfoFallBack FallBack;
- } drsuapi_DsBindInfo;
-
- /* the drsuapi_DsBindInfoCtr was this before
- * typedef [flag(NDR_PAHEX)] struct {
- * [range(1,10000)] uint32 length;
- * [size_is(length)] uint8 data[];
- * } drsuapi_DsBindInfo;
- *
- * but we don't want the caller to manually decode this blob,
- * so we're doing it here
- */
-
- typedef struct {
- [range(1,10000)] uint32 length;
- [switch_is(length)] drsuapi_DsBindInfo info;
- } drsuapi_DsBindInfoCtr;
-
- /* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work
- *
- * maybe the bind_guid could also be the invocation_id see drsuapi_DsReplicaConnection04
- */
- const char *DRSUAPI_DS_BIND_GUID = "e24d201a-4fd6-11d1-a3da-0000f875ae0d";
- /*
- * this magic guid are needed to fetch the whole tree with drsuapi_DsGetNCChanges()
- * as administrator and this values are also used in the destination_dsa_guid field
- * of drsuapi_DsGetNCChangesReq5/8 and the source_dsa_guid is zero.
- */
- const char *DRSUAPI_DS_BIND_GUID_W2K = "6abec3d1-3054-41c8-a362-5a0c5b7d5d71";
- const char *DRSUAPI_DS_BIND_GUID_W2K3 = "6afab99c-6e26-464a-975f-f58f105218bc";
-
- [public] WERROR drsuapi_DsBind(
- [in,unique] GUID *bind_guid,
- [in,out,unique] drsuapi_DsBindInfoCtr *bind_info,
- [out] policy_handle *bind_handle
- );
-
- /*****************/
- /* Function 0x01 */
- WERROR drsuapi_DsUnbind(
- [in,out] policy_handle *bind_handle
- );
-
- /*****************/
- /* Function 0x02 */
- typedef [public,gensize] struct {
- [value(ndr_size_drsuapi_DsReplicaObjectIdentifier(r, ndr->flags)-4)] uint32 __ndr_size;
- [value(ndr_size_dom_sid28(&sid, ndr->flags))] uint32 __ndr_size_sid;
- GUID guid;
- dom_sid28 sid;
- [value(strlen_m(dn))] uint32 __ndr_size_dn;
- [charset(UTF16),size_is(__ndr_size_dn+1)] uint16 dn[];
- } drsuapi_DsReplicaObjectIdentifier;
-
- typedef [public] bitmap {
- DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_OPERATION = 0x00000001,
- DRSUAPI_DS_REPLICA_SYNC_WRITEABLE = 0x00000002,
- DRSUAPI_DS_REPLICA_SYNC_PERIODIC = 0x00000004,
- DRSUAPI_DS_REPLICA_SYNC_INTERSITE_MESSAGING = 0x00000008,
- DRSUAPI_DS_REPLICA_SYNC_ALL_SOURCES = 0x00000010,
- DRSUAPI_DS_REPLICA_SYNC_FULL = 0x00000020,
- DRSUAPI_DS_REPLICA_SYNC_URGENT = 0x00000040,
- DRSUAPI_DS_REPLICA_SYNC_NO_DISCARD = 0x00000080,
- DRSUAPI_DS_REPLICA_SYNC_FORCE = 0x00000100,
- DRSUAPI_DS_REPLICA_SYNC_ADD_REFERENCE = 0x00000200,
- DRSUAPI_DS_REPLICA_SYNC_NEVER_COMPLETED = 0x00000400,
- DRSUAPI_DS_REPLICA_SYNC_TWO_WAY = 0x00000800,
- DRSUAPI_DS_REPLICA_SYNC_NEVER_NOTIFY = 0x00001000,
- DRSUAPI_DS_REPLICA_SYNC_INITIAL = 0x00002000,
- DRSUAPI_DS_REPLICA_SYNC_USE_COMPRESSION = 0x00004000,
- DRSUAPI_DS_REPLICA_SYNC_ABANDONED = 0x00008000,
- DRSUAPI_DS_REPLICA_SYNC_INITIAL_IN_PROGRESS = 0x00010000,
- DRSUAPI_DS_REPLICA_SYNC_PARTIAL_ATTRIBUTE_SET = 0x00020000,
- DRSUAPI_DS_REPLICA_SYNC_REQUEUE = 0x00040000,
- DRSUAPI_DS_REPLICA_SYNC_NOTIFICATION = 0x00080000,
- DRSUAPI_DS_REPLICA_SYNC_ASYNCHRONOUS_REPLICA = 0x00100000,
- DRSUAPI_DS_REPLICA_SYNC_CRITICAL = 0x00200000,
- DRSUAPI_DS_REPLICA_SYNC_FULL_IN_PROGRESS = 0x00400000,
- DRSUAPI_DS_REPLICA_SYNC_PREEMPTED = 0x00800000
- } drsuapi_DsReplicaSyncOptions;
-
- typedef struct {
- drsuapi_DsReplicaObjectIdentifier *naming_context;
- GUID source_dsa_guid;
- astring *other_info; /* I assume this is related to the repsFromTo1OtherInfo dns_name */
- drsuapi_DsReplicaSyncOptions options;
- } drsuapi_DsReplicaSyncRequest1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsReplicaSyncRequest1 req1;
- } drsuapi_DsReplicaSyncRequest;
-
- WERROR drsuapi_DsReplicaSync(
- [in] policy_handle *bind_handle,
- [in] int32 level,
- [in,switch_is(level)] drsuapi_DsReplicaSyncRequest req
- );
-
- /*****************/
- /* Function 0x03 */
- typedef [public] struct {
- hyper tmp_highest_usn; /* updated after each object update */
- hyper reserved_usn;
- hyper highest_usn; /* updated after a full replication cycle */
- } drsuapi_DsReplicaHighWaterMark;
-
- typedef [public] struct {
- GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
- hyper highest_usn; /* updated after a full replication cycle */
- } drsuapi_DsReplicaCursor;
-
- typedef struct {
- [value(1)] uint32 version;
- [value(0)] uint32 reserved1;
- [range(0,0x100000)] uint32 count;
- [value(0)] uint32 reserved2;
- [size_is(count)] drsuapi_DsReplicaCursor cursors[];
- } drsuapi_DsReplicaCursorCtrEx;
-
- typedef [public] bitmap {
- /* the _WRITEABLE flag indicates a replication with all attributes
- *
- * --metze
- */
- DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE = 0x00000010,
- DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP = 0x00000020,
- DRSUAPI_DS_REPLICA_NEIGHBOUR_DO_SCHEDULED_SYNCS = 0x00000040,
- DRSUAPI_DS_REPLICA_NEIGHBOUR_USE_ASYNC_INTERSIDE_TRANSPORT = 0x00000080,
- DRSUAPI_DS_REPLICA_NEIGHBOUR_TWO_WAY_SYNC = 0x00000200,
- DRSUAPI_DS_REPLICA_NEIGHBOUR_RETURN_OBJECT_PARENTS = 0x00000800,
- DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_IN_PROGRESS = 0x00001000, /* was 0x00010000, */
- DRSUAPI_DS_REPLICA_NEIGHBOUR_FULL_NEXT_PACKET = 0x00002000, /* was 0x00020000, */
- DRSUAPI_DS_REPLICA_NEIGHBOUR_NEVER_SYNCED = 0x00200000,
- DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED = 0x01000000,
- DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS = 0x04000000,
- DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC = 0x08000000,
- /*
- * the following NOTE applies to DsGetNCChangesRequest5:
- * - the data is only compressed when 10 or more objects are replicated
- * - but there could also be a size limit of 35 KBytes or something like that
- * - the reply is DsGetNCChangesCtr2
- * - maybe the same applies to DsGetNCChangesRequest8...
- *
- * --metze
- */
- DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES = 0x10000000,
- DRSUAPI_DS_REPLICA_NEIGHBOUR_NO_CHANGE_NOTIFICATIONS = 0x20000000,
- DRSUAPI_DS_REPLICA_NEIGHBOUR_PARTIAL_ATTRIBUTE_SET = 0x40000000
- } drsuapi_DsReplicaNeighbourFlags;
-
- typedef [flag(NDR_PAHEX),v1_enum] enum {
- DRSUAPI_EXOP_NONE = 0x00000000,
- DRSUAPI_EXOP_FSMO_REQ_ROLE = 0x00000001,
- DRSUAPI_EXOP_FSMO_RID_ALLOC = 0x00000002,
- DRSUAPI_EXOP_FSMO_RID_REQ_ROLE = 0x00000003,
- DRSUAPI_EXOP_FSMO_REQ_PDC = 0x00000004,
- DRSUAPI_EXOP_FSMO_ABANDON_ROLE = 0x00000005,
- DRSUAPI_EXOP_REPL_OBJ = 0x00000006,
- DRSUAPI_EXOP_REPL_SECRET = 0x00000007
- } drsuapi_DsExtendedOperation;
-
- typedef [flag(NDR_PAHEX),v1_enum] enum {
- DRSUAPI_EXOP_ERR_NONE = 0x00000000,
- DRSUAPI_EXOP_ERR_SUCCESS = 0x00000001,
- DRSUAPI_EXOP_ERR_UNKNOWN_OP = 0x00000002,
- DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER = 0x00000003,
- DRSUAPI_EXOP_ERR_UPDATE_ERR = 0x00000004,
- DRSUAPI_EXOP_ERR_EXCEPTION = 0x00000005,
- DRSUAPI_EXOP_ERR_UNKNOWN_CALLER = 0x00000006,
- DRSUAPI_EXOP_ERR_RID_ALLOC = 0x00000007,
- DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED = 0x00000008,
- DRSUAPI_EXOP_ERR_FMSO_PENDING_OP = 0x00000009,
- DRSUAPI_EXOP_ERR_MISMATCH = 0x0000000A,
- DRSUAPI_EXOP_ERR_COULDNT_CONTACT = 0x0000000B,
- DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES = 0x0000000C,
- DRSUAPI_EXOP_ERR_DIR_ERROR = 0x0000000D,
- DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS = 0x0000000E,
- DRSUAPI_EXOP_ERR_ACCESS_DENIED = 0x0000000F,
- DRSUAPI_EXOP_ERR_PARAM_ERROR = 0x00000010
- } drsuapi_DsExtendedError;
-
- typedef struct {
- GUID destination_dsa_guid;
- GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
- [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
- drsuapi_DsReplicaHighWaterMark highwatermark;
- drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
- drsuapi_DsReplicaNeighbourFlags replica_flags;
- uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
- uint32 max_ndr_size; /* w2k3 seems to ignore this */
- drsuapi_DsExtendedOperation extended_op;
- hyper fsmo_info;
- } drsuapi_DsGetNCChangesRequest5;
-
- /*
- * In DRSUAPI all attributes with syntax 2.5.5.2
- * are identified by uint32 values
- *
- * the following table shows the mapping used between the two representations
- * e.g. - objectClass 'nTDSDSA' has governsID: 1.2.840.113556.1.5.7000.47
- * and a UINT32-ID of '0x0017002F'.
- * - so the OID 1.2.840.113556.1.5.7000.47 is splitted into a
- * OID-prefix: 1.2.840.113556.1.5.7000
- * and a value: 47 => 0x2F
- * - the mapping table gives a UINT32-prefix: 0x00170000
- * - and the UINT32-ID is 0x0017002F = 0x00170000 | 0x2F
- *
- * This prefix mapping table is replied in the drsuapi_DsReplicaOIDMapping_Ctr
- * array. The following are the default mappings of w2k3
- *
- * OID-prefix => UINT32-Id prefix
- *
- * 2.5.4.* => 0x00000000 (standard attributes RFC2256 core.schema)
- * 2.5.6.* => 0x00010000 (standard object classes RFC2256 core.schema)
- * 1.2.840.113556.1.2.* => 0x00020000
- * 1.2.840.113556.1.3.* => 0x00030000
- * 2.5.5.* => 0x00080000 (attributeSyntax OID's)
- * 1.2.840.113556.1.4.* => 0x00090000
- * 1.2.840.113556.1.5.* => 0x000A0000
- * 2.16.840.1.113730.3.* => 0x00140000
- * 0.9.2342.19200300.100.1.* => 0x00150000
- * 2.16.840.1.113730.3.1.* => 0x00160000
- * 1.2.840.113556.1.5.7000.* => 0x00170000
- * 2.5.21.* => 0x00180000 (attrs for SubSchema)
- * 2.5.18.* => 0x00190000 (createTimeStamp,modifyTimeStamp, SubSchema)
- * 2.5.20.* => 0x001A0000
- * 1.3.6.1.4.1.1466.101.119.* => 0x001B0000 (dynamicObject, entryTTL)
- * 2.16.840.1.113730.3.2.* => 0x001C0000
- * 1.3.6.1.4.1.250.1.* => 0x001D0000
- * 1.2.840.113549.1.9.* => 0x001E0000 (unstructuredAddress,unstructuredName)
- * 0.9.2342.19200300.100.4.* => 0x001F0000
- *
- * Here's a list of used 'attributeSyntax' OID's
- *
- * 2.5.5.1 => Object(DS-DN) string
- * struct drsuapi_DsObjectIdentifier3
- *
- * 2.5.5.2 => OID-string
- * => all values are represented as uint32 values in drsuapi
- * => governsID, attributeID and attributeSyntax returned as OID-Strings in LDAP
- * => mayContain, mustContain and all other attributes with 2.5.5.2 syntax
- * are returned as attribute names
- *
- * 2.5.5.4 => String(Teletex) case-insensitive string with teletex charset
- *
- * 2.5.5.5 => String(IA5) case-sensitive string
- *
- * 2.5.5.6 => String(Numeric)
- * => eg. internationalISDNNumber
- *
- * 2.5.5.7 => Object(DN-Binary) B:<byte count>:<bytes>:<object DN>
- * => e.g. wellKnownObjects
- *
- * 2.5.5.8 => BOOL
- *
- * 2.5.5.9 => int32
- *
- * 2.5.5.10 => DATA_BLOB
- * => struct GUID
- *
- * 2.5.5.11 => LDAP timestring
- * => NTTIME_1sec
- *
- * 2.5.5.12 => String(Unicode) case-insensitive string
- * => 'standard strings'
- *
- * 2.5.5.13 => Object(Presentation-Address) string
- * => used in objectClass applicationEntity
- *
- * 2.5.5.14 => Object(DN-String) S:<char count>:<string>:<object DN>
- * => not used
- *
- * 2.5.5.15 => ntSecurityDescriptor
- *
- * 2.5.5.16 => int64
- *
- * 2.5.5.17 => dom_sid
- */
- typedef [nopush,nopull] struct {
- [range(0,10000),value(ndr_size_drsuapi_DsReplicaOID_oid(oid, 0))] uint32 __ndr_size;
- [size_is(__ndr_size),charset(DOS)] uint8 *oid; /* it's encoded with asn1_write_OID_String() */
- } drsuapi_DsReplicaOID;
-
- typedef struct {
- uint32 id_prefix;
- drsuapi_DsReplicaOID oid;
- } drsuapi_DsReplicaOIDMapping;
-
- typedef [public] struct {
- [range(0,0x100000)] uint32 num_mappings;
- [size_is(num_mappings)] drsuapi_DsReplicaOIDMapping *mappings;
- } drsuapi_DsReplicaOIDMapping_Ctr;
-
- typedef [flag(NDR_PAHEX),v1_enum] enum {
- DRSUAPI_OBJECTCLASS_top = 0x00010000,
- DRSUAPI_OBJECTCLASS_classSchema = 0x0003000d,
- DRSUAPI_OBJECTCLASS_attributeSchema = 0x0003000e
- } drsuapi_DsObjectClassId;
-
- typedef [flag(NDR_PAHEX),v1_enum,public] enum {
- DRSUAPI_ATTRIBUTE_objectClass = 0x00000000,
- DRSUAPI_ATTRIBUTE_description = 0x0000000d,
- DRSUAPI_ATTRIBUTE_member = 0x0000001f,
- DRSUAPI_ATTRIBUTE_instanceType = 0x00020001,
- DRSUAPI_ATTRIBUTE_whenCreated = 0x00020002,
- DRSUAPI_ATTRIBUTE_hasMasterNCs = 0x0002000e,
- DRSUAPI_ATTRIBUTE_governsID = 0x00020016,
- DRSUAPI_ATTRIBUTE_attributeID = 0x0002001e,
- DRSUAPI_ATTRIBUTE_attributeSyntax = 0x00020020,
- DRSUAPI_ATTRIBUTE_isSingleValued = 0x00020021,
- DRSUAPI_ATTRIBUTE_rangeLower = 0x00020022,
- DRSUAPI_ATTRIBUTE_rangeUpper = 0x00020023,
- DRSUAPI_ATTRIBUTE_dMDLocation = 0x00020024,
- DRSUAPI_ATTRIBUTE_objectVersion = 0x0002004c,
- DRSUAPI_ATTRIBUTE_invocationId = 0x00020073,
- DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly = 0x000200a9,
- DRSUAPI_ATTRIBUTE_adminDisplayName = 0x000200c2,
- DRSUAPI_ATTRIBUTE_adminDescription = 0x000200e2,
- DRSUAPI_ATTRIBUTE_oMSyntax = 0x000200e7,
- DRSUAPI_ATTRIBUTE_ntSecurityDescriptor = 0x00020119,
- DRSUAPI_ATTRIBUTE_searchFlags = 0x0002014e,
- DRSUAPI_ATTRIBUTE_lDAPDisplayName = 0x000201cc,
- DRSUAPI_ATTRIBUTE_name = 0x00090001,
- DRSUAPI_ATTRIBUTE_userAccountControl = 0x00090008,
- DRSUAPI_ATTRIBUTE_currentValue = 0x0009001b,
- DRSUAPI_ATTRIBUTE_homeDirectory = 0x0009002c,
- DRSUAPI_ATTRIBUTE_homeDrive = 0x0009002d,
- DRSUAPI_ATTRIBUTE_scriptPath = 0x0009003e,
- DRSUAPI_ATTRIBUTE_profilePath = 0x0009008b,
- DRSUAPI_ATTRIBUTE_objectSid = 0x00090092,
- DRSUAPI_ATTRIBUTE_schemaIDGUID = 0x00090094,
- DRSUAPI_ATTRIBUTE_dBCSPwd = 0x00090037,/* lmPwdHash */
- DRSUAPI_ATTRIBUTE_logonHours = 0x00090040,
- DRSUAPI_ATTRIBUTE_userWorkstations = 0x00090056,
- DRSUAPI_ATTRIBUTE_unicodePwd = 0x0009005a,/* ntPwdHash */
- DRSUAPI_ATTRIBUTE_ntPwdHistory = 0x0009005e,
- DRSUAPI_ATTRIBUTE_priorValue = 0x00090064,
- DRSUAPI_ATTRIBUTE_supplementalCredentials = 0x0009007d,
- DRSUAPI_ATTRIBUTE_trustAuthIncoming = 0x00090081,
- DRSUAPI_ATTRIBUTE_trustAuthOutgoing = 0x00090087,
- DRSUAPI_ATTRIBUTE_lmPwdHistory = 0x000900a0,
- DRSUAPI_ATTRIBUTE_sAMAccountName = 0x000900dd,
- DRSUAPI_ATTRIBUTE_sAMAccountType = 0x0009012e,
- DRSUAPI_ATTRIBUTE_fSMORoleOwner = 0x00090171,
- DRSUAPI_ATTRIBUTE_systemFlags = 0x00090177,
- DRSUAPI_ATTRIBUTE_serverReference = 0x00090203,
- DRSUAPI_ATTRIBUTE_serverReferenceBL = 0x00090204,
- DRSUAPI_ATTRIBUTE_initialAuthIncoming = 0x0009021b,
- DRSUAPI_ATTRIBUTE_initialAuthOutgoing = 0x0009021c,
- DRSUAPI_ATTRIBUTE_wellKnownObjects = 0x0009026a,
- DRSUAPI_ATTRIBUTE_dNSHostName = 0x0009026b,
- DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet = 0x0009027f,
- DRSUAPI_ATTRIBUTE_userPrincipalName = 0x00090290,
- DRSUAPI_ATTRIBUTE_groupType = 0x000902ee,
- DRSUAPI_ATTRIBUTE_servicePrincipalName = 0x00090303,
- DRSUAPI_ATTRIBUTE_objectCategory = 0x0009030e,
- DRSUAPI_ATTRIBUTE_gPLink = 0x0009037b,
- DRSUAPI_ATTRIBUTE_msDS_Behavior_Version = 0x000905b3,
- DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber = 0x000906f6,
- DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs = 0x0009071c,
- DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs = 0x0009072c
- } drsuapi_DsAttributeId;
-
- typedef struct {
- [value(1)] uint32 version;
- [value(0)] uint32 reserved1;
- [range(1,0x100000)] uint32 num_attids;
- [size_is(num_attids)] drsuapi_DsAttributeId attids[];
- } drsuapi_DsPartialAttributeSet;
-
- typedef struct {
- GUID destination_dsa_guid;
- GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
- [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
- drsuapi_DsReplicaHighWaterMark highwatermark;
- drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
- drsuapi_DsReplicaNeighbourFlags replica_flags;
- uint32 max_object_count; /* w2k3 uses min(133,max(100,max_object_count)) */
- uint32 max_ndr_size; /* w2k3 seems to ignore this */
- drsuapi_DsExtendedOperation extended_op;
- hyper fsmo_info;
- drsuapi_DsPartialAttributeSet *partial_attribute_set;
- drsuapi_DsPartialAttributeSet *partial_attribute_set_ex;
- drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
- } drsuapi_DsGetNCChangesRequest8;
-
- typedef [switch_type(int32)] union {
- [case(5)] drsuapi_DsGetNCChangesRequest5 req5;
- [case(8)] drsuapi_DsGetNCChangesRequest8 req8;
- } drsuapi_DsGetNCChangesRequest;
-
- typedef [public] struct {
- GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
- hyper highest_usn; /* updated after a full replication cycle */
- NTTIME last_sync_success;
- } drsuapi_DsReplicaCursor2;
-
- typedef struct {
- [value(2)] uint32 version;
- [value(0)] uint32 reserved1;
- [range(0,0x100000)] uint32 count;
- [value(0)] uint32 reserved2;
- [size_is(count)] drsuapi_DsReplicaCursor2 cursors[];
- } drsuapi_DsReplicaCursor2CtrEx;
-
- /* Generic DATA_BLOB values */
- typedef struct {
- [range(0,10485760),value(ndr_size_DATA_BLOB(0,blob,0))] uint32 __ndr_size;
- DATA_BLOB *blob;
- } drsuapi_DsAttributeValue;
-
- typedef struct {
- [range(0,10485760)] uint32 num_values;
- [size_is(num_values)] drsuapi_DsAttributeValue *values;
- } drsuapi_DsAttributeValueCtr;
-
- /* DN String values */
- typedef [public,gensize] struct {
- [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3(r, ndr->flags))] uint32 __ndr_size;
- [value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid;
- GUID guid;
- dom_sid28 sid;
- [value(strlen_m(dn))] uint32 __ndr_size_dn;
- [charset(UTF16)] uint16 dn[__ndr_size_dn+1];
- } drsuapi_DsReplicaObjectIdentifier3;
-
- typedef [public,gensize] struct {
- [value(ndr_size_drsuapi_DsReplicaObjectIdentifier3Binary(r, ndr->flags))] uint32 __ndr_size;
- [value(ndr_size_dom_sid28(&sid,ndr->flags))] uint32 __ndr_size_sid;
- GUID guid;
- dom_sid28 sid;
- [value(strlen_m(dn))] uint32 __ndr_size_dn;
- [charset(UTF16)] uint16 dn[__ndr_size_dn+1];
- [value(binary.length + 4)] uint32 __ndr_size_binary;
- [flag(NDR_REMAINING)] DATA_BLOB binary;
- } drsuapi_DsReplicaObjectIdentifier3Binary;
-
- typedef [public] struct {
- drsuapi_DsAttributeId attid;
- drsuapi_DsAttributeValueCtr value_ctr;
- } drsuapi_DsReplicaAttribute;
-
- typedef struct {
- [range(0,1048576)] uint32 num_attributes;
- [size_is(num_attributes)] drsuapi_DsReplicaAttribute *attributes;
- } drsuapi_DsReplicaAttributeCtr;
-
- typedef [public] bitmap {
- DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER = 0x00000001,
- DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC = 0x00000002,
- DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY = 0x00010000
- } drsuapi_DsReplicaObjectFlags;
-
- typedef [public] struct {
- drsuapi_DsReplicaObjectIdentifier *identifier;
- drsuapi_DsReplicaObjectFlags flags;
- drsuapi_DsReplicaAttributeCtr attribute_ctr;
- } drsuapi_DsReplicaObject;
-
- typedef struct {
- uint32 version;
- NTTIME_1sec originating_change_time;
- GUID originating_invocation_id;
- hyper originating_usn;
- } drsuapi_DsReplicaMetaData;
-
- typedef [public] struct {
- [range(0,1048576)] uint32 count;
- [size_is(count)] drsuapi_DsReplicaMetaData meta_data[];
- } drsuapi_DsReplicaMetaDataCtr;
-
- typedef [public,noprint] struct {
- drsuapi_DsReplicaObjectListItemEx *next_object;
- drsuapi_DsReplicaObject object;
- boolean32 is_nc_prefix;
- GUID *parent_object_guid;
- drsuapi_DsReplicaMetaDataCtr *meta_data_ctr;
- } drsuapi_DsReplicaObjectListItemEx;
-
- typedef [public,gensize] struct {
- GUID source_dsa_guid; /* the 'objectGUID' field of the CN=NTDS Settings object */
- GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
- drsuapi_DsReplicaObjectIdentifier *naming_context;
- drsuapi_DsReplicaHighWaterMark old_highwatermark;
- drsuapi_DsReplicaHighWaterMark new_highwatermark;
- drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;
- drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
- drsuapi_DsExtendedError extended_ret; /* w2k sends the nc_object_count value here */
- uint32 object_count;
- /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
- [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->flags)+55)] uint32 __ndr_size;
- drsuapi_DsReplicaObjectListItemEx *first_object;
- boolean32 more_data;
- } drsuapi_DsGetNCChangesCtr1;
-
- /*
- * if the DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE flag
- * isn't there it means the value is deleted
- */
- typedef [public] bitmap {
- DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE = 0x00000001
- } drsuapi_DsLinkedAttributeFlags;
-
- typedef [public] struct {
- drsuapi_DsReplicaObjectIdentifier *identifier;
- drsuapi_DsAttributeId attid;
- drsuapi_DsAttributeValue value;
- drsuapi_DsLinkedAttributeFlags flags;
- NTTIME_1sec originating_add_time;
- drsuapi_DsReplicaMetaData meta_data;
- } drsuapi_DsReplicaLinkedAttribute;
-
- typedef [public,gensize] struct {
- GUID source_dsa_guid; /* the 'objectGUID' field of the CN=NTDS Settings object */
- GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
- drsuapi_DsReplicaObjectIdentifier *naming_context;
- drsuapi_DsReplicaHighWaterMark old_highwatermark;
- drsuapi_DsReplicaHighWaterMark new_highwatermark;
- drsuapi_DsReplicaCursor2CtrEx *uptodateness_vector;
- drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr;
- drsuapi_DsExtendedError extended_ret;
- uint32 object_count;
- /* this +55 is sometimes +56, so I don't know where this comes from... --metze */
- [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->flags)+55)] uint32 __ndr_size;
- drsuapi_DsReplicaObjectListItemEx *first_object;
- boolean32 more_data;
- uint32 nc_object_count; /* estimated amount of objects in the whole NC */
- uint32 nc_linked_attributes_count; /* estimated amount of linked values in the whole NC */
- [range(0,1048576)] uint32 linked_attributes_count;
- [size_is(linked_attributes_count)] drsuapi_DsReplicaLinkedAttribute *linked_attributes;
- WERROR drs_error;
- } drsuapi_DsGetNCChangesCtr6;
-
- typedef [public] struct {
- [subcontext(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr1 ctr1;
- } drsuapi_DsGetNCChangesCtr1TS;
-
- typedef [public] struct {
- [subcontext(0xFFFFFC01)] drsuapi_DsGetNCChangesCtr6 ctr6;
- } drsuapi_DsGetNCChangesCtr6TS;
-
- typedef [nopush] struct {
- uint32 decompressed_length;
- uint32 compressed_length;
- [subcontext(4),subcontext_size(compressed_length),
- compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)]
- drsuapi_DsGetNCChangesCtr1TS *ts;
- } drsuapi_DsGetNCChangesMSZIPCtr1;
-
- typedef [nopush] struct {
- uint32 decompressed_length;
- uint32 compressed_length;
- [subcontext(4),subcontext_size(compressed_length),
- compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)]
- drsuapi_DsGetNCChangesCtr6TS *ts;
- } drsuapi_DsGetNCChangesMSZIPCtr6;
-
- typedef [nopush] struct {
- uint32 decompressed_length;
- uint32 compressed_length;
- [subcontext(4),subcontext_size(compressed_length),
- compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)]
- drsuapi_DsGetNCChangesCtr1TS *ts;
- } drsuapi_DsGetNCChangesXPRESSCtr1;
-
- typedef [nopush] struct {
- uint32 decompressed_length;
- uint32 compressed_length;
- [subcontext(4),subcontext_size(compressed_length),
- compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)]
- drsuapi_DsGetNCChangesCtr6TS *ts;
- } drsuapi_DsGetNCChangesXPRESSCtr6;
-
- typedef [enum16bit] enum {
- DRSUAPI_COMPRESSION_TYPE_MSZIP = 2,
- DRSUAPI_COMPRESSION_TYPE_XPRESS = 3
- } drsuapi_DsGetNCChangesCompressionType;
-
- typedef [nodiscriminant,flag(NDR_PAHEX)] union {
- [case(1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesMSZIPCtr1 mszip1;
- [case(6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesMSZIPCtr6 mszip6;
- [case(1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16))] drsuapi_DsGetNCChangesXPRESSCtr1 xpress1;
- [case(6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16))] drsuapi_DsGetNCChangesXPRESSCtr6 xpress6;
- } drsuapi_DsGetNCChangesCompressedCtr;
-
- typedef struct {
- drsuapi_DsGetNCChangesMSZIPCtr1 mszip1;
- } drsuapi_DsGetNCChangesCtr2;
-
- typedef struct {
- [range(0,6)] int32 level;
- [range(2,3)] drsuapi_DsGetNCChangesCompressionType type;
- [switch_is(level | (type<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr;
- } drsuapi_DsGetNCChangesCtr7;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsGetNCChangesCtr1 ctr1;
- [case(2)] drsuapi_DsGetNCChangesCtr2 ctr2;
- [case(6)] drsuapi_DsGetNCChangesCtr6 ctr6;
- [case(7)] drsuapi_DsGetNCChangesCtr7 ctr7;
- } drsuapi_DsGetNCChangesCtr;
-
- WERROR drsuapi_DsGetNCChanges(
- [in] policy_handle *bind_handle,
- [in] int32 level,
- [in,ref,switch_is(level)] drsuapi_DsGetNCChangesRequest *req,
- [out,ref] int32 *level_out,
- [out,ref,switch_is(*level_out)] drsuapi_DsGetNCChangesCtr *ctr
- );
-
- /*****************/
- /* Function 0x04 */
- typedef bitmap {
- DRSUAPI_DS_REPLICA_UPDATE_ASYNCHRONOUS_OPERATION = 0x00000001,
- DRSUAPI_DS_REPLICA_UPDATE_WRITEABLE = 0x00000002,
- DRSUAPI_DS_REPLICA_UPDATE_ADD_REFERENCE = 0x00000004,
- DRSUAPI_DS_REPLICA_UPDATE_DELETE_REFERENCE = 0x00000008,
- DRSUAPI_DS_REPLICA_UPDATE_0x00000010 = 0x00000010
- } drsuapi_DsReplicaUpdateRefsOptions;
-
- typedef struct {
- [ref] drsuapi_DsReplicaObjectIdentifier *naming_context;
- [ref,charset(DOS),string] uint8 *dest_dsa_dns_name;
- GUID dest_dsa_guid;
- drsuapi_DsReplicaUpdateRefsOptions options;
- } drsuapi_DsReplicaUpdateRefsRequest1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsReplicaUpdateRefsRequest1 req1;
- } drsuapi_DsReplicaUpdateRefsRequest;
-
- WERROR drsuapi_DsReplicaUpdateRefs(
- [in] policy_handle *bind_handle,
- [in] int32 level,
- [in,switch_is(level)] drsuapi_DsReplicaUpdateRefsRequest req
- );
-
- /*****************/
- /* Function 0x05 */
- typedef bitmap {
- DRSUAPI_DS_REPLICA_ADD_ASYNCHRONOUS_OPERATION = 0x00000001,
- DRSUAPI_DS_REPLICA_ADD_WRITEABLE = 0x00000002
- /* TODO ... */
- } drsuapi_DsReplicaAddOptions;
-
- [todo] WERROR DRSUAPI_REPLICA_ADD();
-
- /*****************/
- /* Function 0x06 */
- typedef bitmap {
- DRSUAPI_DS_REPLICA_DELETE_ASYNCHRONOUS_OPERATION = 0x00000001,
- DRSUAPI_DS_REPLICA_DELETE_WRITEABLE = 0x00000002
- /* TODO ... */
- } drsuapi_DsReplicaDeleteOptions;
-
- [todo] WERROR DRSUAPI_REPLICA_DEL();
-
- /*****************/
- /* Function 0x07 */
- typedef bitmap {
- DRSUAPI_DS_REPLICA_MODIFY_ASYNCHRONOUS_OPERATION = 0x00000001,
- DRSUAPI_DS_REPLICA_MODIFY_WRITEABLE = 0x00000002
- } drsuapi_DsReplicaModifyOptions;
-
- [todo] WERROR DRSUAPI_REPLICA_MODIFY();
-
- /*****************/
- /* Function 0x08 */
- [todo] WERROR DRSUAPI_VERIFY_NAMES();
-
- /*****************/
- /* Function 0x09 */
-
- /* how are type 4 and 7 different from 2 and 3 ? */
- typedef [v1_enum] enum {
- DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS = 1,
- DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS = 2,
- DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS = 3,
- DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2 = 4,
- DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS = 5,
- DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS = 6,
- DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2 = 7
- } drsuapi_DsMembershipType;
-
- typedef struct {
- NTSTATUS status;
- [range(0,10000)] uint32 num_memberships;
- [range(0,10000)] uint32 num_sids;
- [size_is(num_memberships)] drsuapi_DsReplicaObjectIdentifier **info_array;
- [size_is(num_memberships)] samr_GroupAttrs *group_attrs;
- [size_is(num_sids)] dom_sid28 **sids;
- } drsuapi_DsGetMembershipsCtr1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1;
- } drsuapi_DsGetMembershipsCtr;
-
- const int DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR = 0x1;
-
- typedef struct {
- [range(1,10000)] uint32 count;
- [size_is(count)] drsuapi_DsReplicaObjectIdentifier **info_array;
- uint32 flags;
- drsuapi_DsMembershipType type;
- drsuapi_DsReplicaObjectIdentifier *domain;
- } drsuapi_DsGetMembershipsRequest1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsGetMembershipsRequest1 req1;
- } drsuapi_DsGetMembershipsRequest;
-
- [todo] WERROR drsuapi_DsGetMemberships(
- [in] policy_handle *bind_handle,
- [in] int32 level,
- [in,ref] [switch_is(level)] drsuapi_DsGetMembershipsRequest *req,
- [out,ref] int32 *level_out,
- [out,ref] [switch_is(*level_out)] drsuapi_DsGetMembershipsCtr *ctr
- );
-
- /*****************/
- /* Function 0x0a */
- [todo] WERROR DRSUAPI_INTER_DOMAIN_MOVE();
-
- /*****************/
- /* Function 0x0b */
- typedef struct {
- uint32 unknown1;
- uint32 unknown2;
- [range(0,0x00A00000)] uint32 length;
- [size_is(length)] uint8 *data;
- } drsuapi_DsGetNT4ChangeLogRequest1;
-
- typedef [switch_type(uint32)] union {
- [case(1)] drsuapi_DsGetNT4ChangeLogRequest1 req1;
- } drsuapi_DsGetNT4ChangeLogRequest;
-
- typedef struct {
- [range(0,0x00A00000)] uint32 length1;
- [range(0,0x00A00000)] uint32 length2;
- hyper unknown1;
- NTTIME time2;
- hyper unknown3;
- NTTIME time4;
- hyper unknown5;
- NTTIME time6;
- NTSTATUS status;
- [size_is(length1)] uint8 *data1;
- [size_is(length2)] uint8 *data2;
- } drsuapi_DsGetNT4ChangeLogInfo1;
-
- typedef [switch_type(uint32)] union {
- [case(1)] drsuapi_DsGetNT4ChangeLogInfo1 info1;
- } drsuapi_DsGetNT4ChangeLogInfo;
-
- [todo] WERROR drsuapi_DsGetNT4ChangeLog(
- [in] policy_handle *bind_handle,
- [in] uint32 level,
- [in,ref] [switch_is(level)] drsuapi_DsGetNT4ChangeLogRequest *req,
- [out,ref] uint32 *level_out,
- [out,ref] [switch_is(*level_out)] drsuapi_DsGetNT4ChangeLogInfo *info
- );
-
- /*****************/
- /* Function 0x0c */
- typedef [v1_enum] enum {
- DRSUAPI_DS_NAME_STATUS_OK = 0,
- DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR = 1,
- DRSUAPI_DS_NAME_STATUS_NOT_FOUND = 2,
- DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE = 3,
- DRSUAPI_DS_NAME_STATUS_NO_MAPPING = 4,
- DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY = 5,
- DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING = 6,
- DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL = 7
- } drsuapi_DsNameStatus;
-
- typedef [v1_enum] enum {
- DRSUAPI_DS_NAME_FLAG_NO_FLAGS = 0x0,
- DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY = 0x1,
- DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC = 0x2,
- DRSUAPI_DS_NAME_FLAG_GCVERIFY = 0x4,
- DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL = 0x8
- } drsuapi_DsNameFlags;
-
- typedef [v1_enum] enum {
- DRSUAPI_DS_NAME_FORMAT_UNKNOWN = 0,
- DRSUAPI_DS_NAME_FORMAT_FQDN_1779 = 1,
- DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT = 2,
- DRSUAPI_DS_NAME_FORMAT_DISPLAY = 3,
- DRSUAPI_DS_NAME_FORMAT_GUID = 6,
- DRSUAPI_DS_NAME_FORMAT_CANONICAL = 7,
- DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL = 8,
- DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX = 9,
- DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL = 10,
- DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY = 11,
- DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN = 12
- } drsuapi_DsNameFormat;
-
- typedef struct {
- [string,charset(UTF16)] uint16 *str;
- } drsuapi_DsNameString;
-
- typedef struct {
- uint32 codepage; /* 0x000004e4 - 1252 is german codepage*/
- uint32 language; /* 0x00000407 - german language ID*/
- drsuapi_DsNameFlags format_flags;
- drsuapi_DsNameFormat format_offered;
- drsuapi_DsNameFormat format_desired;
- [range(1,10000)] uint32 count;
- [size_is(count)] drsuapi_DsNameString *names;
- } drsuapi_DsNameRequest1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsNameRequest1 req1;
- } drsuapi_DsNameRequest;
-
- typedef struct {
- drsuapi_DsNameStatus status;
- [charset(UTF16),string] uint16 *dns_domain_name;
- [charset(UTF16),string] uint16 *result_name;
- } drsuapi_DsNameInfo1;
-
- typedef struct {
- uint32 count;
- [size_is(count)] drsuapi_DsNameInfo1 *array;
- } drsuapi_DsNameCtr1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsNameCtr1 *ctr1;
- } drsuapi_DsNameCtr;
-
- WERROR drsuapi_DsCrackNames(
- [in] policy_handle *bind_handle,
- [in] int32 level,
- [in,ref,switch_is(level)] drsuapi_DsNameRequest *req,
- [out,ref] int32 *level_out,
- [out,ref,switch_is(*level_out)] drsuapi_DsNameCtr *ctr
- );
-
- /*****************/
- /* Function 0x0d */
- typedef [v1_enum] enum {
- DRSUAPI_DS_SPN_OPERATION_ADD = 0,
- DRSUAPI_DS_SPN_OPERATION_REPLACE= 1,
- DRSUAPI_DS_SPN_OPERATION_DELETE = 2
- } drsuapi_DsSpnOperation;
-
- typedef struct {
- drsuapi_DsSpnOperation operation;
- uint32 unknown1;
- [charset(UTF16),string] uint16 *object_dn;
- [range(0,10000)] uint32 count;
- [size_is(count)] drsuapi_DsNameString *spn_names;
- } drsuapi_DsWriteAccountSpnRequest1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsWriteAccountSpnRequest1 req1;
- } drsuapi_DsWriteAccountSpnRequest;
-
- typedef struct {
- WERROR status;
- } drsuapi_DsWriteAccountSpnResult1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsWriteAccountSpnResult1 res1;
- } drsuapi_DsWriteAccountSpnResult;
-
- WERROR drsuapi_DsWriteAccountSpn(
- [in] policy_handle *bind_handle,
- [in] int32 level,
- [in,ref,switch_is(level)] drsuapi_DsWriteAccountSpnRequest *req,
- [out,ref] int32 *level_out,
- [out,ref,switch_is(*level_out)] drsuapi_DsWriteAccountSpnResult *res
- );
-
- /*****************/
- /* Function 0x0e */
- typedef struct {
- [charset(UTF16),string] uint16 *server_dn;
- [charset(UTF16),string] uint16 *domain_dn;
- boolean32 commit;
- } drsuapi_DsRemoveDSServerRequest1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsRemoveDSServerRequest1 req1;
- } drsuapi_DsRemoveDSServerRequest;
-
- typedef struct {
- boolean32 last_dc_in_domain;
- } drsuapi_DsRemoveDSServerResult1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsRemoveDSServerResult1 res1;
- } drsuapi_DsRemoveDSServerResult;
-
- WERROR drsuapi_DsRemoveDSServer(
- [in] policy_handle *bind_handle,
- [in] int32 level,
- [in,ref,switch_is(level)] drsuapi_DsRemoveDSServerRequest *req,
- [out,ref] int32 *level_out,
- [out,ref,switch_is(*level_out)] drsuapi_DsRemoveDSServerResult *res
- );
-
- /*****************/
- /* Function 0x0f */
- [todo] WERROR DRSUAPI_REMOVE_DS_DOMAIN();
-
- /*****************/
- /* Function 0x10 */
- typedef struct {
- [charset(UTF16),string] uint16 *domain_name; /* netbios or dns */
- int32 level; /* specifies the switch level for the request */
- } drsuapi_DsGetDCInfoRequest1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsGetDCInfoRequest1 req1;
- } drsuapi_DsGetDCInfoRequest;
-
- typedef struct {
- [charset(UTF16),string] uint16 *netbios_name;
- [charset(UTF16),string] uint16 *dns_name;
- [charset(UTF16),string] uint16 *site_name;
- [charset(UTF16),string] uint16 *computer_dn;
- [charset(UTF16),string] uint16 *server_dn;
- uint32 is_pdc;
- uint32 is_enabled;
- } drsuapi_DsGetDCInfo1;
-
- typedef struct {
- [range(0,10000)] uint32 count;
- [size_is(count)] drsuapi_DsGetDCInfo1 *array;
- } drsuapi_DsGetDCInfoCtr1;
-
- typedef struct {
- [charset(UTF16),string] uint16 *netbios_name;
- [charset(UTF16),string] uint16 *dns_name;
- [charset(UTF16),string] uint16 *site_name;
- [charset(UTF16),string] uint16 *site_dn;
- [charset(UTF16),string] uint16 *computer_dn;
- [charset(UTF16),string] uint16 *server_dn;
- [charset(UTF16),string] uint16 *ntds_dn;
- uint32 is_pdc;
- uint32 is_enabled;
- uint32 is_gc;
- GUID site_guid;
- GUID computer_guid;
- GUID server_guid;
- GUID ntds_guid;
- } drsuapi_DsGetDCInfo2;
-
- typedef struct {
- [range(0,10000)] uint32 count;
- [size_is(count)] drsuapi_DsGetDCInfo2 *array;
- } drsuapi_DsGetDCInfoCtr2;
-
- typedef struct {
- [charset(UTF16),string] uint16 *netbios_name;
- [charset(UTF16),string] uint16 *dns_name;
- [charset(UTF16),string] uint16 *site_name;
- [charset(UTF16),string] uint16 *site_dn;
- [charset(UTF16),string] uint16 *computer_dn;
- [charset(UTF16),string] uint16 *server_dn;
- [charset(UTF16),string] uint16 *ntds_dn;
- uint32 is_pdc;
- uint32 is_enabled;
- uint32 is_gc;
- uint32 is_rodc;
- GUID site_guid;
- GUID computer_guid;
- GUID server_guid;
- GUID ntds_guid;
- } drsuapi_DsGetDCInfo3;
-
- typedef struct {
- [range(0,10000)] uint32 count;
- [size_is(count)] drsuapi_DsGetDCInfo3 *array;
- } drsuapi_DsGetDCInfoCtr3;
-
- /*
- * this represents an active connection to the
- * Directory System Agent (DSA)
- * this can be via LDAP or DRSUAPI
- */
- typedef struct {
- [flag(NDR_BIG_ENDIAN)] ipv4address client_ip_address;
- uint32 unknown2;
- uint32 connection_time; /* in seconds */
- uint32 unknown4;
- uint32 unknown5;
- uint32 unknown6;
- /*
- * client_account can be the following:
- * "W2K3\Administrator"
- * "Administrator@W2K3"
- * "cn=Administrator,cn=Users,DC=w2k3,DC=vmnet1,DC=vm,DC=base"
- * ""
- * or NULL
- */
- [charset(UTF16),string] uint16 *client_account;
- } drsuapi_DsGetDCConnection01;
-
- typedef struct {
- [range(0,10000)] uint32 count;
- [size_is(count)] drsuapi_DsGetDCConnection01 *array;
- } drsuapi_DsGetDCConnectionCtr01;
-
- typedef [v1_enum] enum {
- DRSUAPI_DC_INFO_CTR_1 = 1,
- DRSUAPI_DC_INFO_CTR_2 = 2,
- DRSUAPI_DC_INFO_CTR_3 = 3,
- DRSUAPI_DC_CONNECTION_CTR_01 = -1
- } drsuapi_DsGetDCInfoCtrLevels;
-
- typedef [switch_type(int32)] union {
- [case(DRSUAPI_DC_INFO_CTR_1)] drsuapi_DsGetDCInfoCtr1 ctr1;
- [case(DRSUAPI_DC_INFO_CTR_2)] drsuapi_DsGetDCInfoCtr2 ctr2;
- [case(DRSUAPI_DC_INFO_CTR_3)] drsuapi_DsGetDCInfoCtr3 ctr3;
- [case(DRSUAPI_DC_CONNECTION_CTR_01)] drsuapi_DsGetDCConnectionCtr01 ctr01;
- } drsuapi_DsGetDCInfoCtr;
-
- WERROR drsuapi_DsGetDomainControllerInfo(
- [in] policy_handle *bind_handle,
- [in] int32 level,
- [in,ref,switch_is(level)] drsuapi_DsGetDCInfoRequest *req,
- [out,ref] int32 *level_out,
- [out,ref,switch_is(*level_out)] drsuapi_DsGetDCInfoCtr *ctr
- );
-
- /*****************/
- /* Function 0x11 */
- typedef [public,noprint] struct {
- drsuapi_DsReplicaObjectListItem *next_object;
- drsuapi_DsReplicaObject object;
- } drsuapi_DsReplicaObjectListItem;
-
- /*
- * The DsAddEntry() call which creates a nTDSDSA object,
- * also adds a servicePrincipalName in the following form
- * to the computer account of the new domain controller
- * referenced by the "serverReferenece" attribute.
- *
- * E3514235-4B06-11D1-AB04-00C04FC2DCD2/<new-ntdsdsa-object-guid-as-string>/<domain-dns-name>
- *
- * also note that the "serverReference" isn't added to the new object!
- */
- const char *DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID = "E3514235-4B06-11D1-AB04-00C04FC2DCD2";
-
- /*
- * please note the the current idl
- * for DsAddEntry does only parse
- * what I saw between 2 w2k3 boxes
- * in my dssync experiments I got some other replies
- * so all I want to say is that this is very incomplete yet...
- * --metze
- */
- typedef struct {
- drsuapi_DsReplicaObjectListItem first_object;
- } drsuapi_DsAddEntryRequest2;
-
- typedef [switch_type(int32)] union {
- [case(2)] drsuapi_DsAddEntryRequest2 req2;
- } drsuapi_DsAddEntryRequest;
-
- typedef struct {
- uint32 unknown1;
- WERROR status;
- uint32 unknown2;
- uint16 unknown3;
- } drsuapi_DsAddEntryErrorInfoX;
-
- typedef struct {
- [range(0,10485760)] uint32 size;
- [size_is(size)] uint8 *data;
- } drsuapi_DsAddEntryExtraErrorBuffer;
-
- typedef struct {
- drsuapi_DsAddEntryErrorInfoX error;
- drsuapi_DsAttributeId attid;
- uint32 unknown2;
- drsuapi_DsAddEntryExtraErrorBuffer buffer;
- } drsuapi_DsAddEntryExtraError1;
-
- typedef /*[noprint]*/ struct {
- drsuapi_DsAddEntryErrorListItem1 *next;
- drsuapi_DsAddEntryExtraError1 error;
- } drsuapi_DsAddEntryErrorListItem1;
-
- typedef struct {
- drsuapi_DsReplicaObjectIdentifier *id;
- WERROR status;
- drsuapi_DsAddEntryErrorListItem1 first;
- } drsuapi_DsAddEntryErrorInfo1;
-
- typedef [switch_type(uint32)] union {
- [case(1)] drsuapi_DsAddEntryErrorInfo1 error1;
-/* [case(2)] drsuapi_DsAddEntryErrorInfo2 error2;
- [case(3)] drsuapi_DsAddEntryErrorInfo3 error3;
-*/ [case(4)] drsuapi_DsAddEntryErrorInfoX errorX;
- [case(5)] drsuapi_DsAddEntryErrorInfoX errorX;
- [case(6)] drsuapi_DsAddEntryErrorInfoX errorX;
- [case(7)] drsuapi_DsAddEntryErrorInfoX errorX;
- } drsuapi_DsAddEntryErrorInfo;
-
- typedef struct {
- WERROR status;
- uint32 level;
- [switch_is(level)] drsuapi_DsAddEntryErrorInfo *info;
- } drsuapi_DsAddEntryError1;
-
- typedef [switch_type(uint32)] union {
- [case(1)] drsuapi_DsAddEntryError1 info1;
- } drsuapi_DsAddEntryError;
-
- typedef struct {
- GUID guid;
- dom_sid28 sid;
- } drsuapi_DsReplicaObjectIdentifier2;
-
- typedef struct {
- drsuapi_DsReplicaObjectIdentifier *id;
- uint32 unknown1;
- drsuapi_DsAddEntryErrorInfoX error;
- [range(0,10000)] uint32 count;
- [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects;
- } drsuapi_DsAddEntryCtr2;
-
- typedef struct {
- drsuapi_DsReplicaObjectIdentifier *id;
- uint32 level;
- [switch_is(level)] drsuapi_DsAddEntryError *error;
- [range(0,10000)] uint32 count;
- [size_is(count)] drsuapi_DsReplicaObjectIdentifier2 *objects;
- } drsuapi_DsAddEntryCtr3;
-
- typedef [switch_type(int32)] union {
- [case(2)] drsuapi_DsAddEntryCtr2 ctr2;
- [case(3)] drsuapi_DsAddEntryCtr3 ctr3;
- } drsuapi_DsAddEntryCtr;
-
- [public] WERROR drsuapi_DsAddEntry(
- [in] policy_handle *bind_handle,
- [in] int32 level,
- [in,ref,switch_is(level)] drsuapi_DsAddEntryRequest *req,
- [out,ref] int32 *level_out,
- [out,ref,switch_is(*level_out)] drsuapi_DsAddEntryCtr *ctr
- );
-
- /*****************/
- /* Function 0x12 */
- [todo] WERROR DRSUAPI_EXECUTE_KCC();
-
- /*****************/
- /* Function 0x13 */
- typedef [v1_enum] enum {
- DRSUAPI_DS_REPLICA_GET_INFO = 1,
- DRSUAPI_DS_REPLICA_GET_INFO2 = 2
- } drsuapi_DsReplicaGetInfoLevel;
-
- typedef [v1_enum] enum {
- DRSUAPI_DS_REPLICA_INFO_NEIGHBORS = 0,
- DRSUAPI_DS_REPLICA_INFO_CURSORS = 1,
- DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA = 2,
- DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES = 3,
- DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES = 4,
- DRSUAPI_DS_REPLICA_INFO_PENDING_OPS = 5,
- DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA = 6,
- DRSUAPI_DS_REPLICA_INFO_CURSORS2 = 7,
- DRSUAPI_DS_REPLICA_INFO_CURSORS3 = 8,
- DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2 = 9,
- DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2 = 10,
- DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02 = -2,
- DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04 = -4,
- DRSUAPI_DS_REPLICA_INFO_CURSORS05 = -5,
- DRSUAPI_DS_REPLICA_INFO_06 = -6
- } drsuapi_DsReplicaInfoType;
-
- typedef struct {
- drsuapi_DsReplicaInfoType info_type;
- [charset(UTF16),string] uint16 *object_dn;
- GUID guid1;
- } drsuapi_DsReplicaGetInfoRequest1;
-
- typedef struct {
- drsuapi_DsReplicaInfoType info_type;
- [charset(UTF16),string] uint16 *object_dn;
- GUID guid1;
- uint32 unknown1;
- [charset(UTF16),string] uint16 *string1;
- [charset(UTF16),string] uint16 *string2;
- uint32 unknown2;
- } drsuapi_DsReplicaGetInfoRequest2;
-
- typedef [switch_type(drsuapi_DsReplicaGetInfoLevel)] union {
- [case(DRSUAPI_DS_REPLICA_GET_INFO)] drsuapi_DsReplicaGetInfoRequest1 req1;
- [case(DRSUAPI_DS_REPLICA_GET_INFO2)] drsuapi_DsReplicaGetInfoRequest2 req2;
- } drsuapi_DsReplicaGetInfoRequest;
-
- typedef struct {
- [charset(UTF16),string] uint16 *naming_context_dn;
- [charset(UTF16),string] uint16 *source_dsa_obj_dn;
- [charset(UTF16),string] uint16 *source_dsa_address;
- [charset(UTF16),string] uint16 *transport_obj_dn;
- drsuapi_DsReplicaNeighbourFlags replica_flags;
- uint32 reserved;
- GUID naming_context_obj_guid;
- GUID source_dsa_obj_guid;
- GUID source_dsa_invocation_id;
- GUID transport_obj_guid;
- hyper tmp_highest_usn;
- hyper highest_usn;
- NTTIME last_success;
- NTTIME last_attempt;
- WERROR result_last_attempt;
- uint32 consecutive_sync_failures;
- } drsuapi_DsReplicaNeighbour;
-
- typedef struct {
- uint32 count;
- uint32 reserved;
- [size_is(count)] drsuapi_DsReplicaNeighbour array[];
- } drsuapi_DsReplicaNeighbourCtr;
-
- typedef struct {
- uint32 count;
- uint32 reserved;
- [size_is(count)] drsuapi_DsReplicaCursor array[];
- } drsuapi_DsReplicaCursorCtr;
-
- typedef struct {
- [charset(UTF16),string] uint16 *attribute_name;
- uint32 version;
- NTTIME originating_change_time;
- GUID originating_invocation_id;
- hyper originating_usn;
- hyper local_usn;
- } drsuapi_DsReplicaObjMetaData;
-
- typedef struct {
- uint32 count;
- uint32 reserved;
- [size_is(count)] drsuapi_DsReplicaObjMetaData array[];
- } drsuapi_DsReplicaObjMetaDataCtr;
-
- typedef struct {
- [charset(UTF16),string] uint16 *dsa_obj_dn;
- GUID dsa_obj_guid;
- NTTIME first_failure;
- uint32 num_failures;
- WERROR last_result;
- } drsuapi_DsReplicaKccDsaFailure;
-
- typedef struct {
- uint32 count;
- uint32 reserved;
- [size_is(count)] drsuapi_DsReplicaKccDsaFailure array[];
- } drsuapi_DsReplicaKccDsaFailuresCtr;
-
- typedef enum {
- DRSUAPI_DS_REPLICA_OP_TYPE_SYNC = 0,
- DRSUAPI_DS_REPLICA_OP_TYPE_ADD = 1,
- DRSUAPI_DS_REPLICA_OP_TYPE_DELETE = 2,
- DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY = 3,
- DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS = 4
- } drsuapi_DsReplicaOpType;
-
- typedef [switch_type(drsuapi_DsReplicaOpType)] union {
- [case(DRSUAPI_DS_REPLICA_OP_TYPE_SYNC)] drsuapi_DsReplicaSyncOptions sync;
- [case(DRSUAPI_DS_REPLICA_OP_TYPE_ADD)] drsuapi_DsReplicaAddOptions add;
- [case(DRSUAPI_DS_REPLICA_OP_TYPE_DELETE)] drsuapi_DsReplicaDeleteOptions op_delete;
- [case(DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY)] drsuapi_DsReplicaModifyOptions modify;
- [case(DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS)] drsuapi_DsReplicaUpdateRefsOptions update_refs;
- [default] uint32 unknown;
- } drsuapi_DsRplicaOpOptions;
-
- typedef struct {
- NTTIME operation_start;
- uint32 serial_num; /* unique till reboot */
- uint32 priority;
- drsuapi_DsReplicaOpType operation_type;
- [switch_is(operation_type)] drsuapi_DsRplicaOpOptions options;
- [charset(UTF16),string] uint16 *nc_dn;
- [charset(UTF16),string] uint16 *remote_dsa_obj_dn;
- [charset(UTF16),string] uint16 *remote_dsa_address;
- GUID nc_obj_guid;
- GUID remote_dsa_obj_guid;
- } drsuapi_DsReplicaOp;
-
- typedef struct {
- NTTIME time;
- uint32 count;
- [size_is(count)] drsuapi_DsReplicaOp array[];
- } drsuapi_DsReplicaOpCtr;
-
- typedef struct {
- [charset(UTF16),string] uint16 *attribute_name;
- [charset(UTF16),string] uint16 *object_dn;
- [value(ndr_size_DATA_BLOB(0,binary,0))] uint32 __ndr_size_binary;
- DATA_BLOB *binary;
- NTTIME deleted;
- NTTIME created;
- uint32 version;
- NTTIME originating_change_time;
- GUID originating_invocation_id;
- hyper originating_usn;
- hyper local_usn;
- } drsuapi_DsReplicaAttrValMetaData;
-
- typedef struct {
- uint32 count;
- int32 enumeration_context;
- [size_is(count)] drsuapi_DsReplicaAttrValMetaData array[];
- } drsuapi_DsReplicaAttrValMetaDataCtr;
-
- typedef struct {
- uint32 count;
- int32 enumeration_context;
- [size_is(count)] drsuapi_DsReplicaCursor2 array[];
- } drsuapi_DsReplicaCursor2Ctr;
-
- typedef struct {
- GUID source_dsa_invocation_id;
- hyper highest_usn;
- NTTIME last_sync_success;
- [charset(UTF16),string] uint16 *source_dsa_obj_dn;
- } drsuapi_DsReplicaCursor3;
-
- typedef struct {
- uint32 count;
- int32 enumeration_context;
- [size_is(count)] drsuapi_DsReplicaCursor3 array[];
- } drsuapi_DsReplicaCursor3Ctr;
-
- typedef struct {
- [charset(UTF16),string] uint16 *attribute_name;
- uint32 version;
- NTTIME originating_change_time;
- GUID originating_invocation_id;
- hyper originating_usn;
- hyper local_usn;
- [charset(UTF16),string] uint16 *originating_dsa_dn;
- } drsuapi_DsReplicaObjMetaData2;
-
- typedef struct {
- uint32 count;
- int32 enumeration_context;
- [size_is(count)] drsuapi_DsReplicaObjMetaData2 array[];
- } drsuapi_DsReplicaObjMetaData2Ctr;
-
- typedef struct {
- [charset(UTF16),string] uint16 *attribute_name;
- [charset(UTF16),string] uint16 *object_dn;
- [value(ndr_size_DATA_BLOB(0,binary,0))] uint32 __ndr_size_binary;
- DATA_BLOB *binary;
- NTTIME deleted;
- NTTIME created;
- uint32 version;
- NTTIME originating_change_time;
- GUID originating_invocation_id;
- hyper originating_usn;
- hyper local_usn;
- [charset(UTF16),string] uint16 *originating_dsa_dn;
- } drsuapi_DsReplicaAttrValMetaData2;
-
- typedef struct {
- uint32 count;
- int32 enumeration_context;
- [size_is(count)] drsuapi_DsReplicaAttrValMetaData2 array[];
- } drsuapi_DsReplicaAttrValMetaData2Ctr;
-
- typedef struct {
- hyper u1; /* session number? */
- uint32 u2;
- uint32 u3;
- GUID bind_guid;
- NTTIME_1sec bind_time;
- [flag(NDR_BIG_ENDIAN)] ipv4address client_ip_address;
- uint32 u5; /* this is the same value the client used as pid in the DsBindInfoX struct */
- } drsuapi_DsReplicaConnection04;
-
- typedef struct {
- [range(0,10000)] uint32 count;
- uint32 reserved;
- [size_is(count)] drsuapi_DsReplicaConnection04 array[];
- } drsuapi_DsReplicaConnection04Ctr;
-
- typedef struct {
- [charset(UTF16),string] uint16 *str1;
- uint32 u1;
- uint32 u2;
- uint32 u3;
- uint32 u4;
- uint32 u5;
- hyper u6;
- uint32 u7;
- } drsuapi_DsReplica06;
-
- typedef struct {
- [range(0,256)] uint32 count;
- uint32 reserved;
- [size_is(count)] drsuapi_DsReplica06 array[];
- } drsuapi_DsReplica06Ctr;
-
- typedef [switch_type(drsuapi_DsReplicaInfoType)] union {
- [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS)] drsuapi_DsReplicaNeighbourCtr *neighbours;
- [case(DRSUAPI_DS_REPLICA_INFO_CURSORS)] drsuapi_DsReplicaCursorCtr *cursors;
- [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA)] drsuapi_DsReplicaObjMetaDataCtr *objmetadata;
- [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES)] drsuapi_DsReplicaKccDsaFailuresCtr *connectfailures;
- [case(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES)] drsuapi_DsReplicaKccDsaFailuresCtr *linkfailures;
- [case(DRSUAPI_DS_REPLICA_INFO_PENDING_OPS)] drsuapi_DsReplicaOpCtr *pendingops;
- [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA)] drsuapi_DsReplicaAttrValMetaDataCtr *attrvalmetadata;
- [case(DRSUAPI_DS_REPLICA_INFO_CURSORS2)] drsuapi_DsReplicaCursor2Ctr *cursors2;
- [case(DRSUAPI_DS_REPLICA_INFO_CURSORS3)] drsuapi_DsReplicaCursor3Ctr *cursors3;
- [case(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2)] drsuapi_DsReplicaObjMetaData2Ctr *objmetadata2;
- [case(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2)] drsuapi_DsReplicaAttrValMetaData2Ctr *attrvalmetadata2;
- [case(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS02)] drsuapi_DsReplicaNeighbourCtr *neighbours02;
- [case(DRSUAPI_DS_REPLICA_INFO_CONNECTIONS04)] drsuapi_DsReplicaConnection04Ctr *connections04;
- [case(DRSUAPI_DS_REPLICA_INFO_CURSORS05)] drsuapi_DsReplicaCursorCtrEx *cursors05;
- [case(DRSUAPI_DS_REPLICA_INFO_06)] drsuapi_DsReplica06Ctr *i06;
- } drsuapi_DsReplicaInfo;
-
- WERROR drsuapi_DsReplicaGetInfo(
- [in] policy_handle *bind_handle,
- [in] drsuapi_DsReplicaGetInfoLevel level,
- [in,ref,switch_is(level)] drsuapi_DsReplicaGetInfoRequest *req,
- [out,ref] drsuapi_DsReplicaInfoType *info_type,
- [out,ref,switch_is(*info_type)] drsuapi_DsReplicaInfo *info
- );
-
- /*****************/
- /* Function 0x14 */
- [todo] WERROR DRSUAPI_ADD_SID_HISTORY();
-
- /*****************/
- /* Function 0x15 */
-
- typedef struct {
- [range(0,10000)] uint32 num_entries;
- [size_is(num_entries)] drsuapi_DsGetMembershipsCtr1 **ctrl_array;
- } drsuapi_DsGetMemberships2Ctr1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsGetMembershipsCtr1 ctr1;
- } drsuapi_DsGetMemberships2Ctr;
-
- typedef struct {
- [range(1,10000)] uint32 num_req;
- [size_is(num_req)] drsuapi_DsGetMembershipsRequest1 **req_array;
- } drsuapi_DsGetMemberships2Request1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_DsGetMemberships2Request1 req1;
- } drsuapi_DsGetMemberships2Request;
-
- WERROR drsuapi_DsGetMemberships2(
- [in] policy_handle *bind_handle,
- [in] int32 level,
- [in,ref] [switch_is(level)] drsuapi_DsGetMemberships2Request *req,
- [out,ref] int32 *level_out,
- [out,ref] [switch_is(*level_out)] drsuapi_DsGetMemberships2Ctr *ctr
- );
-
- /*****************/
- /* Function 0x16 */
- [todo] WERROR DRSUAPI_REPLICA_VERIFY_OBJECTS();
-
- /*****************/
- /* Function 0x17 */
- [todo] WERROR DRSUAPI_GET_OBJECT_EXISTENCE();
-
- /*****************/
- /* Function 0x18 */
- typedef struct {
- WERROR error_code;
- uint32 site_cost;
- } drsuapi_DsSiteCostInfo;
-
- typedef struct {
- [range(0,10000)] uint32 num_info;
- [size_is(num_info)] drsuapi_DsSiteCostInfo *info;
- uint32 unknown;
- } drsuapi_QuerySitesByCostCtr1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_QuerySitesByCostCtr1 ctr1;
- } drsuapi_QuerySitesByCostCtr;
-
- typedef struct {
- [charset(UTF16),string] uint16 *site_from;
- [range(1,10000)] uint32 num_req;
- [size_is(num_req)] [charset(UTF16),string] uint16 **site_to;
- uint32 flags;
- } drsuapi_QuerySitesByCostRequest1;
-
- typedef [switch_type(int32)] union {
- [case(1)] drsuapi_QuerySitesByCostRequest1 req1;
- } drsuapi_QuerySitesByCostRequest;
-
- WERROR drsuapi_QuerySitesByCost(
- [in] policy_handle *bind_handle,
- [in] int32 level,
- [in,ref] [switch_is(level)] drsuapi_QuerySitesByCostRequest *req,
- [out,ref] int32 *level_out,
- [out,ref] [switch_is(*level_out)] drsuapi_QuerySitesByCostCtr *ctr
- );
-}
diff --git a/source3/librpc/ndr/ndr_drsuapi.c b/source3/librpc/ndr/ndr_drsuapi.c
deleted file mode 100644
index 8bc44dcc36..0000000000
--- a/source3/librpc/ndr/ndr_drsuapi.c
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
-
- routines for printing some linked list structs in DRSUAPI
-
- Copyright (C) Stefan (metze) Metzmacher 2005
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include "includes.h"
-#include "librpc/gen_ndr/ndr_drsuapi.h"
-#include "librpc/gen_ndr/ndr_misc.h"
-#include "../lib/util/asn1.h"
-#include "librpc/ndr/ndr_compression.h"
-
-void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name,
- const struct drsuapi_DsReplicaObjectListItem *r)
-{
- ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectListItem");
- ndr->depth++;
- ndr_print_ptr(ndr, "next_object", r->next_object);
- ndr_print_drsuapi_DsReplicaObject(ndr, "object", &r->object);
- ndr->depth--;
- if (r->next_object) {
- ndr_print_drsuapi_DsReplicaObjectListItem(ndr, "next_object", r->next_object);
- }
-}
-
-void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectListItemEx *r)
-{
- ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectListItemEx");
- ndr->depth++;
- ndr_print_ptr(ndr, "next_object", r->next_object);
- ndr_print_drsuapi_DsReplicaObject(ndr, "object", &r->object);
- ndr_print_uint32(ndr, "is_nc_prefix", r->is_nc_prefix);
- ndr_print_ptr(ndr, "parent_object_guid", r->parent_object_guid);
- ndr->depth++;
- if (r->parent_object_guid) {
- ndr_print_GUID(ndr, "parent_object_guid", r->parent_object_guid);
- }
- ndr->depth--;
- ndr_print_ptr(ndr, "meta_data_ctr", r->meta_data_ctr);
- ndr->depth++;
- if (r->meta_data_ctr) {
- ndr_print_drsuapi_DsReplicaMetaDataCtr(ndr, "meta_data_ctr", r->meta_data_ctr);
- }
- ndr->depth--;
- ndr->depth--;
- if (r->next_object) {
- ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "next_object", r->next_object);
- }
-}
-
-#define _OID_PUSH_CHECK(call) do { \
- bool _status; \
- _status = call; \
- if (_status != true) { \
- return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT, "OID Conversion Error: %s\n", __location__); \
- } \
-} while (0)
-
-#define _OID_PULL_CHECK(call) do { \
- bool _status; \
- _status = call; \
- if (_status != true) { \
- return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "OID Conversion Error: %s\n", __location__); \
- } \
-} while (0)
-
-enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaOID_oid(r->oid, 0)));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->oid));
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->oid) {
- DATA_BLOB blob;
-
- if (StrnCaseCmp("ff", r->oid, 2) == 0) {
- blob = strhex_to_data_blob(NULL, r->oid);
- if (!blob.data) {
- return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT,
- "HEX String Conversion Error: %s\n",
- __location__);
- }
- } else {
- _OID_PUSH_CHECK(ber_write_OID_String(&blob, r->oid));
- }
- talloc_steal(ndr, blob.data);
-
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length));
- NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, blob.data, blob.length));
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r)
-{
- uint32_t _ptr_oid;
- TALLOC_CTX *_mem_save_oid_0;
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
- if (r->__ndr_size < 0 || r->__ndr_size > 10000) {
- return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
- }
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_oid));
- if (_ptr_oid) {
- NDR_PULL_ALLOC(ndr, r->oid);
- } else {
- r->oid = NULL;
- }
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->oid) {
- DATA_BLOB _oid_array;
- const char *_oid;
-
- _mem_save_oid_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, ndr, 0);
- NDR_CHECK(ndr_pull_array_size(ndr, &r->oid));
- _oid_array.length = ndr_get_array_size(ndr, &r->oid);
- NDR_PULL_ALLOC_N(ndr, _oid_array.data, _oid_array.length);
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, _oid_array.data, _oid_array.length));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_oid_0, 0);
-
- if (_oid_array.length && _oid_array.data[0] == 0xFF) {
- _oid = data_blob_hex_string(ndr, &_oid_array);
- NDR_ERR_HAVE_NO_MEMORY(_oid);
- } else {
- _OID_PULL_CHECK(ber_read_OID_String(ndr, _oid_array, &_oid));
- }
- data_blob_free(&_oid_array);
- talloc_steal(r->oid, _oid);
- r->oid = _oid;
- }
- if (r->oid) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->oid, r->__ndr_size));
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags)
-{
- DATA_BLOB _blob;
- size_t ret = 0;
-
- if (!oid) return 0;
-
- if (StrnCaseCmp("ff", oid, 2) == 0) {
- _blob = strhex_to_data_blob(NULL, oid);
- if (_blob.data) {
- ret = _blob.length;
- }
- } else {
- if (ber_write_OID_String(&_blob, oid)) {
- ret = _blob.length;
- }
- }
- data_blob_free(&_blob);
- return ret;
-}
-
-enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- uint32_t decompressed_length = 0;
- uint32_t compressed_length = 0;
- if (r->ts) {
- {
- struct ndr_push *_ndr_ts;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
- {
- struct ndr_push *_ndr_ts_compressed;
- NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
- NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
- decompressed_length = _ndr_ts_compressed->offset;
- NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
- }
- compressed_length = _ndr_ts->offset;
- talloc_free(_ndr_ts);
- }
- }
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, decompressed_length));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, compressed_length));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->ts));
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->ts) {
- {
- struct ndr_push *_ndr_ts;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
- {
- struct ndr_push *_ndr_ts_compressed;
- NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
- NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
- NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
- }
- NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ts, 4, -1));
- }
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- uint32_t decompressed_length = 0;
- uint32_t compressed_length = 0;
- if (r->ts) {
- {
- struct ndr_push *_ndr_ts;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
- {
- struct ndr_push *_ndr_ts_compressed;
- NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
- NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
- decompressed_length = _ndr_ts_compressed->offset;
- NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
- }
- compressed_length = _ndr_ts->offset;
- talloc_free(_ndr_ts);
- }
- }
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, decompressed_length));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, compressed_length));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->ts));
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->ts) {
- {
- struct ndr_push *_ndr_ts;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
- {
- struct ndr_push *_ndr_ts_compressed;
- NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
- NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
- NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
- }
- NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ts, 4, -1));
- }
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr1 *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- uint32_t decompressed_length = 0;
- uint32_t compressed_length = 0;
- if (r->ts) {
- {
- struct ndr_push *_ndr_ts;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
- {
- struct ndr_push *_ndr_ts_compressed;
- NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
- NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
- decompressed_length = _ndr_ts_compressed->offset;
- NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
- }
- compressed_length = _ndr_ts->offset;
- talloc_free(_ndr_ts);
- }
- }
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, decompressed_length));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, compressed_length));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->ts));
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->ts) {
- {
- struct ndr_push *_ndr_ts;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
- {
- struct ndr_push *_ndr_ts_compressed;
- NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
- NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
- NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
- }
- NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ts, 4, -1));
- }
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr6 *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- uint32_t decompressed_length = 0;
- uint32_t compressed_length = 0;
- if (r->ts) {
- {
- struct ndr_push *_ndr_ts;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
- {
- struct ndr_push *_ndr_ts_compressed;
- NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
- NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
- decompressed_length = _ndr_ts_compressed->offset;
- NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
- }
- compressed_length = _ndr_ts->offset;
- talloc_free(_ndr_ts);
- }
- }
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, decompressed_length));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, compressed_length));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->ts));
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->ts) {
- {
- struct ndr_push *_ndr_ts;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
- {
- struct ndr_push *_ndr_ts_compressed;
- NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
- NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
- NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
- }
- NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ts, 4, -1));
- }
- }
- }
- return NDR_ERR_SUCCESS;
-}
diff --git a/source3/librpc/ndr/ndr_drsuapi.h b/source3/librpc/ndr/ndr_drsuapi.h
deleted file mode 100644
index c663eadd7a..0000000000
--- a/source3/librpc/ndr/ndr_drsuapi.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- Unix SMB/CIFS implementation.
-
- routines for printing some linked list structs in DRSUAPI
-
- Copyright (C) Stefan (metze) Metzmacher 2005-2006
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _LIBRPC_NDR_NDR_DRSUAPI_H
-#define _LIBRPC_NDR_NDR_DRSUAPI_H
-
-void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name,
- const struct drsuapi_DsReplicaObjectListItem *r);
-
-void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name,
- const struct drsuapi_DsReplicaObjectListItemEx *r);
-
-enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r);
-enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r);
-size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags);
-
-#endif /* _LIBRPC_NDR_NDR_DRSUAPI_H */
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c
index 2f336f14e6..f0595695d2 100644
--- a/source3/libsmb/trusts_util.c
+++ b/source3/libsmb/trusts_util.c
@@ -33,13 +33,12 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *m
{
unsigned char new_trust_passwd_hash[16];
char *new_trust_passwd;
- char *str;
NTSTATUS nt_status;
/* Create a random machine account password */
- str = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
+ new_trust_passwd = generate_random_str(mem_ctx, DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
- if ((new_trust_passwd = talloc_strdup(mem_ctx, str)) == NULL) {
+ if (new_trust_passwd == NULL) {
DEBUG(0, ("talloc_strdup failed\n"));
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index c0e62eac19..1826fa88ed 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -280,7 +280,7 @@ static bool upgrade_to_version_3(void)
DEBUG(0,("upgrade_to_version_3: upgrading print tdb's to version 3\n"));
for (kbuf = tdb_firstkey(tdb_drivers); kbuf.dptr;
- newkey = tdb_nextkey(tdb_drivers, kbuf), safe_free(kbuf.dptr), kbuf=newkey) {
+ newkey = tdb_nextkey(tdb_drivers, kbuf), free(kbuf.dptr), kbuf=newkey) {
dbuf = tdb_fetch(tdb_drivers, kbuf);
@@ -807,7 +807,7 @@ int get_ntforms(nt_forms_struct **list)
for (kbuf = tdb_firstkey(tdb_forms);
kbuf.dptr;
- newkey = tdb_nextkey(tdb_forms, kbuf), safe_free(kbuf.dptr), kbuf=newkey)
+ newkey = tdb_nextkey(tdb_forms, kbuf), free(kbuf.dptr), kbuf=newkey)
{
if (strncmp((const char *)kbuf.dptr, FORMS_PREFIX, strlen(FORMS_PREFIX)) != 0)
continue;
@@ -1024,7 +1024,7 @@ int get_ntdrivers(fstring **list, const char *architecture, uint32 version)
for (kbuf = tdb_firstkey(tdb_drivers);
kbuf.dptr;
- newkey = tdb_nextkey(tdb_drivers, kbuf), safe_free(kbuf.dptr), kbuf=newkey) {
+ newkey = tdb_nextkey(tdb_drivers, kbuf), free(kbuf.dptr), kbuf=newkey) {
if (strncmp((const char *)kbuf.dptr, key, strlen(key)) != 0)
continue;
@@ -3123,8 +3123,7 @@ static void map_single_multi_sz_into_ctr(REGVAL_CTR *ctr, const char *val_name,
regval_ctr_delvalue(ctr, val_name);
regval_ctr_addvalue(ctr, val_name, REG_MULTI_SZ,
(char *) conv_strs, str_size);
- safe_free(conv_strs);
-
+ SAFE_FREE(conv_strs);
}
/****************************************************************************
diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c
index b9e5ad56ad..a6bf52a0a4 100644
--- a/source3/printing/pcap.c
+++ b/source3/printing/pcap.c
@@ -179,7 +179,7 @@ void pcap_cache_reload(void)
goto done;
}
- for (; (pcap_line = fgets_slash(NULL, 1024, pcap_file)) != NULL; safe_free(pcap_line)) {
+ for (; (pcap_line = fgets_slash(NULL, 1024, pcap_file)) != NULL; free(pcap_line)) {
char name[MAXPRINTERLEN+1];
char comment[62];
char *p, *q;
diff --git a/source3/printing/print_aix.c b/source3/printing/print_aix.c
index 57590cc39e..523be77f35 100644
--- a/source3/printing/print_aix.c
+++ b/source3/printing/print_aix.c
@@ -49,7 +49,7 @@ bool aix_cache_reload(void)
iEtat = 0;
/* scan qconfig file for searching <printername>: */
- for (;(line = fgets_slash(NULL, 1024, pfile)); safe_free(line)) {
+ for (;(line = fgets_slash(NULL, 1024, pfile)); free(line)) {
if (*line == '*' || *line == 0)
continue;
@@ -65,7 +65,7 @@ bool aix_cache_reload(void)
if (strcmp(p, "bsh") != 0) {
name = talloc_strdup(ctx, p);
if (!name) {
- safe_free(line);
+ SAFE_FREE(line);
x_fclose(pfile);
TALLOC_FREE(ctx);
return false;
@@ -85,7 +85,7 @@ bool aix_cache_reload(void)
/* probably a good printer ??? */
iEtat = 0;
if (!pcap_cache_add(name, NULL)) {
- safe_free(line);
+ SAFE_FREE(line);
x_fclose(pfile);
TALLOC_FREE(ctx);
return false;
@@ -100,7 +100,7 @@ bool aix_cache_reload(void)
/* it's a good virtual printer */
iEtat = 0;
if (!pcap_cache_add(name, NULL)) {
- safe_free(line);
+ SAFE_FREE(line);
x_fclose(pfile);
TALLOC_FREE(ctx);
return false;
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 9ccfaa7bcb..b7763cb1cf 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -747,7 +747,12 @@ void reply_tcon_and_X(struct smb_request *req)
SSVAL(req->outbuf, smb_vwv2, SMB_SUPPORT_SEARCH_BITS|
(lp_csc_policy(SNUM(conn)) << 2));
- init_dfsroot(conn, req->inbuf, req->outbuf);
+ if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) {
+ DEBUG(2,("Serving %s as a Dfs root\n",
+ lp_servicename(SNUM(conn)) ));
+ SSVAL(req->outbuf, smb_vwv2,
+ SMB_SHARE_IN_DFS | SVAL(req->outbuf, smb_vwv2));
+ }
}
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index f64ba8c05f..4e81263ee4 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -888,7 +888,7 @@ bool reload_services(bool test)
enum server_exit_reason { SERVER_EXIT_NORMAL, SERVER_EXIT_ABNORMAL };
static void exit_server_common(enum server_exit_reason how,
- const char *const reason) NORETURN_ATTRIBUTE;
+ const char *const reason) _NORETURN_;
static void exit_server_common(enum server_exit_reason how,
const char *const reason)
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 8e8dd7e767..5a2d535b30 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -480,7 +480,7 @@ static int ads_user_add(struct net_context *c, int argc, const char **argv)
asprintf(&upn, "%s@%s", argv[0], ads->config.realm);
status = ads_krb5_set_password(ads->auth.kdc_server, upn, argv[1],
ads->auth.time_offset);
- safe_free(upn);
+ SAFE_FREE(upn);
if (ADS_ERR_OK(status)) {
d_printf("User %s added\n", argv[0]);
rc = 0;
@@ -534,7 +534,7 @@ static int ads_user_info(struct net_context *c, int argc, const char **argv)
asprintf(&searchstring, "(sAMAccountName=%s)", escaped_user);
rc = ads_search(ads, &res, searchstring, attrs);
- safe_free(searchstring);
+ SAFE_FREE(searchstring);
if (!ADS_ERR_OK(rc)) {
d_fprintf(stderr, "ads_search: %s\n", ads_errstr(rc));
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c
index 5bc38f979f..2fe464a000 100644
--- a/source3/utils/net_rpc_join.c
+++ b/source3/utils/net_rpc_join.c
@@ -330,12 +330,8 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
/* Create a random machine account password */
- {
- char *str;
- str = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
- clear_trust_password = SMB_STRDUP(str);
- E_md4hash(clear_trust_password, md4_trust_password);
- }
+ clear_trust_password = generate_random_str(talloc_tos(), DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
+ E_md4hash(clear_trust_password, md4_trust_password);
/* Set password on machine account */
@@ -468,7 +464,7 @@ done:
cli_shutdown(cli);
- SAFE_FREE(clear_trust_password);
+ TALLOC_FREE(clear_trust_password);
return retval;
}
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index f4b305d4ab..ddd18a7b9f 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -2482,7 +2482,7 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
TALLOC_FREE( reg_ctr );
}
- safe_free(keylist);
+ SAFE_FREE(keylist);
/* close printer handles here */
if (got_hnd_src) {
diff --git a/source3/utils/nmblookup.c b/source3/utils/nmblookup.c
index c04b628b1b..45da3f1e88 100644
--- a/source3/utils/nmblookup.c
+++ b/source3/utils/nmblookup.c
@@ -219,7 +219,7 @@ static bool query_one(const char *lookup, unsigned int lookup_type)
}
}
- safe_free(ip_list);
+ free(ip_list);
return (ip_list != NULL);
}