diff options
-rw-r--r-- | docs-xml/smbdotconf/winbind/idmapbackend.xml | 4 | ||||
-rw-r--r-- | docs-xml/smbdotconf/winbind/idmapconfig.xml | 9 | ||||
-rw-r--r-- | source3/Makefile.in | 209 | ||||
-rw-r--r-- | source3/groupdb/mapping.c | 9 | ||||
-rw-r--r-- | source3/include/popt_common.h | 2 | ||||
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/lib/dbwrap.c | 25 | ||||
-rw-r--r-- | source3/lib/netapi/examples/user/user_dispinfo.c | 4 | ||||
-rw-r--r-- | source3/lib/popt_common.c | 6 | ||||
-rw-r--r-- | source3/libnet/libnet_dssync.c | 4 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/drsuapi.h | 126 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_drsuapi.c | 527 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_drsuapi.h | 6 | ||||
-rw-r--r-- | source3/librpc/idl/drsuapi.idl | 94 | ||||
-rw-r--r-- | source3/librpc/ndr/ndr_drsuapi.c | 2 | ||||
-rw-r--r-- | source3/libsmb/clirap2.c | 7 | ||||
-rw-r--r-- | source3/libsmb/libsmb_context.c | 19 | ||||
-rw-r--r-- | source3/modules/vfs_default.c | 8 | ||||
-rw-r--r-- | source3/param/loadparm.c | 9 | ||||
-rw-r--r-- | source3/registry/reg_backend_db.c | 4 | ||||
-rwxr-xr-x | source3/script/tests/test_testparm_s3.sh | 2 | ||||
-rw-r--r-- | source3/utils/testparm.c | 142 | ||||
-rw-r--r-- | source3/web/swat.c | 31 |
23 files changed, 824 insertions, 426 deletions
diff --git a/docs-xml/smbdotconf/winbind/idmapbackend.xml b/docs-xml/smbdotconf/winbind/idmapbackend.xml index 20e1115c5f..10c4cb30a4 100644 --- a/docs-xml/smbdotconf/winbind/idmapbackend.xml +++ b/docs-xml/smbdotconf/winbind/idmapbackend.xml @@ -8,9 +8,9 @@ The idmap backend provides a plugin interface for Winbind to use varying backends to store SID/uid/gid mapping tables. This option is mutually exclusive with the newer and more flexible - <smbconfoption name="idmap domains"/> parameter. The main difference + <smbconfoption name="idmap domains"/> parameter. The main difference between the "idmap backend" and the "idmap domains" - is that the former only allows on backend for all domains while the + is that the former only allows one backend for all domains while the latter supports configuring backends on a per domain basis. </para> diff --git a/docs-xml/smbdotconf/winbind/idmapconfig.xml b/docs-xml/smbdotconf/winbind/idmapconfig.xml index 63b0a907a8..08297d704c 100644 --- a/docs-xml/smbdotconf/winbind/idmapconfig.xml +++ b/docs-xml/smbdotconf/winbind/idmapconfig.xml @@ -7,9 +7,9 @@ <para> The idmap config prefix provides a means of managing each domain defined by the <smbconfoption name="idmap domains"/> option using Samba's - parameteric option support. The idmap config prefix should be + parametric option support. The idmap config prefix should be followed by the name of the domain, a colon, and a setting specific to - the chosen backend. There are three options available for all domains: + the chosen backend. There are three options available for all domains: </para> <variablelist> <varlistentry> @@ -45,9 +45,10 @@ The following example illustrates how to configure the <citerefentry> <refentrytitle>idmap_ad</refentrytitle><manvolnum>8</manvolnum></citerefentry> for the CORP domain and the <citerefentry><refentrytitle>idmap_tdb</refentrytitle> - <manvolnum>8</manvolnum></citerefentry> backend for all other domains. The - TRUSTEDDOMAINS string is simply a key used to reference the "idmap + <manvolnum>8</manvolnum></citerefentry> backend for all other domains. The + TRUSTEDDOMAINS string is simply an arbitrary key used to reference the "idmap config" settings and does not represent the actual name of a domain. + It is a catchall domain backend for any domain not explicitly listed. </para> <programlisting> diff --git a/source3/Makefile.in b/source3/Makefile.in index 828740c9da..cd70183711 100644 --- a/source3/Makefile.in +++ b/source3/Makefile.in @@ -65,7 +65,14 @@ LDAP_LIBS=@LDAP_LIBS@ NSCD_LIBS=@NSCD_LIBS@ UUID_LIBS=@UUID_LIBS@ WINBIND_LIBS=@WINBIND_LIBS@ +WINBIND_NSS_EXTRA_LIBS=@WINBIND_NSS_EXTRA_LIBS@ +WINBIND_NSS_PTHREAD=@WINBIND_NSS_PTHREAD@ +PAM_WINBIND_EXTRA_LIBS=@PAM_WINBIND_EXTRA_LIBS@ DNSSD_LIBS=@DNSSD_LIBS@ +POPT_LIBS=@POPTLIBS@ +LIBTALLOC_LIBS=@LIBTALLOC_LIBS@ +LIBTDB_LIBS=@LIBTDB_LIBS@ +LIBNETAPI_LIBS=@LIBNETAPI_LIBS@ INSTALLCMD=@INSTALL@ INSTALLLIBCMD_SH=@INSTALLLIBCMD_SH@ @@ -1279,258 +1286,258 @@ bin/smbd@EXEEXT@: $(BINARY_PREREQS) $(SMBD_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARE @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) \ $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \ $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) \ - @POPTLIBS@ @SMBD_LIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ \ - @WINBIND_LIBS@ + $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \ + $(WINBIND_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@ @POPTLIBS@ \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(POPT_LIBS) \ $(KRB5LIBS) $(LDAP_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) @POPTLIBS@ $(KRB5LIBS) \ - $(LDAP_LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) $(POPT_LIBS) $(KRB5LIBS) \ + $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_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) @POPTLIBS@ \ - $(KRB5LIBS) $(LDAP_LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ \ - @WINBIND_LIBS@ + $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \ + $(KRB5LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \ + $(WINBIND_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) @POPTLIBS@ \ + $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(DNSSD_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_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) \ - @POPTLIBS@ $(KRB5LIBS) $(UUID_LIBS) $(LDAP_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) bin/profiles@EXEEXT@: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(PROFILES_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \ - $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) 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) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/mount.cifs@EXEEXT@: $(BINARY_PREREQS) $(CIFS_MOUNT_OBJ) @BUILD_POPT@ @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(CIFS_MOUNT_OBJ) $(DYNEXP) $(LDFLAGS) @POPTLIBS@ + @$(CC) $(FLAGS) -o $@ $(CIFS_MOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(POPT_LIBS) bin/umount.cifs@EXEEXT@: $(BINARY_PREREQS) $(CIFS_UMOUNT_OBJ) @BUILD_POPT@ @echo Linking $@ - @$(CC) $(FLAGS) -o $@ $(CIFS_UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS) @POPTLIBS@ + @$(CC) $(FLAGS) -o $@ $(CIFS_UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS) $(POPT_LIBS) bin/cifs.spnego@EXEEXT@: $(BINARY_PREREQS) $(CIFS_SPNEGO_OBJ) $(LIBSMBCLIENT_OBJ1) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(CIFS_SPNEGO_OBJ) $(DYNEXP) $(LDFLAGS) \ -lkeyutils $(LIBS) $(LIBSMBCLIENT_OBJ1) $(KRB5LIBS) \ - $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBWBCLIENT_SHARED@ \ - @LIBTDB_LIBS@ + $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(WINBIND_LIBS) \ + $(LIBTDB_LIBS) bin/testparm@EXEEXT@: $(BINARY_PREREQS) $(TESTPARM_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ - $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/smbstatus@EXEEXT@: $(BINARY_PREREQS) $(STATUS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ - $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/smbcontrol@EXEEXT@: $(BINARY_PREREQS) $(SMBCONTROL_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) -DUSING_SMBCONTROL $(FLAGS) -o $@ \ $(SMBCONTROL_OBJ) $(DYNEXP) $(LDFLAGS) \ - $(LIBS) $(LDAP_LIBS) @LIBUNWIND_PTRACE@ @POPTLIBS@ \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LIBS) $(LDAP_LIBS) @LIBUNWIND_PTRACE@ $(POPT_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/smbtree@EXEEXT@: $(BINARY_PREREQS) $(SMBTREE_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) \ - $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_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) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(DYNEXP) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) bin/pdbedit@EXEEXT@: $(BINARY_PREREQS) $(PDBEDIT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(PDBEDIT_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ - @POPTLIBS@ $(PASSDB_LIBS) $(LDAP_LIBS) @LIBTALLOC_LIBS@ \ - @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(POPT_LIBS) $(PASSDB_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) \ + $(LIBTDB_LIBS) $(WINBIND_LIBS) bin/smbget@EXEEXT@: $(BINARY_PREREQS) $(SMBGET_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ - @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) bin/nmblookup@EXEEXT@: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ - @POPTLIBS@ $(LDAP_LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(POPT_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/smbtorture@EXEEXT@: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) \ - $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ \ - @LIBTDB_LIBS@ + $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) \ + $(LIBTDB_LIBS) bin/talloctort@EXEEXT@: $(BINARY_PREREQS) $(TALLOCTORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(TALLOCTORT_OBJ) $(LDFLAGS) \ - $(DYNEXP) $(LIBS) $(LDAP_LIBS) @POPTLIBS@ \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/replacetort@EXEEXT@: $(REPLACETORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(REPLACETORT_OBJ) $(LDFLAGS) \ - $(DYNEXP) $(LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ + $(DYNEXP) $(LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) bin/smbconftort@EXEEXT@: $(SMBCONFTORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(SMBCONFTORT_OBJ) $(LDFLAGS) \ - $(DYNEXP) $(LIBS) $(LDAP_LIBS) @POPTLIBS@ \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/masktest@EXEEXT@: $(BINARY_PREREQS) $(MASKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \ - $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@ \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_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) @POPTLIBS@ \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_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) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_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) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) bin/eventlogadm@EXEEXT@: $(BINARY_PREREQS) $(EVTLOGADM_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(EVTLOGADM_OBJ) $(DYNEXP) $(LDFLAGS) \ - $(LIBS) $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/sharesec@EXEEXT@: $(BINARY_PREREQS) $(SHARESEC_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(SHARESEC_OBJ) $(DYNEXP) $(LDFLAGS) \ - $(LIBS) $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/locktest@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \ - $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@ \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_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) @POPTLIBS@ \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_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) \ - @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @LIBWBCLIENT_SHARED@ + $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) bin/vfstest@EXEEXT@: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(VFSTEST_OBJ) $(LDFLAGS) $(TERMLDFLAGS) \ $(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \ - $(ACL_LIBS) $(LIBS) @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) \ - @SMBD_LIBS@ $(NSCD_LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ \ - @LIBWBCLIENT_SHARED@ + $(ACL_LIBS) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \ + @SMBD_LIBS@ $(NSCD_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \ + $(WINBIND_LIBS) bin/smbiconv@EXEEXT@: $(BINARY_PREREQS) $(SMBICONV_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(SMBICONV_OBJ) $(LDFLAGS) $(TERMLDFLAGS) \ - $(TERMLIBS) $(DYNEXP) $(LIBS) $(LDAP_LIBS) @POPTLIBS@ \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(TERMLIBS) $(DYNEXP) $(LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/log2pcap@EXEEXT@: $(BINARY_PREREQS) $(LOG2PCAP_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LOG2PCAP_OBJ) $(LDFLAGS) $(DYNEXP) \ - @POPTLIBS@ $(LIBS) @LIBTALLOC_LIBS@ + $(POPT_LIBS) $(LIBS) $(LIBTALLOC_LIBS) bin/locktest2@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST2_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) \ - $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@ \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/ndrdump@EXEEXT@: $(BINARY_PREREQS) $(NDRDUMP_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(NDRDUMP_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \ - @POPTLIBS@ @LDAP_LIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(POPT_LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/debug2html@EXEEXT@: $(BINARY_PREREQS) $(DEBUG2HTML_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) \ - $(LIBS) @LIBTALLOC_LIBS@ + $(LIBS) $(LIBTALLOC_LIBS) bin/smbfilter@EXEEXT@: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) \ - $(KRB5LIBS) $(LDAP_LIBS) @POPTLIBS@ \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/ldbedit: $(BINARY_PREREQS) $(LDBEDIT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LDBEDIT_OBJ) $(DYNEXP) $(LDFLAGS) \ - $(LIBS) @POPTLIBS@ $(LDAP_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) bin/ldbsearch: $(BINARY_PREREQS) $(LDBSEARCH_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LDBSEARCH_OBJ) $(DYNEXP) $(LDFLAGS) \ - $(LIBS) @POPTLIBS@ $(LDAP_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) bin/ldbadd: $(BINARY_PREREQS) $(LDBADD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LDBADD_OBJ) $(DYNEXP) $(LDFLAGS) \ - $(LIBS) @POPTLIBS@ $(LDAP_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) bin/ldbmodify: $(BINARY_PREREQS) $(LDBMODIFY_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LDBMODIFY_OBJ) $(DYNEXP) $(LDFLAGS) \ - $(LIBS) @POPTLIBS@ $(LDAP_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LDBDEL_OBJ) $(DYNEXP) $(LDFLAGS) \ - $(LIBS) @POPTLIBS@ $(LDAP_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(LIBS) $(POPT_LIBS) $(LDAP_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) ##################################################################### @@ -1705,7 +1712,7 @@ $(LIBWBCLIENT_SYMS): $(LIBWBCLIENT_HEADERS) $(LIBWBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) $(LIBWBCLIENT_SYMS) @LIBTALLOC_SHARED@ @echo Linking shared library $@ - @$(SHLD_DSO) @LIBTALLOC_LIBS@ $(LIBWBCLIENT_OBJ) \ + @$(SHLD_DSO) $(LIBTALLOC_LIBS) $(LIBWBCLIENT_OBJ) \ @SONAMEFLAG@`basename $@` $(LIBWBCLIENT_SHARED_TARGET): $(LIBWBCLIENT_SHARED_TARGET_SONAME) @@ -1766,7 +1773,7 @@ LIBADDNS_HEADERS=$(srcdir)/libaddns/addns.h $(LIBADDNS_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBADDNS_OBJ) @LIBTALLOC_SHARED@ @echo Linking shared library $@ @$(SHLD_DSO) $(LIBADDNS_OBJ) $(LIBS) \ - $(KRB5LIBS) $(UUID_LIBS) @LIBTALLOC_LIBS@ \ + $(KRB5LIBS) $(UUID_LIBS) $(LIBTALLOC_LIBS) \ @SONAMEFLAG@`basename $@` $(LIBADDNS_SHARED_TARGET): $(LIBADDNS_SHARED_TARGET_SONAME) @@ -1847,7 +1854,7 @@ $(LIBNETAPI_SYMS): $(LIBNETAPI_HEADERS) $(LIBNETAPI_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBNETAPI_OBJ) $(LIBNETAPI_SYMS) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking shared library $@ @$(SHLD_DSO) $(LIBNETAPI_OBJ) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @LIBWBCLIENT_SHARED@ $(LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(LIBS) \ $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS) \ @SONAMEFLAG@`basename $@` @@ -1909,7 +1916,7 @@ LIBSMBCLIENT_HEADERS=$(srcdir)/include/libsmbclient.h $(LIBSMBCLIENT_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking shared library $@ @$(SHLD_DSO) $(LIBSMBCLIENT_OBJ) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @LIBWBCLIENT_SHARED@ $(LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(LIBS) \ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ @SONAMEFLAG@`basename $@` @@ -1980,7 +1987,7 @@ LIBSMBSHAREMODES=bin/libsmbsharemodes.a @LIBSMBSHAREMODES_SHARED@ $(LIBSMBSHAREMODES_SHARED_TARGET_SONAME): $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking shared library $@ @$(SHLD_DSO) $(LIBSMBSHAREMODES_OBJ) \ - $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ \ + $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \ $(KRB5LIBS) $(LDAP_LIBS) \ @SONAMEFLAG@`basename $@` @@ -2034,7 +2041,7 @@ shlibs test_shlibs: @LIBSMBSHAREMODES_SHARED@ bin/libbigballofmud.@SHLIBEXT@: $(BINARY_PREREQS) $(LIBBIGBALLOFMUD_OBJ) @LIBTALLOC_SHARED@ @echo Linking shared library $@ @$(SHLD) $(LDSHFLAGS) -o $@ $(LIBBIGBALLOFMUD_OBJ) \ - $(LIBS) @LIBTALLOC_LIBS@ \ + $(LIBS) $(LIBTALLOC_LIBS) \ $(PASSDB_LIBS) $(IDMAP_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \ @SONAMEFLAG@`basename $@`.$(LIBBIGBALLOFMUD_MAJOR) ln -snf libbigballofmud.so bin/libbigballofmud.so.0 @@ -2115,26 +2122,26 @@ bin/librpc_echo.@SHLIBEXT@: $(BINARY_PREREQS) $(RPC_ECHO_OBJ) bin/winbindd@EXEEXT@: $(BINARY_PREREQS) $(WINBINDD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo "Linking $@" @$(CC) $(FLAGS) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \ - @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) \ - $(PASSDB_LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \ + $(PASSDB_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_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) @POPTLIBS@ \ + $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @LIBWBCLIENT_SHARED@ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) @WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ) @echo "Linking $@" @$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_OBJ) \ - @WINBIND_NSS_EXTRA_LIBS@ @WINBIND_NSS_PTHREAD@ \ + $(WINBIND_NSS_EXTRA_LIBS) $(WINBIND_NSS_PTHREAD) \ @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@ @WINBIND_WINS_NSS@: $(BINARY_PREREQS) $(WINBIND_WINS_NSS_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo "Linking $@" @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_WINS_NSS_OBJ) \ - $(LDAP_LIBS) $(KRB5LIBS) $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ \ + $(LDAP_LIBS) $(KRB5LIBS) $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \ @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@ bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OBJ) @@ -2145,7 +2152,7 @@ bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) $(WINBIND_KRB5_LOCATOR_OB bin/pam_winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) @echo "Linking shared library $@" @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_WINBIND_OBJ) -lpam @INIPARSERLIBS@ \ - @PAM_WINBIND_EXTRA_LIBS@ @SONAMEFLAG@`basename $@` + $(PAM_WINBIND_EXTRA_LIBS) @SONAMEFLAG@`basename $@` bin/builtin.@SHLIBEXT@: $(BINARY_PREREQS) $(AUTH_BUILTIN_OBJ) @echo "Building plugin $@" @@ -2379,53 +2386,53 @@ bin/scripts.@SHLIBEXT@: $(BINARY_PREREQS) libgpo/gpext/scripts.o bin/wbinfo@EXEEXT@: $(BINARY_PREREQS) $(WBINFO_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(WBINFO_OBJ) $(DYNEXP) $(LIBS) \ - $(LDAP_LIBS) @POPTLIBS@ @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ \ - @WINBIND_LIBS@ + $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \ + $(WINBIND_LIBS) bin/ntlm_auth@EXEEXT@: $(BINARY_PREREQS) $(NTLM_AUTH_OBJ) $(PARAM_OBJ) \ $(LIB_NONSMBD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(DYNEXP) $(NTLM_AUTH_OBJ) \ $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(LIBS) \ - @POPTLIBS@ $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) bin/pam_smbpass.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_SMBPASS_OBJ) @LIBTALLOC_SHARED@ @LIBWBCLIENT_SHARED@ @LIBTDB_SHARED@ @echo "Linking shared library $@" @$(SHLD) $(LDSHFLAGS) -o $@ $(PAM_SMBPASS_OBJ) -lpam $(DYNEXP) \ $(LIBS) $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS) \ - @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ @WINBIND_LIBS@ + $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) bin/tdbbackup@EXEEXT@: $(BINARY_PREREQS) $(TDBBACKUP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(TDBBACKUP_OBJ) $(DYNEXP) \ - $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/tdbtool@EXEEXT@: $(BINARY_PREREQS) $(TDBTOOL_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(TDBTOOL_OBJ) $(DYNEXP) \ - $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/tdbdump@EXEEXT@: $(BINARY_PREREQS) $(TDBDUMP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(TDBDUMP_OBJ) $(DYNEXP) \ - $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/tdbtorture@EXEEXT@: $(BINARY_PREREQS) $(TDBTORTURE_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(TDBTORTURE_OBJ) $(DYNEXP) \ - $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_LIBS@ + $(LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) bin/t_strcmp@EXEEXT@: $(BINARY_PREREQS) @LIBTALLOC_SHARED@ bin/libbigballofmud.@SHLIBEXT@ torture/t_strcmp.o - $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) @LIBTALLOC_LIBS@ \ + $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \ torture/t_strcmp.o -L ./bin -lbigballofmud bin/t_strstr@EXEEXT@: $(BINARY_PREREQS) @LIBTALLOC_SHARED@ bin/libbigballofmud.@SHLIBEXT@ torture/t_strstr.o - $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) @LIBTALLOC_LIBS@ \ + $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \ torture/t_strstr.o -L ./bin -lbigballofmud bin/t_strappend@EXEEXT@: $(BINARY_PREREQS) @LIBTALLOC_SHARED@ bin/libbigballofmud.@SHLIBEXT@ torture/t_strappend.o - $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) @LIBTALLOC_LIBS@ \ + $(CC) $(FLAGS) -o $@ $(DYNEXP) $(LIBS) $(LIBTALLOC_LIBS) \ torture/t_strappend.o -L ./bin -lbigballofmud bin/t_stringoverflow@EXEEXT@: $(BINARY_PREREQS) bin/libbigballofmud.@SHLIBEXT@ torture/t_stringoverflow.o @@ -2439,7 +2446,7 @@ bin/timelimit@EXEEXT@: script/tests/timelimit.o bin/rpc_open_tcp@EXEEXT@: $(BINARY_PREREQS) $(RPC_OPEN_TCP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @echo "Linking $@" @$(CC) $(FLAGS) -o $@ $(RPC_OPEN_TCP_OBJ) $(LDFLAGS) $(DYNEXP) \ - $(LIBS) @LIBTALLOC_LIBS@ @LIBTDB_SHARED@ @WINBIND_LIBS@ \ + $(LIBS) $(LIBTALLOC_LIBS) @LIBTDB_SHARED@ $(WINBIND_LIBS) \ $(LDAP_LIBS) $(KRB5LIBS) $(NSCD_LIBS) install:: installservers installbin @INSTALL_CIFSMOUNT@ @INSTALL_CIFSSPNEGO@ installman \ diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c index ce66bfa64f..b952cda523 100644 --- a/source3/groupdb/mapping.c +++ b/source3/groupdb/mapping.c @@ -297,9 +297,12 @@ int smb_set_primary_group(const char *unix_group, const char* unix_user) return -1; } add_script = talloc_all_string_sub(ctx, - add_script, - "%g", - unix_group); + add_script, "%g", unix_group); + if (!add_script) { + return -1; + } + add_script = talloc_string_sub(ctx, + add_script, "%u", unix_user); if (!add_script) { return -1; } diff --git a/source3/include/popt_common.h b/source3/include/popt_common.h index c889d2e6e6..bbd013a18f 100644 --- a/source3/include/popt_common.h +++ b/source3/include/popt_common.h @@ -28,6 +28,7 @@ extern struct poptOption popt_common_connection[]; extern struct poptOption popt_common_configfile[]; extern struct poptOption popt_common_version[]; extern struct poptOption popt_common_credentials[]; +extern struct poptOption popt_common_debuglevel[]; extern const struct poptOption popt_common_dynconfig[]; #ifndef POPT_TABLEEND @@ -42,6 +43,7 @@ extern const struct poptOption popt_common_dynconfig[]; #define POPT_COMMON_DYNCONFIG { NULL, 0, POPT_ARG_INCLUDE_TABLE, \ CONST_DISCARD(poptOption *, popt_common_dynconfig), 0, \ "Build-time configuration overrides:", NULL }, +#define POPT_COMMON_DEBUGLEVEL { NULL, 0, POPT_ARG_INCLUDE_TABLE, popt_common_debuglevel, 0, "Common samba debugging:", NULL }, struct user_auth_info { char *username; diff --git a/source3/include/proto.h b/source3/include/proto.h index 9958c91dca..f7f0836c8f 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -6166,7 +6166,6 @@ bool lp_load_with_registry_shares(const char *pszFname, bool save_defaults, bool add_ipc, bool initialize_globals); -void lp_resetnumservices(void); int lp_numservices(void); void lp_dump(FILE *f, bool show_defaults, int maxtoprint); void lp_dump_one(FILE * f, bool show_defaults, int snum); diff --git a/source3/lib/dbwrap.c b/source3/lib/dbwrap.c index 7fe1631bff..eec15a84bd 100644 --- a/source3/lib/dbwrap.c +++ b/source3/lib/dbwrap.c @@ -60,8 +60,15 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx, sockname = CTDB_PATH; } - if (lp_clustering() && socket_exist(sockname)) { + if (lp_clustering()) { const char *partname; + + if (!socket_exist(sockname)) { + DEBUG(1, ("ctdb socket does not exist - is ctdb not " + "running?\n")); + return NULL; + } + /* ctdb only wants the file part of the name */ partname = strrchr(name, '/'); if (partname) { @@ -76,8 +83,7 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx, if (result == NULL) { DEBUG(0,("failed to attach to ctdb %s\n", partname)); - smb_panic("failed to attach to a ctdb " - "database"); + return NULL; } } } @@ -112,7 +118,7 @@ struct db_context *db_open_trans(TALLOC_CTX *mem_ctx, if (tdb_flags & TDB_CLEAR_IF_FIRST) { DEBUG(0,("db_open_trans: called with TDB_CLEAR_IF_FIRST: %s\n", name)); - smb_panic("db_open_trans: called with TDB_CLEAR_IF_FIRST"); + return NULL; } #ifdef CLUSTER_SUPPORT @@ -120,8 +126,15 @@ struct db_context *db_open_trans(TALLOC_CTX *mem_ctx, sockname = CTDB_PATH; } - if (lp_clustering() && socket_exist(sockname)) { + if (lp_clustering()) { const char *partname; + + if (!socket_exist(sockname)) { + DEBUG(1, ("ctdb socket does not exist - is ctdb not " + "running?\n")); + return NULL; + } + /* ctdb only wants the file part of the name */ partname = strrchr(name, '/'); if (partname) { @@ -137,8 +150,6 @@ struct db_context *db_open_trans(TALLOC_CTX *mem_ctx, if (result == NULL) { DEBUG(0,("failed to attach to ctdb %s\n", partname)); - smb_panic("failed to attach to a ctdb " - "database"); } return result; } diff --git a/source3/lib/netapi/examples/user/user_dispinfo.c b/source3/lib/netapi/examples/user/user_dispinfo.c index 9f862505aa..23024fe9fe 100644 --- a/source3/lib/netapi/examples/user/user_dispinfo.c +++ b/source3/lib/netapi/examples/user/user_dispinfo.c @@ -78,11 +78,13 @@ int main(int argc, const char **argv) if (status == 0 || status == ERROR_MORE_DATA) { user = (struct NET_DISPLAY_USER *)buffer; for (i=0; i<entries_read; i++) { - printf("user %d: %s\n", i, user->usri1_name); + printf("user %d: %s\n", i + idx, + user->usri1_name); user++; } NetApiBufferFree(buffer); } + idx += entries_read; } while (status == ERROR_MORE_DATA); if (status != 0) { diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c index 25e41ab5f3..b151f22742 100644 --- a/source3/lib/popt_common.c +++ b/source3/lib/popt_common.c @@ -171,6 +171,12 @@ struct poptOption popt_common_version[] = { POPT_TABLEEND }; +struct poptOption popt_common_debuglevel[] = { + { NULL, 0, POPT_ARG_CALLBACK, (void *)popt_common_callback }, + { "debuglevel", 'd', POPT_ARG_STRING, NULL, 'd', "Set debug level", "DEBUGLEVEL" }, + POPT_TABLEEND +}; + /* Handle command line options: * --sbindir diff --git a/source3/libnet/libnet_dssync.c b/source3/libnet/libnet_dssync.c index 87d5e8aade..a251e418f9 100644 --- a/source3/libnet/libnet_dssync.c +++ b/source3/libnet/libnet_dssync.c @@ -418,7 +418,7 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx, &ctx->session_key, ctr1->first_object); - if (ctr1->new_highwatermark.tmp_highest_usn > ctr1->new_highwatermark.highest_usn) { + if (ctr1->more_data) { req.req5.highwatermark = ctr1->new_highwatermark; last_query = false; } @@ -461,7 +461,7 @@ static NTSTATUS libnet_dssync_process(TALLOC_CTX *mem_ctx, &ctx->session_key, ctr6->first_object); - if (ctr6->new_highwatermark.tmp_highest_usn > ctr6->new_highwatermark.highest_usn) { + if (ctr6->more_data) { req.req8.highwatermark = ctr6->new_highwatermark; last_query = false; } diff --git a/source3/librpc/gen_ndr/drsuapi.h b/source3/librpc/gen_ndr/drsuapi.h index 0f810071b3..7b2acf001b 100644 --- a/source3/librpc/gen_ndr/drsuapi.h +++ b/source3/librpc/gen_ndr/drsuapi.h @@ -135,10 +135,10 @@ struct drsuapi_DsReplicaCursor { }/* [public] */; struct drsuapi_DsReplicaCursorCtrEx { - uint32_t u1; - uint32_t u2; + uint32_t version;/* [value] */ + uint32_t reserved1;/* [value(0)] */ uint32_t count;/* [range(0,0x100000)] */ - uint32_t u3; + uint32_t reserved2;/* [value(0)] */ struct drsuapi_DsReplicaCursor *cursors;/* [size_is(count)] */ }; @@ -159,6 +159,74 @@ struct drsuapi_DsReplicaCursorCtrEx { #define DRSUAPI_DS_REPLICA_NEIGHBOUR_NO_CHANGE_NOTIFICATIONS ( 0x20000000 ) #define DRSUAPI_DS_REPLICA_NEIGHBOUR_PARTIAL_ATTRIBUTE_SET ( 0x40000000 ) +enum drsuapi_DsExtendedOperation +#ifndef USE_UINT_ENUMS + { + 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 +} +#else + { __donnot_use_enum_drsuapi_DsExtendedOperation=0x7FFFFFFF} +#define DRSUAPI_EXOP_NONE ( 0x00000000 ) +#define DRSUAPI_EXOP_FSMO_REQ_ROLE ( 0x00000001 ) +#define DRSUAPI_EXOP_FSMO_RID_ALLOC ( 0x00000002 ) +#define DRSUAPI_EXOP_FSMO_RID_REQ_ROLE ( 0x00000003 ) +#define DRSUAPI_EXOP_FSMO_REQ_PDC ( 0x00000004 ) +#define DRSUAPI_EXOP_FSMO_ABANDON_ROLE ( 0x00000005 ) +#define DRSUAPI_EXOP_REPL_OBJ ( 0x00000006 ) +#define DRSUAPI_EXOP_REPL_SECRET ( 0x00000007 ) +#endif +; + +enum drsuapi_DsExtendedError +#ifndef USE_UINT_ENUMS + { + 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 +} +#else + { __donnot_use_enum_drsuapi_DsExtendedError=0x7FFFFFFF} +#define DRSUAPI_EXOP_ERR_NONE ( 0x00000000 ) +#define DRSUAPI_EXOP_ERR_SUCCESS ( 0x00000001 ) +#define DRSUAPI_EXOP_ERR_UNKNOWN_OP ( 0x00000002 ) +#define DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER ( 0x00000003 ) +#define DRSUAPI_EXOP_ERR_UPDATE_ERR ( 0x00000004 ) +#define DRSUAPI_EXOP_ERR_EXCEPTION ( 0x00000005 ) +#define DRSUAPI_EXOP_ERR_UNKNOWN_CALLER ( 0x00000006 ) +#define DRSUAPI_EXOP_ERR_RID_ALLOC ( 0x00000007 ) +#define DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED ( 0x00000008 ) +#define DRSUAPI_EXOP_ERR_FMSO_PENDING_OP ( 0x00000009 ) +#define DRSUAPI_EXOP_ERR_MISMATCH ( 0x0000000A ) +#define DRSUAPI_EXOP_ERR_COULDNT_CONTACT ( 0x0000000B ) +#define DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES ( 0x0000000C ) +#define DRSUAPI_EXOP_ERR_DIR_ERROR ( 0x0000000D ) +#define DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS ( 0x0000000E ) +#define DRSUAPI_EXOP_ERR_ACCESS_DENIED ( 0x0000000F ) +#define DRSUAPI_EXOP_ERR_PARAM_ERROR ( 0x00000010 ) +#endif +; + struct drsuapi_DsGetNCChangesRequest5 { struct GUID destination_dsa_guid; struct GUID source_dsa_invocation_id; @@ -168,8 +236,8 @@ struct drsuapi_DsGetNCChangesRequest5 { uint32_t replica_flags; uint32_t max_object_count; uint32_t max_ndr_size; - uint32_t unknown4; - uint64_t h1; + enum drsuapi_DsExtendedOperation extended_op; + uint64_t fsmo_info; }; struct drsuapi_DsReplicaOID { @@ -333,6 +401,13 @@ enum drsuapi_DsAttributeId #endif ; +struct drsuapi_DsPartialAttributeSet { + uint32_t version;/* [value] */ + uint32_t reserved1;/* [value(0)] */ + uint32_t num_attids;/* [range(1,0x100000)] */ + enum drsuapi_DsAttributeId *attids;/* [size_is(num_attids)] */ +}; + struct drsuapi_DsGetNCChangesRequest8 { struct GUID destination_dsa_guid; struct GUID source_dsa_invocation_id; @@ -342,10 +417,10 @@ struct drsuapi_DsGetNCChangesRequest8 { uint32_t replica_flags; uint32_t max_object_count; uint32_t max_ndr_size; - uint32_t unknown4; - uint64_t h1; - uint32_t unique_ptr1; - uint32_t unique_ptr2; + enum drsuapi_DsExtendedOperation extended_op; + uint64_t fsmo_info; + struct drsuapi_DsPartialAttributeSet *partial_attribute_set;/* [unique] */ + struct drsuapi_DsPartialAttributeSet *partial_attribute_set_ex;/* [unique] */ struct drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr; }; @@ -361,10 +436,10 @@ struct drsuapi_DsReplicaCursor2 { }/* [public] */; struct drsuapi_DsReplicaCursor2CtrEx { - uint32_t u1; - uint32_t u2; + uint32_t version;/* [value(2)] */ + uint32_t reserved1;/* [value(0)] */ uint32_t count;/* [range(0,0x100000)] */ - uint32_t u3; + uint32_t reserved2;/* [value(0)] */ struct drsuapi_DsReplicaCursor2 *cursors;/* [size_is(count)] */ }; @@ -408,9 +483,14 @@ struct drsuapi_DsReplicaAttributeCtr { struct drsuapi_DsReplicaAttribute *attributes;/* [unique,size_is(num_attributes)] */ }; +/* bitmap drsuapi_DsReplicaObjectFlags */ +#define DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER ( 0x00000001 ) +#define DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC ( 0x00000002 ) +#define DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY ( 0x00010000 ) + struct drsuapi_DsReplicaObject { struct drsuapi_DsReplicaObjectIdentifier *identifier;/* [unique] */ - uint32_t unknown1; + uint32_t flags; struct drsuapi_DsReplicaAttributeCtr attribute_ctr; }/* [public] */; @@ -429,7 +509,7 @@ struct drsuapi_DsReplicaMetaDataCtr { struct drsuapi_DsReplicaObjectListItemEx { struct drsuapi_DsReplicaObjectListItemEx *next_object;/* [unique] */ struct drsuapi_DsReplicaObject object; - uint32_t unknown1; + uint32_t is_nc_prefix; struct GUID *parent_object_guid;/* [unique] */ struct drsuapi_DsReplicaMetaDataCtr *meta_data_ctr;/* [unique] */ }/* [noprint,public] */; @@ -442,11 +522,11 @@ struct drsuapi_DsGetNCChangesCtr1 { struct drsuapi_DsReplicaHighWaterMark new_highwatermark; struct drsuapi_DsReplicaCursorCtrEx *uptodateness_vector;/* [unique] */ struct drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr; - uint32_t total_object_count; + enum drsuapi_DsExtendedError extended_ret; uint32_t object_count; uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsGetNCChangesCtr1(r,ndr->flags)+55)] */ struct drsuapi_DsReplicaObjectListItemEx *first_object;/* [unique] */ - uint32_t unknown4; + uint32_t more_data; }/* [gensize,public] */; /* bitmap drsuapi_DsLinkedAttributeFlags */ @@ -469,16 +549,16 @@ struct drsuapi_DsGetNCChangesCtr6 { struct drsuapi_DsReplicaHighWaterMark new_highwatermark; struct drsuapi_DsReplicaCursor2CtrEx *uptodateness_vector;/* [unique] */ struct drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr; - uint32_t total_object_count; + enum drsuapi_DsExtendedError extended_ret; uint32_t object_count; uint32_t __ndr_size;/* [value(ndr_size_drsuapi_DsGetNCChangesCtr6(r,ndr->flags)+55)] */ struct drsuapi_DsReplicaObjectListItemEx *first_object;/* [unique] */ - uint32_t unknown4; - uint32_t unknown5; - uint32_t unknown6; + uint32_t more_data; + uint32_t nc_object_count; + uint32_t nc_linked_attributes_count; uint32_t linked_attributes_count;/* [range(0,1048576)] */ struct drsuapi_DsReplicaLinkedAttribute *linked_attributes;/* [unique,size_is(linked_attributes_count)] */ - uint32_t unknown7; + WERROR drs_error; }/* [gensize,public] */; struct drsuapi_DsGetNCChangesMSZIPCtr1 { @@ -496,13 +576,13 @@ struct drsuapi_DsGetNCChangesMSZIPCtr6 { struct drsuapi_DsGetNCChangesXPRESSCtr1 { uint32_t decompressed_length; uint32_t compressed_length; - DATA_BLOB *decompressed;/* [unique,compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4),flag(LIBNDR_FLAG_REMAINING)] */ + struct drsuapi_DsGetNCChangesCtr1 *ctr1;/* [unique,compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */ }; struct drsuapi_DsGetNCChangesXPRESSCtr6 { uint32_t decompressed_length; uint32_t compressed_length; - DATA_BLOB *decompressed;/* [unique,compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4),flag(LIBNDR_FLAG_REMAINING)] */ + struct drsuapi_DsGetNCChangesCtr6 *ctr6;/* [unique,compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length),subcontext_size(compressed_length),subcontext(4)] */ }; enum drsuapi_DsGetNCChangesCompressionType diff --git a/source3/librpc/gen_ndr/ndr_drsuapi.c b/source3/librpc/gen_ndr/ndr_drsuapi.c index 657055fcd4..105ed84b4e 100644 --- a/source3/librpc/gen_ndr/ndr_drsuapi.c +++ b/source3/librpc/gen_ndr/ndr_drsuapi.c @@ -692,10 +692,10 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursorCtrEx(struct ndr_push * if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_align(ndr, 8)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u1)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0])); } @@ -712,13 +712,13 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursorCtrEx(struct ndr_pull * if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_array_size(ndr, &r->cursors)); NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u1)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); if (r->count < 0 || r->count > 0x100000) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2)); NDR_PULL_ALLOC_N(ndr, r->cursors, ndr_get_array_size(ndr, &r->cursors)); _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0); @@ -740,10 +740,10 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursorCtrEx(struct ndr_print *ndr, cons uint32_t cntr_cursors_0; ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursorCtrEx"); ndr->depth++; - ndr_print_uint32(ndr, "u1", r->u1); - ndr_print_uint32(ndr, "u2", r->u2); + ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->version); + ndr_print_uint32(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1); ndr_print_uint32(ndr, "count", r->count); - ndr_print_uint32(ndr, "u3", r->u3); + ndr_print_uint32(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2); ndr->print(ndr, "%s: ARRAY(%d)", "cursors", r->count); ndr->depth++; for (cntr_cursors_0=0;cntr_cursors_0<r->count;cntr_cursors_0++) { @@ -793,6 +793,107 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaNeighbourFlags(struct ndr_print *ndr, c ndr->depth--; } +static enum ndr_err_code ndr_push_drsuapi_DsExtendedOperation(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsExtendedOperation r) +{ + { + uint32_t _flags_save_ENUM = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + ndr->flags = _flags_save_ENUM; + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsExtendedOperation(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsExtendedOperation *r) +{ + uint32_t v; + { + uint32_t _flags_save_ENUM = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + ndr->flags = _flags_save_ENUM; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_DsExtendedOperation(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedOperation r) +{ + const char *val = NULL; + + { + uint32_t _flags_save_ENUM = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + switch (r) { + case DRSUAPI_EXOP_NONE: val = "DRSUAPI_EXOP_NONE"; break; + case DRSUAPI_EXOP_FSMO_REQ_ROLE: val = "DRSUAPI_EXOP_FSMO_REQ_ROLE"; break; + case DRSUAPI_EXOP_FSMO_RID_ALLOC: val = "DRSUAPI_EXOP_FSMO_RID_ALLOC"; break; + case DRSUAPI_EXOP_FSMO_RID_REQ_ROLE: val = "DRSUAPI_EXOP_FSMO_RID_REQ_ROLE"; break; + case DRSUAPI_EXOP_FSMO_REQ_PDC: val = "DRSUAPI_EXOP_FSMO_REQ_PDC"; break; + case DRSUAPI_EXOP_FSMO_ABANDON_ROLE: val = "DRSUAPI_EXOP_FSMO_ABANDON_ROLE"; break; + case DRSUAPI_EXOP_REPL_OBJ: val = "DRSUAPI_EXOP_REPL_OBJ"; break; + case DRSUAPI_EXOP_REPL_SECRET: val = "DRSUAPI_EXOP_REPL_SECRET"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); + ndr->flags = _flags_save_ENUM; + } +} + +static enum ndr_err_code ndr_push_drsuapi_DsExtendedError(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsExtendedError r) +{ + { + uint32_t _flags_save_ENUM = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + ndr->flags = _flags_save_ENUM; + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsExtendedError(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsExtendedError *r) +{ + uint32_t v; + { + uint32_t _flags_save_ENUM = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + ndr->flags = _flags_save_ENUM; + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_DsExtendedError(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedError r) +{ + const char *val = NULL; + + { + uint32_t _flags_save_ENUM = ndr->flags; + ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX); + switch (r) { + case DRSUAPI_EXOP_ERR_NONE: val = "DRSUAPI_EXOP_ERR_NONE"; break; + case DRSUAPI_EXOP_ERR_SUCCESS: val = "DRSUAPI_EXOP_ERR_SUCCESS"; break; + case DRSUAPI_EXOP_ERR_UNKNOWN_OP: val = "DRSUAPI_EXOP_ERR_UNKNOWN_OP"; break; + case DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER: val = "DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER"; break; + case DRSUAPI_EXOP_ERR_UPDATE_ERR: val = "DRSUAPI_EXOP_ERR_UPDATE_ERR"; break; + case DRSUAPI_EXOP_ERR_EXCEPTION: val = "DRSUAPI_EXOP_ERR_EXCEPTION"; break; + case DRSUAPI_EXOP_ERR_UNKNOWN_CALLER: val = "DRSUAPI_EXOP_ERR_UNKNOWN_CALLER"; break; + case DRSUAPI_EXOP_ERR_RID_ALLOC: val = "DRSUAPI_EXOP_ERR_RID_ALLOC"; break; + case DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED: val = "DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED"; break; + case DRSUAPI_EXOP_ERR_FMSO_PENDING_OP: val = "DRSUAPI_EXOP_ERR_FMSO_PENDING_OP"; break; + case DRSUAPI_EXOP_ERR_MISMATCH: val = "DRSUAPI_EXOP_ERR_MISMATCH"; break; + case DRSUAPI_EXOP_ERR_COULDNT_CONTACT: val = "DRSUAPI_EXOP_ERR_COULDNT_CONTACT"; break; + case DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES: val = "DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES"; break; + case DRSUAPI_EXOP_ERR_DIR_ERROR: val = "DRSUAPI_EXOP_ERR_DIR_ERROR"; break; + case DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS: val = "DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS"; break; + case DRSUAPI_EXOP_ERR_ACCESS_DENIED: val = "DRSUAPI_EXOP_ERR_ACCESS_DENIED"; break; + case DRSUAPI_EXOP_ERR_PARAM_ERROR: val = "DRSUAPI_EXOP_ERR_PARAM_ERROR"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); + ndr->flags = _flags_save_ENUM; + } +} + static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest5(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesRequest5 *r) { if (ndr_flags & NDR_SCALARS) { @@ -808,8 +909,8 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest5(struct ndr_push NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, r->replica_flags)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_object_count)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_ndr_size)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4)); - NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->h1)); + NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, r->extended_op)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->fsmo_info)); } if (ndr_flags & NDR_BUFFERS) { NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectIdentifier(ndr, NDR_SCALARS|NDR_BUFFERS, r->naming_context)); @@ -846,8 +947,8 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest5(struct ndr_pull NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, &r->replica_flags)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_object_count)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_ndr_size)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4)); - NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->h1)); + NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, &r->extended_op)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->fsmo_info)); } if (ndr_flags & NDR_BUFFERS) { _mem_save_naming_context_0 = NDR_PULL_GET_MEM_CTX(ndr); @@ -884,8 +985,8 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest5(struct ndr_print *ndr, co ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr, "replica_flags", r->replica_flags); ndr_print_uint32(ndr, "max_object_count", r->max_object_count); ndr_print_uint32(ndr, "max_ndr_size", r->max_ndr_size); - ndr_print_uint32(ndr, "unknown4", r->unknown4); - ndr_print_hyper(ndr, "h1", r->h1); + ndr_print_drsuapi_DsExtendedOperation(ndr, "extended_op", r->extended_op); + ndr_print_hyper(ndr, "fsmo_info", r->fsmo_info); ndr->depth--; } @@ -1126,6 +1227,74 @@ _PUBLIC_ void ndr_print_drsuapi_DsAttributeId(struct ndr_print *ndr, const char } } +static enum ndr_err_code ndr_push_drsuapi_DsPartialAttributeSet(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsPartialAttributeSet *r) +{ + uint32_t cntr_attids_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_attids)); + NDR_CHECK(ndr_push_align(ndr, 4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_attids)); + for (cntr_attids_0 = 0; cntr_attids_0 < r->num_attids; cntr_attids_0++) { + NDR_CHECK(ndr_push_drsuapi_DsAttributeId(ndr, NDR_SCALARS, r->attids[cntr_attids_0])); + } + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_drsuapi_DsPartialAttributeSet(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsPartialAttributeSet *r) +{ + uint32_t cntr_attids_0; + TALLOC_CTX *_mem_save_attids_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_array_size(ndr, &r->attids)); + NDR_CHECK(ndr_pull_align(ndr, 4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_attids)); + if (r->num_attids < 1 || r->num_attids > 0x100000) { + return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); + } + NDR_PULL_ALLOC_N(ndr, r->attids, ndr_get_array_size(ndr, &r->attids)); + _mem_save_attids_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->attids, 0); + for (cntr_attids_0 = 0; cntr_attids_0 < r->num_attids; cntr_attids_0++) { + NDR_CHECK(ndr_pull_drsuapi_DsAttributeId(ndr, NDR_SCALARS, &r->attids[cntr_attids_0])); + } + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attids_0, 0); + if (r->attids) { + NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->attids, r->num_attids)); + } + } + if (ndr_flags & NDR_BUFFERS) { + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_DsPartialAttributeSet(struct ndr_print *ndr, const char *name, const struct drsuapi_DsPartialAttributeSet *r) +{ + uint32_t cntr_attids_0; + ndr_print_struct(ndr, name, "drsuapi_DsPartialAttributeSet"); + ndr->depth++; + ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->version); + ndr_print_uint32(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1); + ndr_print_uint32(ndr, "num_attids", r->num_attids); + ndr->print(ndr, "%s: ARRAY(%d)", "attids", r->num_attids); + ndr->depth++; + for (cntr_attids_0=0;cntr_attids_0<r->num_attids;cntr_attids_0++) { + char *idx_0=NULL; + if (asprintf(&idx_0, "[%d]", cntr_attids_0) != -1) { + ndr_print_drsuapi_DsAttributeId(ndr, "attids", r->attids[cntr_attids_0]); + free(idx_0); + } + } + ndr->depth--; + ndr->depth--; +} + static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest8(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesRequest8 *r) { if (ndr_flags & NDR_SCALARS) { @@ -1141,10 +1310,10 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest8(struct ndr_push NDR_CHECK(ndr_push_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, r->replica_flags)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_object_count)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_ndr_size)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4)); - NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->h1)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unique_ptr1)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unique_ptr2)); + NDR_CHECK(ndr_push_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, r->extended_op)); + NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->fsmo_info)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->partial_attribute_set_ex)); NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr)); } if (ndr_flags & NDR_BUFFERS) { @@ -1152,6 +1321,12 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesRequest8(struct ndr_push if (r->uptodateness_vector) { NDR_CHECK(ndr_push_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector)); } + if (r->partial_attribute_set) { + NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set)); + } + if (r->partial_attribute_set_ex) { + NDR_CHECK(ndr_push_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex)); + } NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr)); } return NDR_ERR_SUCCESS; @@ -1163,6 +1338,10 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest8(struct ndr_pull TALLOC_CTX *_mem_save_naming_context_0; uint32_t _ptr_uptodateness_vector; TALLOC_CTX *_mem_save_uptodateness_vector_0; + uint32_t _ptr_partial_attribute_set; + TALLOC_CTX *_mem_save_partial_attribute_set_0; + uint32_t _ptr_partial_attribute_set_ex; + TALLOC_CTX *_mem_save_partial_attribute_set_ex_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->destination_dsa_guid)); @@ -1183,10 +1362,20 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest8(struct ndr_pull NDR_CHECK(ndr_pull_drsuapi_DsReplicaNeighbourFlags(ndr, NDR_SCALARS, &r->replica_flags)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_object_count)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_ndr_size)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4)); - NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->h1)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unique_ptr1)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unique_ptr2)); + NDR_CHECK(ndr_pull_drsuapi_DsExtendedOperation(ndr, NDR_SCALARS, &r->extended_op)); + NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->fsmo_info)); + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set)); + if (_ptr_partial_attribute_set) { + NDR_PULL_ALLOC(ndr, r->partial_attribute_set); + } else { + r->partial_attribute_set = NULL; + } + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_partial_attribute_set_ex)); + if (_ptr_partial_attribute_set_ex) { + NDR_PULL_ALLOC(ndr, r->partial_attribute_set_ex); + } else { + r->partial_attribute_set_ex = NULL; + } NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr)); } if (ndr_flags & NDR_BUFFERS) { @@ -1200,6 +1389,18 @@ static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesRequest8(struct ndr_pull NDR_CHECK(ndr_pull_drsuapi_DsReplicaCursorCtrEx(ndr, NDR_SCALARS, r->uptodateness_vector)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uptodateness_vector_0, 0); } + if (r->partial_attribute_set) { + _mem_save_partial_attribute_set_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set, 0); + NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_0, 0); + } + if (r->partial_attribute_set_ex) { + _mem_save_partial_attribute_set_ex_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->partial_attribute_set_ex, 0); + NDR_CHECK(ndr_pull_drsuapi_DsPartialAttributeSet(ndr, NDR_SCALARS, r->partial_attribute_set_ex)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_partial_attribute_set_ex_0, 0); + } NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_BUFFERS, &r->mapping_ctr)); } return NDR_ERR_SUCCESS; @@ -1225,10 +1426,20 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesRequest8(struct ndr_print *ndr, co ndr_print_drsuapi_DsReplicaNeighbourFlags(ndr, "replica_flags", r->replica_flags); ndr_print_uint32(ndr, "max_object_count", r->max_object_count); ndr_print_uint32(ndr, "max_ndr_size", r->max_ndr_size); - ndr_print_uint32(ndr, "unknown4", r->unknown4); - ndr_print_hyper(ndr, "h1", r->h1); - ndr_print_uint32(ndr, "unique_ptr1", r->unique_ptr1); - ndr_print_uint32(ndr, "unique_ptr2", r->unique_ptr2); + ndr_print_drsuapi_DsExtendedOperation(ndr, "extended_op", r->extended_op); + ndr_print_hyper(ndr, "fsmo_info", r->fsmo_info); + ndr_print_ptr(ndr, "partial_attribute_set", r->partial_attribute_set); + ndr->depth++; + if (r->partial_attribute_set) { + ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set", r->partial_attribute_set); + } + ndr->depth--; + ndr_print_ptr(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex); + ndr->depth++; + if (r->partial_attribute_set_ex) { + ndr_print_drsuapi_DsPartialAttributeSet(ndr, "partial_attribute_set_ex", r->partial_attribute_set_ex); + } + ndr->depth--; ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr); ndr->depth--; } @@ -1370,10 +1581,10 @@ static enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2CtrEx(struct ndr_push if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); NDR_CHECK(ndr_push_align(ndr, 8)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u1)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); for (cntr_cursors_0 = 0; cntr_cursors_0 < r->count; cntr_cursors_0++) { NDR_CHECK(ndr_push_drsuapi_DsReplicaCursor2(ndr, NDR_SCALARS, &r->cursors[cntr_cursors_0])); } @@ -1390,13 +1601,13 @@ static enum ndr_err_code ndr_pull_drsuapi_DsReplicaCursor2CtrEx(struct ndr_pull if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_array_size(ndr, &r->cursors)); NDR_CHECK(ndr_pull_align(ndr, 8)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u1)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count)); if (r->count < 0 || r->count > 0x100000) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2)); NDR_PULL_ALLOC_N(ndr, r->cursors, ndr_get_array_size(ndr, &r->cursors)); _mem_save_cursors_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->cursors, 0); @@ -1418,10 +1629,10 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaCursor2CtrEx(struct ndr_print *ndr, con uint32_t cntr_cursors_0; ndr_print_struct(ndr, name, "drsuapi_DsReplicaCursor2CtrEx"); ndr->depth++; - ndr_print_uint32(ndr, "u1", r->u1); - ndr_print_uint32(ndr, "u2", r->u2); + ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->version); + ndr_print_uint32(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1); ndr_print_uint32(ndr, "count", r->count); - ndr_print_uint32(ndr, "u3", r->u3); + ndr_print_uint32(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2); ndr->print(ndr, "%s: ARRAY(%d)", "cursors", r->count); ndr->depth++; for (cntr_cursors_0=0;cntr_cursors_0<r->count;cntr_cursors_0++) { @@ -1825,12 +2036,36 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaAttributeCtr(struct ndr_print *ndr, con ndr->depth--; } +_PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r) +{ + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r) +{ + uint32_t v; + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_drsuapi_DsReplicaObjectFlags(struct ndr_print *ndr, const char *name, uint32_t r) +{ + ndr_print_uint32(ndr, name, r); + ndr->depth++; + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER", DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC", DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC, r); + ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY", DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY, r); + ndr->depth--; +} + _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObject(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObject *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->identifier)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); + NDR_CHECK(ndr_push_drsuapi_DsReplicaObjectFlags(ndr, NDR_SCALARS, r->flags)); NDR_CHECK(ndr_push_drsuapi_DsReplicaAttributeCtr(ndr, NDR_SCALARS, &r->attribute_ctr)); } if (ndr_flags & NDR_BUFFERS) { @@ -1854,7 +2089,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObject(struct ndr_pull *ndr } else { r->identifier = NULL; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_drsuapi_DsReplicaObjectFlags(ndr, NDR_SCALARS, &r->flags)); NDR_CHECK(ndr_pull_drsuapi_DsReplicaAttributeCtr(ndr, NDR_SCALARS, &r->attribute_ctr)); } if (ndr_flags & NDR_BUFFERS) { @@ -1879,7 +2114,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsReplicaObject(struct ndr_print *ndr, const cha ndr_print_drsuapi_DsReplicaObjectIdentifier(ndr, "identifier", r->identifier); } ndr->depth--; - ndr_print_uint32(ndr, "unknown1", r->unknown1); + ndr_print_drsuapi_DsReplicaObjectFlags(ndr, "flags", r->flags); ndr_print_drsuapi_DsReplicaAttributeCtr(ndr, "attribute_ctr", &r->attribute_ctr); ndr->depth--; } @@ -1991,7 +2226,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectListItemEx(struct ndr NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->next_object)); NDR_CHECK(ndr_push_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_nc_prefix)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->parent_object_guid)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->meta_data_ctr)); } @@ -2027,7 +2262,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectListItemEx(struct ndr r->next_object = NULL; } NDR_CHECK(ndr_pull_drsuapi_DsReplicaObject(ndr, NDR_SCALARS, &r->object)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_nc_prefix)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parent_object_guid)); if (_ptr_parent_object_guid) { NDR_PULL_ALLOC(ndr, r->parent_object_guid); @@ -2076,11 +2311,11 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr1(struct ndr_push * NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector)); NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_object_count)); + NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr, NDR_SCALARS, r->extended_ret)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_count)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->flags) + 55)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->first_object)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->more_data)); } if (ndr_flags & NDR_BUFFERS) { if (r->naming_context) { @@ -2124,7 +2359,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1(struct ndr_pull * r->uptodateness_vector = NULL; } NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_object_count)); + NDR_CHECK(ndr_pull_drsuapi_DsExtendedError(ndr, NDR_SCALARS, &r->extended_ret)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_count)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_first_object)); @@ -2133,7 +2368,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr1(struct ndr_pull * } else { r->first_object = NULL; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->more_data)); } if (ndr_flags & NDR_BUFFERS) { if (r->naming_context) { @@ -2180,7 +2415,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr1(struct ndr_print *ndr, const } ndr->depth--; ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr); - ndr_print_uint32(ndr, "total_object_count", r->total_object_count); + ndr_print_drsuapi_DsExtendedError(ndr, "extended_ret", r->extended_ret); ndr_print_uint32(ndr, "object_count", r->object_count); ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsGetNCChangesCtr1(r, ndr->flags) + 55:r->__ndr_size); ndr_print_ptr(ndr, "first_object", r->first_object); @@ -2189,7 +2424,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr1(struct ndr_print *ndr, const ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "first_object", r->first_object); } ndr->depth--; - ndr_print_uint32(ndr, "unknown4", r->unknown4); + ndr_print_uint32(ndr, "more_data", r->more_data); ndr->depth--; } @@ -2300,16 +2535,16 @@ _PUBLIC_ enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesCtr6(struct ndr_push * NDR_CHECK(ndr_push_drsuapi_DsReplicaHighWaterMark(ndr, NDR_SCALARS, &r->new_highwatermark)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->uptodateness_vector)); NDR_CHECK(ndr_push_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_object_count)); + NDR_CHECK(ndr_push_drsuapi_DsExtendedError(ndr, NDR_SCALARS, r->extended_ret)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->object_count)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsGetNCChangesCtr6(r, ndr->flags) + 55)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->first_object)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown5)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown6)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->more_data)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nc_object_count)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nc_linked_attributes_count)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linked_attributes_count)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->linked_attributes)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown7)); + NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->drs_error)); } if (ndr_flags & NDR_BUFFERS) { if (r->naming_context) { @@ -2366,7 +2601,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull * r->uptodateness_vector = NULL; } NDR_CHECK(ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr(ndr, NDR_SCALARS, &r->mapping_ctr)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_object_count)); + NDR_CHECK(ndr_pull_drsuapi_DsExtendedError(ndr, NDR_SCALARS, &r->extended_ret)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->object_count)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size)); NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_first_object)); @@ -2375,9 +2610,9 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull * } else { r->first_object = NULL; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown5)); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown6)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->more_data)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nc_object_count)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nc_linked_attributes_count)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linked_attributes_count)); if (r->linked_attributes_count < 0 || r->linked_attributes_count > 1048576) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); @@ -2388,7 +2623,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesCtr6(struct ndr_pull * } else { r->linked_attributes = NULL; } - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown7)); + NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->drs_error)); } if (ndr_flags & NDR_BUFFERS) { if (r->naming_context) { @@ -2455,7 +2690,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const } ndr->depth--; ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(ndr, "mapping_ctr", &r->mapping_ctr); - ndr_print_uint32(ndr, "total_object_count", r->total_object_count); + ndr_print_drsuapi_DsExtendedError(ndr, "extended_ret", r->extended_ret); ndr_print_uint32(ndr, "object_count", r->object_count); ndr_print_uint32(ndr, "__ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_drsuapi_DsGetNCChangesCtr6(r, ndr->flags) + 55:r->__ndr_size); ndr_print_ptr(ndr, "first_object", r->first_object); @@ -2464,9 +2699,9 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "first_object", r->first_object); } ndr->depth--; - ndr_print_uint32(ndr, "unknown4", r->unknown4); - ndr_print_uint32(ndr, "unknown5", r->unknown5); - ndr_print_uint32(ndr, "unknown6", r->unknown6); + ndr_print_uint32(ndr, "more_data", r->more_data); + ndr_print_uint32(ndr, "nc_object_count", r->nc_object_count); + ndr_print_uint32(ndr, "nc_linked_attributes_count", r->nc_linked_attributes_count); ndr_print_uint32(ndr, "linked_attributes_count", r->linked_attributes_count); ndr_print_ptr(ndr, "linked_attributes", r->linked_attributes); ndr->depth++; @@ -2483,7 +2718,7 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesCtr6(struct ndr_print *ndr, const ndr->depth--; } ndr->depth--; - ndr_print_uint32(ndr, "unknown7", r->unknown7); + ndr_print_WERROR(ndr, "drs_error", r->drs_error); ndr->depth--; } @@ -2652,31 +2887,21 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_pu NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->decompressed_length)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->compressed_length)); - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->decompressed)); - ndr->flags = _flags_save_DATA_BLOB; - } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1)); } if (ndr_flags & NDR_BUFFERS) { - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); - if (r->decompressed) { + if (r->ctr1) { + { + struct ndr_push *_ndr_ctr1; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr1, 4, r->compressed_length)); { - struct ndr_push *_ndr_decompressed; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_decompressed, 4, r->compressed_length)); - { - struct ndr_push *_ndr_decompressed_compressed; - NDR_CHECK(ndr_push_compression_start(_ndr_decompressed, &_ndr_decompressed_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - NDR_CHECK(ndr_push_DATA_BLOB(_ndr_decompressed_compressed, NDR_SCALARS, *r->decompressed)); - NDR_CHECK(ndr_push_compression_end(_ndr_decompressed, _ndr_decompressed_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - } - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_decompressed, 4, r->compressed_length)); + struct ndr_push *_ndr_ctr1_compressed; + NDR_CHECK(ndr_push_compression_start(_ndr_ctr1, &_ndr_ctr1_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); + NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); + NDR_CHECK(ndr_push_compression_end(_ndr_ctr1, _ndr_ctr1_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); } + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr1, 4, r->compressed_length)); } - ndr->flags = _flags_save_DATA_BLOB; } } return NDR_ERR_SUCCESS; @@ -2684,45 +2909,35 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_pu static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesXPRESSCtr1 *r) { - uint32_t _ptr_decompressed; - TALLOC_CTX *_mem_save_decompressed_0; + uint32_t _ptr_ctr1; + TALLOC_CTX *_mem_save_ctr1_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length)); - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_decompressed)); - if (_ptr_decompressed) { - NDR_PULL_ALLOC(ndr, r->decompressed); - } else { - r->decompressed = NULL; - } - ndr->flags = _flags_save_DATA_BLOB; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1)); + if (_ptr_ctr1) { + NDR_PULL_ALLOC(ndr, r->ctr1); + } else { + r->ctr1 = NULL; } } if (ndr_flags & NDR_BUFFERS) { - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); - if (r->decompressed) { - _mem_save_decompressed_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->decompressed, 0); + if (r->ctr1) { + _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0); + { + struct ndr_pull *_ndr_ctr1; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr1, 4, r->compressed_length)); { - struct ndr_pull *_ndr_decompressed; - NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_decompressed, 4, r->compressed_length)); - { - struct ndr_pull *_ndr_decompressed_compressed; - NDR_CHECK(ndr_pull_compression_start(_ndr_decompressed, &_ndr_decompressed_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_decompressed_compressed, NDR_SCALARS, r->decompressed)); - NDR_CHECK(ndr_pull_compression_end(_ndr_decompressed, _ndr_decompressed_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - } - NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_decompressed, 4, r->compressed_length)); + struct ndr_pull *_ndr_ctr1_compressed; + NDR_CHECK(ndr_pull_compression_start(_ndr_ctr1, &_ndr_ctr1_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); + NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr1(_ndr_ctr1_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr1)); + NDR_CHECK(ndr_pull_compression_end(_ndr_ctr1, _ndr_ctr1_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_decompressed_0, 0); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr1, 4, r->compressed_length)); } - ndr->flags = _flags_save_DATA_BLOB; + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0); } } return NDR_ERR_SUCCESS; @@ -2734,10 +2949,10 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_print *ndr, ndr->depth++; ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length); ndr_print_uint32(ndr, "compressed_length", r->compressed_length); - ndr_print_ptr(ndr, "decompressed", r->decompressed); + ndr_print_ptr(ndr, "ctr1", r->ctr1); ndr->depth++; - if (r->decompressed) { - ndr_print_DATA_BLOB(ndr, "decompressed", *r->decompressed); + if (r->ctr1) { + ndr_print_drsuapi_DsGetNCChangesCtr1(ndr, "ctr1", r->ctr1); } ndr->depth--; ndr->depth--; @@ -2749,31 +2964,21 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_pu NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->decompressed_length)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->compressed_length)); - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); - NDR_CHECK(ndr_push_unique_ptr(ndr, r->decompressed)); - ndr->flags = _flags_save_DATA_BLOB; - } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr6)); } if (ndr_flags & NDR_BUFFERS) { - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); - if (r->decompressed) { + if (r->ctr6) { + { + struct ndr_push *_ndr_ctr6; + NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ctr6, 4, r->compressed_length)); { - struct ndr_push *_ndr_decompressed; - NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_decompressed, 4, r->compressed_length)); - { - struct ndr_push *_ndr_decompressed_compressed; - NDR_CHECK(ndr_push_compression_start(_ndr_decompressed, &_ndr_decompressed_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - NDR_CHECK(ndr_push_DATA_BLOB(_ndr_decompressed_compressed, NDR_SCALARS, *r->decompressed)); - NDR_CHECK(ndr_push_compression_end(_ndr_decompressed, _ndr_decompressed_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - } - NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_decompressed, 4, r->compressed_length)); + struct ndr_push *_ndr_ctr6_compressed; + NDR_CHECK(ndr_push_compression_start(_ndr_ctr6, &_ndr_ctr6_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); + NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr6)); + NDR_CHECK(ndr_push_compression_end(_ndr_ctr6, _ndr_ctr6_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); } + NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ctr6, 4, r->compressed_length)); } - ndr->flags = _flags_save_DATA_BLOB; } } return NDR_ERR_SUCCESS; @@ -2781,45 +2986,35 @@ static enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_pu static enum ndr_err_code ndr_pull_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsGetNCChangesXPRESSCtr6 *r) { - uint32_t _ptr_decompressed; - TALLOC_CTX *_mem_save_decompressed_0; + uint32_t _ptr_ctr6; + TALLOC_CTX *_mem_save_ctr6_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->decompressed_length)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->compressed_length)); - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_decompressed)); - if (_ptr_decompressed) { - NDR_PULL_ALLOC(ndr, r->decompressed); - } else { - r->decompressed = NULL; - } - ndr->flags = _flags_save_DATA_BLOB; + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr6)); + if (_ptr_ctr6) { + NDR_PULL_ALLOC(ndr, r->ctr6); + } else { + r->ctr6 = NULL; } } if (ndr_flags & NDR_BUFFERS) { - { - uint32_t _flags_save_DATA_BLOB = ndr->flags; - ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING); - if (r->decompressed) { - _mem_save_decompressed_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->decompressed, 0); + if (r->ctr6) { + _mem_save_ctr6_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->ctr6, 0); + { + struct ndr_pull *_ndr_ctr6; + NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ctr6, 4, r->compressed_length)); { - struct ndr_pull *_ndr_decompressed; - NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_decompressed, 4, r->compressed_length)); - { - struct ndr_pull *_ndr_decompressed_compressed; - NDR_CHECK(ndr_pull_compression_start(_ndr_decompressed, &_ndr_decompressed_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_decompressed_compressed, NDR_SCALARS, r->decompressed)); - NDR_CHECK(ndr_pull_compression_end(_ndr_decompressed, _ndr_decompressed_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); - } - NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_decompressed, 4, r->compressed_length)); + struct ndr_pull *_ndr_ctr6_compressed; + NDR_CHECK(ndr_pull_compression_start(_ndr_ctr6, &_ndr_ctr6_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); + NDR_CHECK(ndr_pull_drsuapi_DsGetNCChangesCtr6(_ndr_ctr6_compressed, NDR_SCALARS|NDR_BUFFERS, r->ctr6)); + NDR_CHECK(ndr_pull_compression_end(_ndr_ctr6, _ndr_ctr6_compressed, NDR_COMPRESSION_XPRESS, r->decompressed_length)); } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_decompressed_0, 0); + NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ctr6, 4, r->compressed_length)); } - ndr->flags = _flags_save_DATA_BLOB; + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr6_0, 0); } } return NDR_ERR_SUCCESS; @@ -2831,10 +3026,10 @@ _PUBLIC_ void ndr_print_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_print *ndr, ndr->depth++; ndr_print_uint32(ndr, "decompressed_length", r->decompressed_length); ndr_print_uint32(ndr, "compressed_length", r->compressed_length); - ndr_print_ptr(ndr, "decompressed", r->decompressed); + ndr_print_ptr(ndr, "ctr6", r->ctr6); ndr->depth++; - if (r->decompressed) { - ndr_print_DATA_BLOB(ndr, "decompressed", *r->decompressed); + if (r->ctr6) { + ndr_print_drsuapi_DsGetNCChangesCtr6(ndr, "ctr6", r->ctr6); } ndr->depth--; ndr->depth--; diff --git a/source3/librpc/gen_ndr/ndr_drsuapi.h b/source3/librpc/gen_ndr/ndr_drsuapi.h index 9d10ccd7b8..11cc3f298a 100644 --- a/source3/librpc/gen_ndr/ndr_drsuapi.h +++ b/source3/librpc/gen_ndr/ndr_drsuapi.h @@ -88,6 +88,8 @@ void ndr_print_drsuapi_DsReplicaCursorCtrEx(struct ndr_print *ndr, const char *n enum ndr_err_code ndr_push_drsuapi_DsReplicaNeighbourFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r); enum ndr_err_code ndr_pull_drsuapi_DsReplicaNeighbourFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); void ndr_print_drsuapi_DsReplicaNeighbourFlags(struct ndr_print *ndr, const char *name, uint32_t r); +void ndr_print_drsuapi_DsExtendedOperation(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedOperation r); +void ndr_print_drsuapi_DsExtendedError(struct ndr_print *ndr, const char *name, enum drsuapi_DsExtendedError r); void ndr_print_drsuapi_DsGetNCChangesRequest5(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest5 *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); @@ -99,6 +101,7 @@ void ndr_print_drsuapi_DsReplicaOIDMapping_Ctr(struct ndr_print *ndr, const char enum ndr_err_code ndr_push_drsuapi_DsAttributeId(struct ndr_push *ndr, int ndr_flags, enum drsuapi_DsAttributeId r); enum ndr_err_code ndr_pull_drsuapi_DsAttributeId(struct ndr_pull *ndr, int ndr_flags, enum drsuapi_DsAttributeId *r); void ndr_print_drsuapi_DsAttributeId(struct ndr_print *ndr, const char *name, enum drsuapi_DsAttributeId r); +void ndr_print_drsuapi_DsPartialAttributeSet(struct ndr_print *ndr, const char *name, const struct drsuapi_DsPartialAttributeSet *r); void ndr_print_drsuapi_DsGetNCChangesRequest8(struct ndr_print *ndr, const char *name, const struct drsuapi_DsGetNCChangesRequest8 *r); void ndr_print_drsuapi_DsGetNCChangesRequest(struct ndr_print *ndr, const char *name, const union drsuapi_DsGetNCChangesRequest *r); enum ndr_err_code ndr_push_drsuapi_DsReplicaCursor2(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaCursor2 *r); @@ -119,6 +122,9 @@ enum ndr_err_code ndr_push_drsuapi_DsReplicaAttribute(struct ndr_push *ndr, int enum ndr_err_code ndr_pull_drsuapi_DsReplicaAttribute(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaAttribute *r); void ndr_print_drsuapi_DsReplicaAttribute(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttribute *r); void ndr_print_drsuapi_DsReplicaAttributeCtr(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaAttributeCtr *r); +enum ndr_err_code ndr_push_drsuapi_DsReplicaObjectFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r); +enum ndr_err_code ndr_pull_drsuapi_DsReplicaObjectFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r); +void ndr_print_drsuapi_DsReplicaObjectFlags(struct ndr_print *ndr, const char *name, uint32_t r); enum ndr_err_code ndr_push_drsuapi_DsReplicaObject(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaObject *r); enum ndr_err_code ndr_pull_drsuapi_DsReplicaObject(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaObject *r); void ndr_print_drsuapi_DsReplicaObject(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObject *r); diff --git a/source3/librpc/idl/drsuapi.idl b/source3/librpc/idl/drsuapi.idl index f6fd618da8..168fd5e0a9 100644 --- a/source3/librpc/idl/drsuapi.idl +++ b/source3/librpc/idl/drsuapi.idl @@ -192,10 +192,10 @@ interface drsuapi } drsuapi_DsReplicaCursor; typedef struct { - uint32 u1; - uint32 u2; + [value(1)] uint32 version; + [value(0)] uint32 reserved1; [range(0,0x100000)] uint32 count; - uint32 u3; + [value(0)] uint32 reserved2; [size_is(count)] drsuapi_DsReplicaCursor cursors[]; } drsuapi_DsReplicaCursorCtrEx; @@ -230,6 +230,37 @@ interface drsuapi 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 */ @@ -239,8 +270,8 @@ interface drsuapi 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 */ - uint32 unknown4; - hyper h1; + drsuapi_DsExtendedOperation extended_op; + hyper fsmo_info; } drsuapi_DsGetNCChangesRequest5; /* @@ -413,6 +444,13 @@ interface drsuapi } 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; @@ -421,10 +459,10 @@ interface drsuapi 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 */ - uint32 unknown4; - hyper h1; - uint32 unique_ptr1; - uint32 unique_ptr2; + 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; @@ -440,10 +478,10 @@ interface drsuapi } drsuapi_DsReplicaCursor2; typedef struct { - uint32 u1; - uint32 u2; + [value(2)] uint32 version; + [value(0)] uint32 reserved1; [range(0,0x100000)] uint32 count; - uint32 u3; + [value(0)] uint32 reserved2; [size_is(count)] drsuapi_DsReplicaCursor2 cursors[]; } drsuapi_DsReplicaCursor2CtrEx; @@ -489,9 +527,15 @@ interface drsuapi [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; - uint32 unknown1; + drsuapi_DsReplicaObjectFlags flags; drsuapi_DsReplicaAttributeCtr attribute_ctr; } drsuapi_DsReplicaObject; @@ -510,7 +554,7 @@ interface drsuapi typedef [public,noprint] struct { drsuapi_DsReplicaObjectListItemEx *next_object; drsuapi_DsReplicaObject object; - uint32 unknown1; + boolean32 is_nc_prefix; GUID *parent_object_guid; drsuapi_DsReplicaMetaDataCtr *meta_data_ctr; } drsuapi_DsReplicaObjectListItemEx; @@ -523,12 +567,12 @@ interface drsuapi drsuapi_DsReplicaHighWaterMark new_highwatermark; drsuapi_DsReplicaCursorCtrEx *uptodateness_vector; drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr; - uint32 total_object_count; + 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; - uint32 unknown4; + boolean32 more_data; } drsuapi_DsGetNCChangesCtr1; /* @@ -556,17 +600,17 @@ interface drsuapi drsuapi_DsReplicaHighWaterMark new_highwatermark; drsuapi_DsReplicaCursor2CtrEx *uptodateness_vector; drsuapi_DsReplicaOIDMapping_Ctr mapping_ctr; - uint32 total_object_count; + 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; - uint32 unknown4; - uint32 unknown5; - uint32 unknown6; + 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; - uint32 unknown7; + WERROR drs_error; } drsuapi_DsGetNCChangesCtr6; typedef struct { @@ -589,16 +633,16 @@ interface drsuapi uint32 decompressed_length; uint32 compressed_length; [subcontext(4),subcontext_size(compressed_length), - compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length), - flag(NDR_REMAINING)] DATA_BLOB *decompressed; + compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)] + drsuapi_DsGetNCChangesCtr1 *ctr1; } drsuapi_DsGetNCChangesXPRESSCtr1; typedef struct { uint32 decompressed_length; uint32 compressed_length; [subcontext(4),subcontext_size(compressed_length), - compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length), - flag(NDR_REMAINING)] DATA_BLOB *decompressed; + compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length)] + drsuapi_DsGetNCChangesCtr6 *ctr6; } drsuapi_DsGetNCChangesXPRESSCtr6; typedef [enum16bit] enum { diff --git a/source3/librpc/ndr/ndr_drsuapi.c b/source3/librpc/ndr/ndr_drsuapi.c index 8cd42b2cc1..aeb81c87bd 100644 --- a/source3/librpc/ndr/ndr_drsuapi.c +++ b/source3/librpc/ndr/ndr_drsuapi.c @@ -43,7 +43,7 @@ void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const ch ndr->depth++; ndr_print_ptr(ndr, "next_object", r->next_object); ndr_print_drsuapi_DsReplicaObject(ndr, "object", &r->object); - ndr_print_uint32(ndr, "unknown1", r->unknown1); + 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) { diff --git a/source3/libsmb/clirap2.c b/source3/libsmb/clirap2.c index 9cc8110576..a15fa5f7d8 100644 --- a/source3/libsmb/clirap2.c +++ b/source3/libsmb/clirap2.c @@ -1856,6 +1856,7 @@ bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char +WORDSIZE]; /* buffer size? */ char upperbuf[MAX(RAP_USERNAME_LEN,RAP_MACHNAME_LEN)]; int res = -1; + char *tmp = NULL; memset(param, 0, sizeof(param)); @@ -1866,11 +1867,13 @@ bool cli_NetWkstaUserLogoff(struct cli_state *cli, const char *user, const char PUTDWORD(p, 0); /* Null pointer */ strlcpy(upperbuf, user, sizeof(upperbuf)); strupper_m(upperbuf); - PUTSTRINGF(p, upperbuf, RAP_USERNAME_LEN); + tmp = upperbuf; + PUTSTRINGF(p, tmp, RAP_USERNAME_LEN); p++; /* strange format, but ok */ strlcpy(upperbuf, workstation, sizeof(upperbuf)); strupper_m(upperbuf); - PUTSTRINGF(p, upperbuf, RAP_MACHNAME_LEN); + tmp = upperbuf; + PUTSTRINGF(p, tmp, RAP_MACHNAME_LEN); PUTWORD(p, CLI_BUFFER_SIZE); PUTWORD(p, CLI_BUFFER_SIZE); diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index b9b74fe7d2..be26a92ca9 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -200,6 +200,22 @@ smbc_free_context(SMBCCTX *context, smbc_setUser(context, NULL); DEBUG(3, ("Context %p successfully freed\n", context)); + + gfree_names(); + gfree_loadparm(); + gfree_case_tables(); + gfree_charcnv(); + gfree_interfaces(); + + gencache_shutdown(); + secrets_shutdown(); + + /* release the talloc null_context memory last */ + talloc_disable_null_tracking(); + + gfree_debugsyms(); + + SAFE_FREE(context->internal); SAFE_FREE(context); return 0; } @@ -411,6 +427,9 @@ smbc_init_context(SMBCCTX *context) char *user = NULL; char *home = NULL; + /* track talloc null_context memory */ + talloc_enable_null_tracking(); + if (!context) { errno = EBADF; return NULL; diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 6ee677e376..381aa18561 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -657,18 +657,22 @@ static int vfswrap_ntimes(vfs_handle_struct *handle, const char *path, const str START_PROFILE(syscall_ntimes); #if defined(HAVE_UTIMES) - { + if (ts != NULL) { struct timeval tv[2]; tv[0] = convert_timespec_to_timeval(ts[0]); tv[1] = convert_timespec_to_timeval(ts[1]); result = utimes(path, tv); + } else { + result = utimes(path, NULL); } #elif defined(HAVE_UTIME) - { + if (ts != NULL) { struct utimbuf times; times.actime = convert_timespec_to_time_t(ts[0]); times.modtime = convert_timespec_to_time_t(ts[1]); result = utime(path, times); + } else { + result = utime(path, NULL); } #else errno = ENOSYS; diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index b2cbbf1671..18ca495cea 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -8903,15 +8903,6 @@ bool lp_load_with_registry_shares(const char *pszFname, } /*************************************************************************** - Reset the max number of services. -***************************************************************************/ - -void lp_resetnumservices(void) -{ - iNumServices = 0; -} - -/*************************************************************************** Return the max number of services. ***************************************************************************/ diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index e0a7277a5d..d216e0e085 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -397,7 +397,7 @@ WERROR regdb_init(void) REG_TDB_FLAGS, O_RDWR|O_CREAT, 0600); if (!regdb) { werr = ntstatus_to_werror(map_nt_error_from_unix(errno)); - DEBUG(0,("regdb_init: Failed to open registry %s (%s)\n", + DEBUG(1,("regdb_init: Failed to open registry %s (%s)\n", state_path("registry.tdb"), strerror(errno) )); return werr; } @@ -416,7 +416,7 @@ WERROR regdb_init(void) vers_id, REGVER_V1)); status = dbwrap_trans_store_int32(regdb, vstring, REGVER_V1); if (!NT_STATUS_IS_OK(status)) { - DEBUG(0, ("regdb_init: error storing %s = %d: %s\n", + DEBUG(1, ("regdb_init: error storing %s = %d: %s\n", vstring, REGVER_V1, nt_errstr(status))); return ntstatus_to_werror(status); } else { diff --git a/source3/script/tests/test_testparm_s3.sh b/source3/script/tests/test_testparm_s3.sh index f1316e922c..0962ca0764 100755 --- a/source3/script/tests/test_testparm_s3.sh +++ b/source3/script/tests/test_testparm_s3.sh @@ -6,7 +6,7 @@ # and the macro expansions. TEMP_CONFFILE=${LIBDIR}/smb.conf.tmp -TESTPARM="$VALGRIND ${TESTPARM:-$BINDIR/testparm} --suppress-prompt" +TESTPARM="$VALGRIND ${TESTPARM:-$BINDIR/testparm} --suppress-prompt --skip-logic-checks" incdir=`dirname $0` . $incdir/test_functions.sh diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index 03291fe35f..527db2d805 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -202,6 +202,72 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ return ret; } +/** + * per-share logic tests + */ +static void do_per_share_checks(int s) +{ + const char **deny_list = lp_hostsdeny(s); + const char **allow_list = lp_hostsallow(s); + int i; + + if(deny_list) { + for (i=0; deny_list[i]; i++) { + char *hasstar = strchr_m(deny_list[i], '*'); + char *hasquery = strchr_m(deny_list[i], '?'); + if(hasstar || hasquery) { + fprintf(stderr,"Invalid character %c in hosts deny list (%s) for service %s.\n", + hasstar ? *hasstar : *hasquery, deny_list[i], lp_servicename(s) ); + } + } + } + + if(allow_list) { + for (i=0; allow_list[i]; i++) { + char *hasstar = strchr_m(allow_list[i], '*'); + char *hasquery = strchr_m(allow_list[i], '?'); + if(hasstar || hasquery) { + fprintf(stderr,"Invalid character %c in hosts allow list (%s) for service %s.\n", + hasstar ? *hasstar : *hasquery, allow_list[i], lp_servicename(s) ); + } + } + } + + if(lp_level2_oplocks(s) && !lp_oplocks(s)) { + fprintf(stderr,"Invalid combination of parameters for service %s. \ + Level II oplocks can only be set if oplocks are also set.\n", + lp_servicename(s) ); + } + + if (lp_map_hidden(s) && !(lp_create_mask(s) & S_IXOTH)) { + fprintf(stderr,"Invalid combination of parameters for service %s. \ + Map hidden can only work if create mask includes octal 01 (S_IXOTH).\n", + lp_servicename(s) ); + } + if (lp_map_hidden(s) && (lp_force_create_mode(s) & S_IXOTH)) { + fprintf(stderr,"Invalid combination of parameters for service %s. \ + Map hidden can only work if force create mode excludes octal 01 (S_IXOTH).\n", + lp_servicename(s) ); + } + if (lp_map_system(s) && !(lp_create_mask(s) & S_IXGRP)) { + fprintf(stderr,"Invalid combination of parameters for service %s. \ + Map system can only work if create mask includes octal 010 (S_IXGRP).\n", + lp_servicename(s) ); + } + if (lp_map_system(s) && (lp_force_create_mode(s) & S_IXGRP)) { + fprintf(stderr,"Invalid combination of parameters for service %s. \ + Map system can only work if force create mode excludes octal 010 (S_IXGRP).\n", + lp_servicename(s) ); + } +#ifdef HAVE_CUPS + if (lp_printing(s) == PRINT_CUPS && *(lp_printcommand(s)) != '\0') { + fprintf(stderr,"Warning: Service %s defines a print command, but \ +rameter is ignored when using CUPS libraries.\n", + lp_servicename(s) ); + } +#endif +} + int main(int argc, const char *argv[]) { const char *config_file = get_dyn_CONFIGFILE(); @@ -217,6 +283,7 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ const char *cname; const char *caddr; static int show_defaults; + static int skip_logic_checks = 0; struct poptOption long_options[] = { POPT_AUTOHELP @@ -224,16 +291,24 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ {"verbose", 'v', POPT_ARG_NONE, &show_defaults, 1, "Show default options too"}, {"server", 'L',POPT_ARG_STRING, &new_local_machine, 0, "Set %%L macro to servername\n"}, {"encoding", 't', POPT_ARG_STRING, &term_code, 0, "Print parameters with encoding"}, + {"skip-logic-checks", 'l', POPT_ARG_NONE, &skip_logic_checks, 1, "Skip the global checks"}, {"show-all-parameters", '\0', POPT_ARG_VAL, &show_all_parameters, True, "Show the parameters, type, possible values" }, {"parameter-name", '\0', POPT_ARG_STRING, ¶meter_name, 0, "Limit testparm to a named parameter" }, {"section-name", '\0', POPT_ARG_STRING, §ion_name, 0, "Limit testparm to a named section" }, POPT_COMMON_VERSION + POPT_COMMON_DEBUGLEVEL POPT_TABLEEND }; TALLOC_CTX *frame = talloc_stackframe(); load_case_tables(); + /* + * Set the default debug level to 2. + * Allow it to be overridden by the command line, + * not by smb.conf. + */ + DEBUGLEVEL_CLASS[DBGC_ALL] = 2; pc = poptGetContext(NULL, argc, argv, long_options, POPT_CONTEXT_KEEP_FIRST); @@ -264,7 +339,7 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ } dbf = x_stderr; - DEBUGLEVEL = 2; + /* Don't let the debuglevel be changed by smb.conf. */ AllowDebugChange = False; fprintf(stderr,"Load smb config files from %s\n",config_file); @@ -276,7 +351,9 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ fprintf(stderr,"Loaded services file OK.\n"); - ret = do_global_checks(); + if (skip_logic_checks == 0) { + ret = do_global_checks(); + } for (s=0;s<1000;s++) { if (VALID_SNUM(s)) @@ -289,65 +366,8 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ } for (s=0;s<1000;s++) { - if (VALID_SNUM(s)) { - const char **deny_list = lp_hostsdeny(s); - const char **allow_list = lp_hostsallow(s); - int i; - if(deny_list) { - for (i=0; deny_list[i]; i++) { - char *hasstar = strchr_m(deny_list[i], '*'); - char *hasquery = strchr_m(deny_list[i], '?'); - if(hasstar || hasquery) { - fprintf(stderr,"Invalid character %c in hosts deny list (%s) for service %s.\n", - hasstar ? *hasstar : *hasquery, deny_list[i], lp_servicename(s) ); - } - } - } - - if(allow_list) { - for (i=0; allow_list[i]; i++) { - char *hasstar = strchr_m(allow_list[i], '*'); - char *hasquery = strchr_m(allow_list[i], '?'); - if(hasstar || hasquery) { - fprintf(stderr,"Invalid character %c in hosts allow list (%s) for service %s.\n", - hasstar ? *hasstar : *hasquery, allow_list[i], lp_servicename(s) ); - } - } - } - - if(lp_level2_oplocks(s) && !lp_oplocks(s)) { - fprintf(stderr,"Invalid combination of parameters for service %s. \ - Level II oplocks can only be set if oplocks are also set.\n", - lp_servicename(s) ); - } - - if (lp_map_hidden(s) && !(lp_create_mask(s) & S_IXOTH)) { - fprintf(stderr,"Invalid combination of parameters for service %s. \ - Map hidden can only work if create mask includes octal 01 (S_IXOTH).\n", - lp_servicename(s) ); - } - if (lp_map_hidden(s) && (lp_force_create_mode(s) & S_IXOTH)) { - fprintf(stderr,"Invalid combination of parameters for service %s. \ - Map hidden can only work if force create mode excludes octal 01 (S_IXOTH).\n", - lp_servicename(s) ); - } - if (lp_map_system(s) && !(lp_create_mask(s) & S_IXGRP)) { - fprintf(stderr,"Invalid combination of parameters for service %s. \ - Map system can only work if create mask includes octal 010 (S_IXGRP).\n", - lp_servicename(s) ); - } - if (lp_map_system(s) && (lp_force_create_mode(s) & S_IXGRP)) { - fprintf(stderr,"Invalid combination of parameters for service %s. \ - Map system can only work if force create mode excludes octal 010 (S_IXGRP).\n", - lp_servicename(s) ); - } -#ifdef HAVE_CUPS - if (lp_printing(s) == PRINT_CUPS && *(lp_printcommand(s)) != '\0') { - fprintf(stderr,"Warning: Service %s defines a print command, but \ -print command parameter is ignored when using CUPS libraries.\n", - lp_servicename(s) ); - } -#endif + if (VALID_SNUM(s) && (skip_logic_checks == 0)) { + do_per_share_checks(s); } } diff --git a/source3/web/swat.c b/source3/web/swat.c index 373ab73127..1502c5bc2f 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -430,7 +430,6 @@ static void show_parameters(int snum, int allparameters, unsigned int parm_filte ****************************************************************************/ static bool load_config(bool save_def) { - lp_resetnumservices(); return lp_load(get_dyn_CONFIGFILE(),False,save_def,False,True); } @@ -740,12 +739,12 @@ static void wizard_page(void) load_config(False); lp_copy_service(GLOBAL_SECTION_SNUM, unix_share); - iNumNonAutoPrintServices = lp_numservices(); have_home = lp_servicenumber(HOMES_NAME); lp_do_parameter( have_home, "read only", "No"); lp_do_parameter( have_home, "valid users", "%S"); lp_do_parameter( have_home, "browseable", "No"); commit_parameters(have_home); + save_reload(have_home); } /* Need to Delete Homes share? */ @@ -908,6 +907,7 @@ static void shares_page(void) if (cgi_variable("Commit") && snum >= 0) { commit_parameters(snum); save_reload(0); + snum = lp_servicenumber(share); } if (cgi_variable("Delete") && snum >= 0) { @@ -918,11 +918,14 @@ static void shares_page(void) } if (cgi_variable("createshare") && (share=cgi_variable("newshare"))) { - load_config(False); - lp_copy_service(GLOBAL_SECTION_SNUM, share); - iNumNonAutoPrintServices = lp_numservices(); - save_reload(0); snum = lp_servicenumber(share); + if (snum < 0) { + load_config(False); + lp_copy_service(GLOBAL_SECTION_SNUM, share); + snum = lp_servicenumber(share); + save_reload(snum); + snum = lp_servicenumber(share); + } } printf("<FORM name=\"swatform\" method=post>\n"); @@ -958,7 +961,6 @@ static void shares_page(void) (share && strcmp(share,s)==0)?"SELECTED":"", utf8_s, utf8_s); SAFE_FREE(utf8_s); - } } printf("</select></td>\n"); @@ -1261,6 +1263,7 @@ static void printers_page(void) save_reload(snum); else save_reload(0); + snum = lp_servicenumber(share); } if (cgi_variable("Delete") && snum >= 0) { @@ -1271,13 +1274,15 @@ static void printers_page(void) } if (cgi_variable("createshare") && (share=cgi_variable("newshare"))) { - load_config(False); - lp_copy_service(GLOBAL_SECTION_SNUM, share); - iNumNonAutoPrintServices = lp_numservices(); - snum = lp_servicenumber(share); - lp_do_parameter(snum, "print ok", "Yes"); - save_reload(0); snum = lp_servicenumber(share); + if (snum < 0 || snum >= iNumNonAutoPrintServices) { + load_config(False); + lp_copy_service(GLOBAL_SECTION_SNUM, share); + snum = lp_servicenumber(share); + lp_do_parameter(snum, "print ok", "Yes"); + save_reload(snum); + snum = lp_servicenumber(share); + } } printf("<FORM name=\"swatform\" method=post>\n"); |