Merge branch 'master' of ssh://git.samba.org/data/git/samba into crypt
authorJelmer Vernooij <jelmer@samba.org>
Sun, 19 Oct 2008 12:27:08 +0000 (14:27 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 19 Oct 2008 12:27:08 +0000 (14:27 +0200)
89 files changed:
lib/crypto/hmacmd5test.c
lib/crypto/md4test.c
lib/crypto/md5test.c
lib/util/debug.c
lib/util/params.c
lib/util/util.c
lib/util/util.h
lib/util/util_str.c
librpc/idl/drsblobs.idl [moved from source4/librpc/idl/drsblobs.idl with 100% similarity]
librpc/idl/drsuapi.idl [moved from source3/librpc/idl/drsuapi.idl with 99% similarity]
librpc/idl/ntsvcs.idl
librpc/ndr/ndr_drsblobs.c [moved from source4/librpc/ndr/ndr_drsblobs.c with 100% similarity]
librpc/ndr/ndr_drsuapi.c [moved from source4/librpc/ndr/ndr_drsuapi.c with 98% similarity]
librpc/ndr/ndr_drsuapi.h [moved from source3/librpc/ndr/ndr_drsuapi.h with 97% similarity]
librpc/tools/ndrdump.c
packaging4/README.Debian [moved from packaging/README.Debian with 100% similarity]
selftest/README [moved from source4/selftest/README with 100% similarity]
selftest/SocketWrapper.pm [moved from source4/selftest/SocketWrapper.pm with 100% similarity]
selftest/Subunit.pm [moved from source4/selftest/Subunit.pm with 100% similarity]
selftest/TODO [moved from source4/selftest/TODO with 100% similarity]
selftest/output/buildfarm.pm [moved from source4/selftest/output/buildfarm.pm with 100% similarity]
selftest/output/html.pm [moved from source4/selftest/output/html.pm with 100% similarity]
selftest/output/plain.pm [moved from source4/selftest/output/plain.pm with 100% similarity]
selftest/output/testresults.css [moved from source4/selftest/output/testresults.css with 100% similarity]
selftest/selftest.pl [moved from source4/selftest/selftest.pl with 98% similarity]
selftest/target/Kvm.pm [moved from source4/selftest/target/Kvm.pm with 100% similarity]
selftest/target/Samba3.pm [moved from source4/selftest/target/Samba3.pm with 100% similarity]
selftest/target/Samba4.pm [moved from source4/selftest/target/Samba4.pm with 100% similarity]
selftest/target/Windows.pm [moved from source4/selftest/target/Windows.pm with 100% similarity]
selftest/test_samba4.pl [moved from source4/selftest/test_samba4.pl with 100% similarity]
selftest/test_subunit.pl [moved from source4/selftest/test_subunit.pl with 100% similarity]
source3/Makefile.in
source3/include/includes.h
source3/include/msdfs.h
source3/include/proto.h
source3/lib/genrand.c
source3/lib/util.c
source3/lib/util_str.c
source3/libads/util.c
source3/libnet/libnet_join.c
source3/librpc/gen_ndr/cli_ntsvcs.c
source3/librpc/gen_ndr/cli_ntsvcs.h
source3/librpc/gen_ndr/drsblobs.h
source3/librpc/gen_ndr/ndr_drsblobs.c
source3/librpc/gen_ndr/ndr_drsblobs.h
source3/librpc/gen_ndr/ndr_drsuapi.h
source3/librpc/gen_ndr/ndr_ntsvcs.c
source3/librpc/gen_ndr/ntsvcs.h
source3/librpc/gen_ndr/srv_ntsvcs.c
source3/librpc/idl/drsblobs.idl [deleted file]
source3/librpc/ndr/ndr_drsuapi.c [deleted file]
source3/libsmb/trusts_util.c
source3/printing/nt_printing.c
source3/printing/pcap.c
source3/printing/print_aix.c
source3/smbd/reply.c
source3/smbd/server.c
source3/utils/net_ads.c
source3/utils/net_rpc_join.c
source3/utils/net_rpc_printer.c
source3/utils/nmblookup.c
source4/Makefile
source4/dsdb/repl/drepl_out_helpers.c
source4/dsdb/samdb/ldb_modules/extended_dn.c
source4/dsdb/samdb/ldb_modules/password_hash.c
source4/dsdb/schema/schema_init.c
source4/dsdb/schema/schema_set.c
source4/kdc/hdb-samba4.c
source4/lib/registry/util.c
source4/libcli/raw/rawfile.c
source4/libnet/libnet_become_dc.c
source4/libnet/libnet_join.c
source4/libnet/libnet_unbecome_dc.c
source4/librpc/config.mk
source4/librpc/idl/drsuapi.idl [deleted file]
source4/librpc/ndr/ndr_drsuapi.h [deleted file]
source4/rpc_server/drsuapi/dcesrv_drsuapi.c
source4/selftest/config.mk
source4/selftest/knownfail [moved from source4/samba4-knownfail with 100% similarity]
source4/selftest/quick [moved from source4/samba4-quick with 100% similarity]
source4/selftest/skip [moved from source4/samba4-skip with 100% similarity]
source4/selftest/slow [moved from source4/samba4-slow with 100% similarity]
source4/selftest/tests.sh [moved from source4/selftest/samba4_tests.sh with 99% similarity]
source4/torture/auth/ntlmssp.c
source4/torture/ndr/ndr.c
source4/torture/rpc/drsuapi.c
source4/torture/rpc/drsuapi_cracknames.c
source4/torture/rpc/dssync.c
source4/utils/ntlm_auth.c

index 0a98404eda3a53b144e0d2ed12038717e787221b..77f305a5d39459a0b81853e213a303e854dcc5c5 100644 (file)
@@ -41,34 +41,37 @@ bool torture_local_crypto_hmacmd5(struct torture_context *torture)
                DATA_BLOB md5;
        } testarray[8];
 
+       TALLOC_CTX *tctx = talloc_new(torture);
+       if (!tctx) { return false; };
+
        testarray[0].key        = data_blob_repeat_byte(0x0b, 16);
        testarray[0].data       = data_blob_string_const("Hi There");
-       testarray[0].md5        = strhex_to_data_blob("9294727a3638bb1c13f48ef8158bfc9d");
+       testarray[0].md5        = strhex_to_data_blob(tctx, "9294727a3638bb1c13f48ef8158bfc9d");
 
        testarray[1].key        = data_blob_string_const("Jefe");
        testarray[1].data       = data_blob_string_const("what do ya want for nothing?");
-       testarray[1].md5        = strhex_to_data_blob("750c783e6ab0b503eaa86e310a5db738");
+       testarray[1].md5        = strhex_to_data_blob(tctx, "750c783e6ab0b503eaa86e310a5db738");
 
        testarray[2].key        = data_blob_repeat_byte(0xaa, 16);
        testarray[2].data       = data_blob_repeat_byte(0xdd, 50);
-       testarray[2].md5        = strhex_to_data_blob("56be34521d144c88dbb8c733f0e8b3f6");
+       testarray[2].md5        = strhex_to_data_blob(tctx, "56be34521d144c88dbb8c733f0e8b3f6");
 
-       testarray[3].key        = strhex_to_data_blob("0102030405060708090a0b0c0d0e0f10111213141516171819");
+       testarray[3].key        = strhex_to_data_blob(tctx, "0102030405060708090a0b0c0d0e0f10111213141516171819");
        testarray[3].data       = data_blob_repeat_byte(0xcd, 50);
-       testarray[3].md5        = strhex_to_data_blob("697eaf0aca3a3aea3a75164746ffaa79");
+       testarray[3].md5        = strhex_to_data_blob(tctx, "697eaf0aca3a3aea3a75164746ffaa79");
 
        testarray[4].key        = data_blob_repeat_byte(0x0c, 16);
        testarray[4].data       = data_blob_string_const("Test With Truncation");
-       testarray[4].md5        = strhex_to_data_blob("56461ef2342edc00f9bab995690efd4c");
+       testarray[4].md5        = strhex_to_data_blob(tctx, "56461ef2342edc00f9bab995690efd4c");
 
        testarray[5].key        = data_blob_repeat_byte(0xaa, 80);
        testarray[5].data       = data_blob_string_const("Test Using Larger Than Block-Size Key - Hash Key First");
-       testarray[5].md5        = strhex_to_data_blob("6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd");
+       testarray[5].md5        = strhex_to_data_blob(tctx, "6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd");
 
        testarray[6].key        = data_blob_repeat_byte(0xaa, 80);
        testarray[6].data       = data_blob_string_const("Test Using Larger Than Block-Size Key "
                                                         "and Larger Than One Block-Size Data");
-       testarray[6].md5        = strhex_to_data_blob("6f630fad67cda0ee1fb1f562db3aa53e");
+       testarray[6].md5        = strhex_to_data_blob(tctx, "6f630fad67cda0ee1fb1f562db3aa53e");
 
        testarray[7].key        = data_blob(NULL, 0);
 
@@ -93,6 +96,6 @@ bool torture_local_crypto_hmacmd5(struct torture_context *torture)
                        ret = false;
                }
        }
-
+       talloc_free(tctx);
        return ret;
 }
index dddf9e61a011707bbb3d9102fffffbcae8d429ed..a6080cff823390fa0eb2d3c10fdab95b7320ad61 100644 (file)
@@ -64,7 +64,7 @@ bool torture_local_crypto_md4(struct torture_context *torture)
                DATA_BLOB md4blob;
 
                data = data_blob_string_const(testarray[i].data);
-               md4blob  = strhex_to_data_blob(testarray[i].md4);
+               md4blob  = strhex_to_data_blob(NULL, testarray[i].md4);
 
                mdfour(md4, data.data, data.length);
 
index 1244dca75377e3a79155d447cf67068227a80c48..7223af211433dc4a25ed22d27863e4ad3540b493 100644 (file)
@@ -70,7 +70,7 @@ bool torture_local_crypto_md5(struct torture_context *torture)
                DATA_BLOB md5blob;
 
                data = data_blob_string_const(testarray[i].data);
-               md5blob  = strhex_to_data_blob(testarray[i].md5);
+               md5blob  = strhex_to_data_blob(NULL, testarray[i].md5);
 
                MD5Init(&ctx);
                MD5Update(&ctx, data.data, data.length);
index b6edb908c7309edb9cf2890fd05bd9e7f9a33ba1..faec52aec8244d8d8a8b8f048e063241fe39c40d 100644 (file)
  */
 int _debug_level = 0;
 _PUBLIC_ int *debug_level = &_debug_level;
-int *DEBUGLEVEL_CLASS = NULL; /* For samba 3 */
+static int debug_all_class_hack = 1;
+int *DEBUGLEVEL_CLASS = &debug_all_class_hack; /* For samba 3 */
+static bool debug_all_class_isset_hack = true;
+bool    *DEBUGLEVEL_CLASS_ISSET = &debug_all_class_isset_hack; /* For samba 3 */
 
 /* the registered mutex handlers */
 static struct {
index c03edec272cdfbc4aefb673358be754e82b38ffd..7af7ac7348169cd95ef3ccfe7af11affee46ae3c 100644 (file)
@@ -105,11 +105,6 @@ static int mygetc(myFILE *f)
        return (int)( *(f->p++) & 0x00FF );
 }
 
-static void myfile_close(myFILE *f)
-{
-       talloc_free(f);
-}
-
 /* -------------------------------------------------------------------------- **
  * Functions...
  */
@@ -565,7 +560,7 @@ bool pm_process( const char *FileName,
     if( NULL == InFile->bufr )
       {
       DEBUG(0,("%s memory allocation failure.\n", func));
-      myfile_close(InFile);
+      talloc_free(InFile);
       return( false );
       }
     result = Parse( InFile, sfunc, pfunc, userdata );
@@ -573,7 +568,7 @@ bool pm_process( const char *FileName,
     InFile->bSize = 0;
     }
 
-  myfile_close(InFile);
+  talloc_free(InFile);
 
   if( !result )                               /* Generic failure. */
     {
index fc55629c4c1f1bfc4fd0d4908b36a52c06e8ade5..1e7991dbf13cbbe6dd86be6497864027c52da51e 100644 (file)
@@ -27,6 +27,7 @@
 #include "system/locale.h"
 #undef malloc
 #undef strcasecmp
+#undef strncasecmp
 #undef strdup
 #undef realloc
 
@@ -559,3 +560,280 @@ _PUBLIC_ void *talloc_check_name_abort(const void *ptr, const char *name)
         return NULL;
 }
 
+/**
+ Trim the specified elements off the front and back of a string.
+**/
+_PUBLIC_ bool trim_string(char *s, const char *front, const char *back)
+{
+       bool ret = false;
+       size_t front_len;
+       size_t back_len;
+       size_t len;
+
+       /* Ignore null or empty strings. */
+       if (!s || (s[0] == '\0'))
+               return false;
+
+       front_len       = front? strlen(front) : 0;
+       back_len        = back? strlen(back) : 0;
+
+       len = strlen(s);
+
+       if (front_len) {
+               while (len && strncmp(s, front, front_len)==0) {
+                       /* Must use memmove here as src & dest can
+                        * easily overlap. Found by valgrind. JRA. */
+                       memmove(s, s+front_len, (len-front_len)+1);
+                       len -= front_len;
+                       ret=true;
+               }
+       }
+       
+       if (back_len) {
+               while ((len >= back_len) && strncmp(s+len-back_len,back,back_len)==0) {
+                       s[len-back_len]='\0';
+                       len -= back_len;
+                       ret=true;
+               }
+       }
+       return ret;
+}
+
+/**
+ Find the number of 'c' chars in a string
+**/
+_PUBLIC_ _PURE_ size_t count_chars(const char *s, char c)
+{
+       size_t count = 0;
+
+       while (*s) {
+               if (*s == c) count++;
+               s ++;
+       }
+
+       return count;
+}
+
+/**
+ Routine to get hex characters and turn them into a 16 byte array.
+ the array can be variable length, and any non-hex-numeric
+ characters are skipped.  "0xnn" or "0Xnn" is specially catered
+ for.
+
+ valid examples: "0A5D15"; "0x15, 0x49, 0xa2"; "59\ta9\te3\n"
+
+
+**/
+_PUBLIC_ size_t strhex_to_str(char *p, size_t p_len, const char *strhex, size_t strhex_len)
+{
+       size_t i;
+       size_t num_chars = 0;
+       uint8_t   lonybble, hinybble;
+       const char     *hexchars = "0123456789ABCDEF";
+       char           *p1 = NULL, *p2 = NULL;
+
+       for (i = 0; i < strhex_len && strhex[i] != 0; i++) {
+               if (strncasecmp(hexchars, "0x", 2) == 0) {
+                       i++; /* skip two chars */
+                       continue;
+               }
+
+               if (!(p1 = strchr(hexchars, toupper((unsigned char)strhex[i]))))
+                       break;
+
+               i++; /* next hex digit */
+
+               if (!(p2 = strchr(hexchars, toupper((unsigned char)strhex[i]))))
+                       break;
+
+               /* get the two nybbles */
+               hinybble = PTR_DIFF(p1, hexchars);
+               lonybble = PTR_DIFF(p2, hexchars);
+
+               if (num_chars >= p_len) {
+                       break;
+               }
+
+               p[num_chars] = (hinybble << 4) | lonybble;
+               num_chars++;
+
+               p1 = NULL;
+               p2 = NULL;
+       }
+       return num_chars;
+}
+
+/** 
+ * Parse a hex string and return a data blob. 
+ */
+_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) 
+{
+       DATA_BLOB ret_blob = data_blob_talloc(mem_ctx, NULL, strlen(strhex)/2+1);
+
+       ret_blob.length = strhex_to_str((char *)ret_blob.data, ret_blob.length,
+                                       strhex,
+                                       strlen(strhex));
+
+       return ret_blob;
+}
+
+
+/**
+ * Routine to print a buffer as HEX digits, into an allocated string.
+ */
+_PUBLIC_ void hex_encode(const unsigned char *buff_in, size_t len, char **out_hex_buffer)
+{
+       int i;
+       char *hex_buffer;
+
+       *out_hex_buffer = malloc_array_p(char, (len*2)+1);
+       hex_buffer = *out_hex_buffer;
+
+       for (i = 0; i < len; i++)
+               slprintf(&hex_buffer[i*2], 3, "%02X", buff_in[i]);
+}
+
+/**
+ * talloc version of hex_encode()
+ */
+_PUBLIC_ char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len)
+{
+       int i;
+       char *hex_buffer;
+
+       hex_buffer = talloc_array(mem_ctx, char, (len*2)+1);
+
+       for (i = 0; i < len; i++)
+               slprintf(&hex_buffer[i*2], 3, "%02X", buff_in[i]);
+
+       return hex_buffer;
+}
+
+/**
+ Unescape a URL encoded string, in place.
+**/
+
+_PUBLIC_ void rfc1738_unescape(char *buf)
+{
+       char *p=buf;
+
+       while ((p=strchr(p,'+')))
+               *p = ' ';
+
+       p = buf;
+
+       while (p && *p && (p=strchr(p,'%'))) {
+               int c1 = p[1];
+               int c2 = p[2];
+
+               if (c1 >= '0' && c1 <= '9')
+                       c1 = c1 - '0';
+               else if (c1 >= 'A' && c1 <= 'F')
+                       c1 = 10 + c1 - 'A';
+               else if (c1 >= 'a' && c1 <= 'f')
+                       c1 = 10 + c1 - 'a';
+               else {p++; continue;}
+
+               if (c2 >= '0' && c2 <= '9')
+                       c2 = c2 - '0';
+               else if (c2 >= 'A' && c2 <= 'F')
+                       c2 = 10 + c2 - 'A';
+               else if (c2 >= 'a' && c2 <= 'f')
+                       c2 = 10 + c2 - 'a';
+               else {p++; continue;}
+                       
+               *p = (c1<<4) | c2;
+
+               memmove(p+1, p+3, strlen(p+3)+1);
+               p++;
+       }
+}
+
+/**
+  varient of strcmp() that handles NULL ptrs
+**/
+_PUBLIC_ int strcmp_safe(const char *s1, const char *s2)
+{
+       if (s1 == s2) {
+               return 0;
+       }
+       if (s1 == NULL || s2 == NULL) {
+               return s1?-1:1;
+       }
+       return strcmp(s1, s2);
+}
+
+
+/**
+return the number of bytes occupied by a buffer in ASCII format
+the result includes the null termination
+limited by 'n' bytes
+**/
+_PUBLIC_ size_t ascii_len_n(const char *src, size_t n)
+{
+       size_t len;
+
+       len = strnlen(src, n);
+       if (len+1 <= n) {
+               len += 1;
+       }
+
+       return len;
+}
+
+/**
+ Set a boolean variable from the text value stored in the passed string.
+ Returns true in success, false if the passed string does not correctly 
+ represent a boolean.
+**/
+
+_PUBLIC_ bool set_boolean(const char *boolean_string, bool *boolean)
+{
+       if (strwicmp(boolean_string, "yes") == 0 ||
+           strwicmp(boolean_string, "true") == 0 ||
+           strwicmp(boolean_string, "on") == 0 ||
+           strwicmp(boolean_string, "1") == 0) {
+               *boolean = true;
+               return true;
+       } else if (strwicmp(boolean_string, "no") == 0 ||
+                  strwicmp(boolean_string, "false") == 0 ||
+                  strwicmp(boolean_string, "off") == 0 ||
+                  strwicmp(boolean_string, "0") == 0) {
+               *boolean = false;
+               return true;
+       }
+       return false;
+}
+
+/**
+return the number of bytes occupied by a buffer in CH_UTF16 format
+the result includes the null termination
+**/
+_PUBLIC_ size_t utf16_len(const void *buf)
+{
+       size_t len;
+
+       for (len = 0; SVAL(buf,len); len += 2) ;
+
+       return len + 2;
+}
+
+/**
+return the number of bytes occupied by a buffer in CH_UTF16 format
+the result includes the null termination
+limited by 'n' bytes
+**/
+_PUBLIC_ size_t utf16_len_n(const void *src, size_t n)
+{
+       size_t len;
+
+       for (len = 0; (len+2 < n) && SVAL(src, len); len += 2) ;
+
+       if (len+2 <= n) {
+               len += 2;
+       }
+
+       return len;
+}
+
+
index 47adf067f0a8c6e251f91fd46a1393a186b3e6e4..4c9a2230937a0b0270c13e6d94d1e31eed57e867 100644 (file)
@@ -236,12 +236,12 @@ _PUBLIC_ char *safe_strcat(char *dest, const char *src, size_t maxlength);
 
 
 **/
-_PUBLIC_ size_t strhex_to_str(char *p, size_t len, const char *strhex);
+_PUBLIC_ size_t strhex_to_str(char *p, size_t p_len, const char *strhex, size_t strhex_len);
 
 /** 
  * Parse a hex string and return a data blob. 
  */
-_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(const char *strhex) ;
+_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) ;
 
 /**
  * Routine to print a buffer as HEX digits, into an allocated string.
index bf4ae4d36e0ad5f0c299b624e351a50904756311..7dcefc90ddab705b87ce0d71ede92f180cc31530 100644 (file)
 */
 
 #include "includes.h"
-#include "libcli/raw/smb.h"
 #include "system/locale.h"
+#undef strncasecmp
+#undef strcasemp
 
 /**
  * @file
  * @brief String utilities.
  **/
 
-
-/**
- Trim the specified elements off the front and back of a string.
-**/
-_PUBLIC_ bool trim_string(char *s, const char *front, const char *back)
-{
-       bool ret = false;
-       size_t front_len;
-       size_t back_len;
-       size_t len;
-
-       /* Ignore null or empty strings. */
-       if (!s || (s[0] == '\0'))
-               return false;
-
-       front_len       = front? strlen(front) : 0;
-       back_len        = back? strlen(back) : 0;
-
-       len = strlen(s);
-
-       if (front_len) {
-               while (len && strncmp(s, front, front_len)==0) {
-                       /* Must use memmove here as src & dest can
-                        * easily overlap. Found by valgrind. JRA. */
-                       memmove(s, s+front_len, (len-front_len)+1);
-                       len -= front_len;
-                       ret=true;
-               }
-       }
-       
-       if (back_len) {
-               while ((len >= back_len) && strncmp(s+len-back_len,back,back_len)==0) {
-                       s[len-back_len]='\0';
-                       len -= back_len;
-                       ret=true;
-               }
-       }
-       return ret;
-}
-
-/**
- Find the number of 'c' chars in a string
-**/
-_PUBLIC_ _PURE_ size_t count_chars(const char *s, char c)
-{
-       size_t count = 0;
-
-       while (*s) {
-               if (*s == c) count++;
-               s ++;
-       }
-
-       return count;
-}
-
-
-
 /**
  Safe string copy into a known length string. maxlength does not
  include the terminating zero.
@@ -168,137 +112,6 @@ _PUBLIC_ char *safe_strcat(char *dest, const char *src, size_t maxlength)
        return dest;
 }
 
-/**
- Routine to get hex characters and turn them into a 16 byte array.
- the array can be variable length, and any non-hex-numeric
- characters are skipped.  "0xnn" or "0Xnn" is specially catered
- for.
-
- valid examples: "0A5D15"; "0x15, 0x49, 0xa2"; "59\ta9\te3\n"
-
-
-**/
-_PUBLIC_ size_t strhex_to_str(char *p, size_t len, const char *strhex)
-{
-       size_t i;
-       size_t num_chars = 0;
-       uint8_t   lonybble, hinybble;
-       const char     *hexchars = "0123456789ABCDEF";
-       char           *p1 = NULL, *p2 = NULL;
-
-       for (i = 0; i < len && strhex[i] != 0; i++) {
-               if (strncasecmp(hexchars, "0x", 2) == 0) {
-                       i++; /* skip two chars */
-                       continue;
-               }
-
-               if (!(p1 = strchr(hexchars, toupper((unsigned char)strhex[i]))))
-                       break;
-
-               i++; /* next hex digit */
-
-               if (!(p2 = strchr(hexchars, toupper((unsigned char)strhex[i]))))
-                       break;
-
-               /* get the two nybbles */
-               hinybble = PTR_DIFF(p1, hexchars);
-               lonybble = PTR_DIFF(p2, hexchars);
-
-               p[num_chars] = (hinybble << 4) | lonybble;
-               num_chars++;
-
-               p1 = NULL;
-               p2 = NULL;
-       }
-       return num_chars;
-}
-
-/** 
- * Parse a hex string and return a data blob. 
- */
-_PUBLIC_ _PURE_ DATA_BLOB strhex_to_data_blob(const char *strhex) 
-{
-       DATA_BLOB ret_blob = data_blob(NULL, strlen(strhex)/2+1);
-
-       ret_blob.length = strhex_to_str((char *)ret_blob.data,  
-                                       strlen(strhex), 
-                                       strhex);
-
-       return ret_blob;
-}
-
-
-/**
- * Routine to print a buffer as HEX digits, into an allocated string.
- */
-_PUBLIC_ void hex_encode(const unsigned char *buff_in, size_t len, char **out_hex_buffer)
-{
-       int i;
-       char *hex_buffer;
-
-       *out_hex_buffer = malloc_array_p(char, (len*2)+1);
-       hex_buffer = *out_hex_buffer;
-
-       for (i = 0; i < len; i++)
-               slprintf(&hex_buffer[i*2], 3, "%02X", buff_in[i]);
-}
-
-/**
- * talloc version of hex_encode()
- */
-_PUBLIC_ char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len)
-{
-       int i;
-       char *hex_buffer;
-
-       hex_buffer = talloc_array(mem_ctx, char, (len*2)+1);
-
-       for (i = 0; i < len; i++)
-               slprintf(&hex_buffer[i*2], 3, "%02X", buff_in[i]);
-
-       return hex_buffer;
-}
-
-/**
- Unescape a URL encoded string, in place.
-**/
-
-_PUBLIC_ void rfc1738_unescape(char *buf)
-{
-       char *p=buf;
-
-       while ((p=strchr(p,'+')))
-               *p = ' ';
-
-       p = buf;
-
-       while (p && *p && (p=strchr(p,'%'))) {
-               int c1 = p[1];
-               int c2 = p[2];
-
-               if (c1 >= '0' && c1 <= '9')
-                       c1 = c1 - '0';
-               else if (c1 >= 'A' && c1 <= 'F')
-                       c1 = 10 + c1 - 'A';
-               else if (c1 >= 'a' && c1 <= 'f')
-                       c1 = 10 + c1 - 'a';
-               else {p++; continue;}
-
-               if (c2 >= '0' && c2 <= '9')
-                       c2 = c2 - '0';
-               else if (c2 >= 'A' && c2 <= 'F')
-                       c2 = 10 + c2 - 'A';
-               else if (c2 >= 'a' && c2 <= 'f')
-                       c2 = 10 + c2 - 'a';
-               else {p++; continue;}
-                       
-               *p = (c1<<4) | c2;
-
-               memmove(p+1, p+3, strlen(p+3)+1);
-               p++;
-       }
-}
-
 #ifdef VALGRIND
 size_t valgrind_strlen(const char *s)
 {
@@ -367,109 +180,6 @@ _PUBLIC_ bool add_string_to_array(TALLOC_CTX *mem_ctx,
        return true;
 }
 
-
-
-/**
-  varient of strcmp() that handles NULL ptrs
-**/
-_PUBLIC_ int strcmp_safe(const char *s1, const char *s2)
-{
-       if (s1 == s2) {
-               return 0;
-       }
-       if (s1 == NULL || s2 == NULL) {
-               return s1?-1:1;
-       }
-       return strcmp(s1, s2);
-}
-
-
-/**
-return the number of bytes occupied by a buffer in ASCII format
-the result includes the null termination
-limited by 'n' bytes
-**/
-_PUBLIC_ size_t ascii_len_n(const char *src, size_t n)
-{
-       size_t len;
-
-       len = strnlen(src, n);
-       if (len+1 <= n) {
-               len += 1;
-       }
-
-       return len;
-}
-
-
-/**
- Return a string representing a CIFS attribute for a file.
-**/
-_PUBLIC_ char *attrib_string(TALLOC_CTX *mem_ctx, uint32_t attrib)
-{
-       int i, len;
-       const struct {
-               char c;
-               uint16_t attr;
-       } attr_strs[] = {
-               {'V', FILE_ATTRIBUTE_VOLUME},
-               {'D', FILE_ATTRIBUTE_DIRECTORY},
-               {'A', FILE_ATTRIBUTE_ARCHIVE},
-               {'H', FILE_ATTRIBUTE_HIDDEN},
-               {'S', FILE_ATTRIBUTE_SYSTEM},
-               {'N', FILE_ATTRIBUTE_NORMAL},
-               {'R', FILE_ATTRIBUTE_READONLY},
-               {'d', FILE_ATTRIBUTE_DEVICE},
-               {'t', FILE_ATTRIBUTE_TEMPORARY},
-               {'s', FILE_ATTRIBUTE_SPARSE},
-               {'r', FILE_ATTRIBUTE_REPARSE_POINT},
-               {'c', FILE_ATTRIBUTE_COMPRESSED},
-               {'o', FILE_ATTRIBUTE_OFFLINE},
-               {'n', FILE_ATTRIBUTE_NONINDEXED},
-               {'e', FILE_ATTRIBUTE_ENCRYPTED}
-       };
-       char *ret;
-
-       ret = talloc_array(mem_ctx, char, ARRAY_SIZE(attr_strs)+1);
-       if (!ret) {
-               return NULL;
-       }
-
-       for (len=i=0; i<ARRAY_SIZE(attr_strs); i++) {
-               if (attrib & attr_strs[i].attr) {
-                       ret[len++] = attr_strs[i].c;
-               }
-       }
-
-       ret[len] = 0;
-
-       return ret;
-}
-
-/**
- Set a boolean variable from the text value stored in the passed string.
- Returns true in success, false if the passed string does not correctly 
- represent a boolean.
-**/
-
-_PUBLIC_ bool set_boolean(const char *boolean_string, bool *boolean)
-{
-       if (strwicmp(boolean_string, "yes") == 0 ||
-           strwicmp(boolean_string, "true") == 0 ||
-           strwicmp(boolean_string, "on") == 0 ||
-           strwicmp(boolean_string, "1") == 0) {
-               *boolean = true;
-               return true;
-       } else if (strwicmp(boolean_string, "no") == 0 ||
-                  strwicmp(boolean_string, "false") == 0 ||
-                  strwicmp(boolean_string, "off") == 0 ||
-                  strwicmp(boolean_string, "0") == 0) {
-               *boolean = false;
-               return true;
-       }
-       return false;
-}
-
 /**
  * Parse a string containing a boolean value.
  *
@@ -557,44 +267,6 @@ _PUBLIC_ bool conv_str_u64(const char * str, uint64_t * val)
        return true;
 }
 
-/**
-return the number of bytes occupied by a buffer in CH_UTF16 format
-the result includes the null termination
-**/
-_PUBLIC_ size_t utf16_len(const void *buf)
-{
-       size_t len;
-
-       for (len = 0; SVAL(buf,len); len += 2) ;
-
-       return len + 2;
-}
-
-/**
-return the number of bytes occupied by a buffer in CH_UTF16 format
-the result includes the null termination
-limited by 'n' bytes
-**/
-_PUBLIC_ size_t utf16_len_n(const void *src, size_t n)
-{
-       size_t len;
-
-       for (len = 0; (len+2 < n) && SVAL(src, len); len += 2) ;
-
-       if (len+2 <= n) {
-               len += 2;
-       }
-
-       return len;
-}
-
-_PUBLIC_ size_t ucs2_align(const void *base_ptr, const void *p, int flags)
-{
-       if (flags & (STR_NOALIGN|STR_ASCII))
-               return 0;
-       return PTR_DIFF(p, base_ptr) & 1;
-}
-
 /**
 Do a case-insensitive, whitespace-ignoring string compare.
 **/
@@ -625,17 +297,6 @@ _PUBLIC_ int strwicmp(const char *psz1, const char *psz2)
        return (*psz1 - *psz2);
 }
 
-/**
- String replace.
-**/
-_PUBLIC_ void string_replace(char *s, char oldc, char newc)
-{
-       while (*s) {
-               if (*s == oldc) *s = newc;
-               s++;
-       }
-}
-
 /**
  * Compare 2 strings.
  *
@@ -650,3 +311,23 @@ _PUBLIC_ bool strequal(const char *s1, const char *s2)
   
        return strcasecmp(s1,s2) == 0;
 }
+
+_PUBLIC_ size_t ucs2_align(const void *base_ptr, const void *p, int flags)
+{
+       if (flags & (STR_NOALIGN|STR_ASCII))
+               return 0;
+       return PTR_DIFF(p, base_ptr) & 1;
+}
+
+/**
+ String replace.
+**/
+_PUBLIC_ void string_replace(char *s, char oldc, char newc)
+{
+       while (*s) {
+               if (*s == oldc) *s = newc;
+               s++;
+       }
+}
+
+
similarity index 99%
rename from source3/librpc/idl/drsuapi.idl
rename to librpc/idl/drsuapi.idl
index 9d7c9d97899e521dadc101d4812fc9f3e7566223..e4b5dc1fd9a99fe139c449e3fadf956831236c7b 100644 (file)
@@ -2,13 +2,13 @@
 
 import "security.idl", "misc.idl", "samr.idl";
 
-[ 
+[
   uuid("e3514235-4b06-11d1-ab04-00c04fc2dcd2"),
   version(4.0),
   endpoint("ncacn_np:[\\pipe\\lsass]","ncacn_np:[\\pipe\\protected_storage]", "ncacn_ip_tcp:", "ncalrpc:"),
   authservice("ldap"),
   helpstring("Active Directory Replication"),
-  helper("librpc/ndr/ndr_drsuapi.h"),
+  helper("../librpc/ndr/ndr_drsuapi.h"),
   pointer_default(unique)
 ]
 interface drsuapi
@@ -115,11 +115,11 @@ interface drsuapi
        } drsuapi_DsBindInfoCtr;
 
        /* this is a magic guid you need to pass to DsBind to make drsuapi_DsWriteAccountSpn() work
-        * 
+        *
         * maybe the bind_guid could also be the invocation_id see drsuapi_DsReplicaConnection04
         */
        const char *DRSUAPI_DS_BIND_GUID = "e24d201a-4fd6-11d1-a3da-0000f875ae0d";
-       /* 
+       /*
         * this magic guid are needed to fetch the whole tree with drsuapi_DsGetNCChanges()
         * as administrator and this values are also used in the destination_dsa_guid field
         * of drsuapi_DsGetNCChangesReq5/8 and the source_dsa_guid is zero.
@@ -232,7 +232,7 @@ interface drsuapi
                DRSUAPI_DS_REPLICA_NEIGHBOUR_PREEMPTED                          = 0x01000000,
                DRSUAPI_DS_REPLICA_NEIGHBOUR_IGNORE_CHANGE_NOTIFICATIONS        = 0x04000000,
                DRSUAPI_DS_REPLICA_NEIGHBOUR_DISABLE_SCHEDULED_SYNC             = 0x08000000,
-               /* 
+               /*
                 * the following NOTE applies to DsGetNCChangesRequest5:
                 *  - the data is only compressed when 10 or more objects are replicated
                 *  - but there could also be a size limit of 35 KBytes or something like that
@@ -454,7 +454,7 @@ interface drsuapi
                DRSUAPI_ATTRIBUTE_objectCategory                = 0x0009030e,
                DRSUAPI_ATTRIBUTE_gPLink                        = 0x0009037b,
                DRSUAPI_ATTRIBUTE_msDS_Behavior_Version         = 0x000905b3,
-               DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber         = 0x000906f6,           
+               DRSUAPI_ATTRIBUTE_msDS_KeyVersionNumber         = 0x000906f6,
                DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs             = 0x0009071c,
                DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs             = 0x0009072c
        } drsuapi_DsAttributeId;
@@ -1144,7 +1144,7 @@ interface drsuapi
 
        /*
         * please note the the current idl
-        * for DsAddEntry does only parse 
+        * for DsAddEntry does only parse
         * what I saw between 2 w2k3 boxes
         * in my dssync experiments I got some other replies
         * so all I want to say is that this is very incomplete yet...
index cfafbead6c18e7f867575aa35941e15907f6dba0..809ead90c3ceba306dcfa08d59407716c840ad70 100644 (file)
@@ -67,7 +67,12 @@ interface ntsvcs
        /******************/
        /* Function: 0x0a */
 
-       [todo] WERROR PNP_GetDeviceList();
+       [todo] WERROR PNP_GetDeviceList(
+               [in,unique] [string,charset(UTF16)] uint16 *filter,
+               [out,ref] [size_is(*length),length_is(*length)] uint16 *buffer,
+               [in,out,ref] uint32 *length,
+               [in] uint32 flags
+               );
 
        /******************/
        /* Function: 0x0b */
@@ -91,11 +96,11 @@ interface ntsvcs
        WERROR PNP_GetDeviceRegProp(
                [in,ref] [string,charset(UTF16)] uint16 *devicepath,
                [in] uint32 property,
-               [in,out,ref] uint32 *unknown1,
+               [in,out,ref] uint32 *reg_data_type,
                [out,ref] [size_is(*buffer_size)] [length_is(*buffer_size)] uint8 *buffer,
                [in,out,ref] uint32 *buffer_size,
                [in,out,ref] uint32 *needed,
-               [in] uint32 unknown3
+               [in] uint32 flags
                );
 
        /******************/
similarity index 98%
rename from source4/librpc/ndr/ndr_drsuapi.c
rename to librpc/ndr/ndr_drsuapi.c
index cb022d2ad399ae58eb1a772746dda4171173f0e2..4d1ae8b163d28d59d3ef4544243020e7f7f9efaa 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
 
    routines for printing some linked list structs in DRSUAPI
@@ -9,12 +9,12 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 #include "librpc/gen_ndr/ndr_misc.h"
 #include "../lib/util/asn1.h"
 #include "librpc/ndr/ndr_compression.h"
+/* We don't need multibyte if we're just comparing to 'ff' */
+#undef strncasecmp
 
-void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name, 
+void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name,
                                               const struct drsuapi_DsReplicaObjectListItem *r)
 {
        ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectListItem");
@@ -92,7 +94,7 @@ enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_fl
                        DATA_BLOB blob;
 
                        if (strncasecmp("ff", r->oid, 2) == 0) {
-                               blob = strhex_to_data_blob(r->oid);
+                               blob = strhex_to_data_blob(ndr, r->oid);
                                if (!blob.data) {
                                        return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT,
                                                              "HEX String Conversion Error: %s\n",
@@ -101,7 +103,6 @@ enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_fl
                        } else {
                                _OID_PUSH_CHECK(ber_write_OID_String(&blob, r->oid));
                        }
-                       talloc_steal(ndr, blob.data);
 
                        NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length));
                        NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, blob.data, blob.length));
@@ -165,7 +166,7 @@ size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags)
        if (!oid) return 0;
 
        if (strncasecmp("ff", oid, 2) == 0) {
-               _blob = strhex_to_data_blob(oid);
+               _blob = strhex_to_data_blob(NULL, oid);
                if (_blob.data) {
                        ret = _blob.length;
                }
similarity index 97%
rename from source3/librpc/ndr/ndr_drsuapi.h
rename to librpc/ndr/ndr_drsuapi.h
index c663eadd7ac63fb8641dcf20a3fd5134312d2e72..12c2c78bdea8fa1813cd5c05ca036c1f06c8b3b0 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
 
    routines for printing some linked list structs in DRSUAPI
@@ -9,12 +9,12 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -22,7 +22,7 @@
 #ifndef _LIBRPC_NDR_NDR_DRSUAPI_H
 #define _LIBRPC_NDR_NDR_DRSUAPI_H
 
-void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name, 
+void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name,
                                               const struct drsuapi_DsReplicaObjectListItem *r);
 
 void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name,
index 3ecf10a167bd53edff17e0e98856a6bf8c6ac90f..b24868eaced3a9c8b79aa040cef207d648b27d9b 100644 (file)
@@ -26,8 +26,6 @@
 #include "librpc/ndr/libndr.h"
 #include "librpc/ndr/ndr_table.h"
 #include "param/param.h"
-#else
-#define _NORETURN_
 #endif
 
 static const struct ndr_interface_call *find_function(
similarity index 100%
rename from source4/selftest/README
rename to selftest/README
similarity index 100%
rename from source4/selftest/TODO
rename to selftest/TODO
similarity index 98%
rename from source4/selftest/selftest.pl
rename to selftest/selftest.pl
index 92aa67e8d3e2f74a68c6a1ab3b05a59f769fedb7..1477d10d469bb590bb6ed4dfc552f2a54cdd9389 100755 (executable)
@@ -405,8 +405,8 @@ if (defined($ENV{RUN_FROM_BUILD_FARM}) and
 
 my $tls_enabled = not $opt_quick;
 $ENV{TLS_ENABLED} = ($tls_enabled?"yes":"no");
-$ENV{LDB_MODULES_PATH} = "$old_pwd/bin/modules/ldb";
-$ENV{LD_SAMBA_MODULE_PATH} = "$old_pwd/bin/modules";
+$ENV{LDB_MODULES_PATH} = "$old_pwd/source4/bin/modules/ldb";
+$ENV{LD_SAMBA_MODULE_PATH} = "$old_pwd/source4/bin/modules";
 sub prefix_pathvar($$)
 {
        my ($name, $newpath) = @_;
@@ -416,8 +416,8 @@ sub prefix_pathvar($$)
                $ENV{$name} = $newpath;
        }
 }
-prefix_pathvar("PKG_CONFIG_PATH", "$old_pwd/bin/pkgconfig");
-prefix_pathvar("PYTHONPATH", "$old_pwd/bin/python");
+prefix_pathvar("PKG_CONFIG_PATH", "$old_pwd/source4/bin/pkgconfig");
+prefix_pathvar("PYTHONPATH", "$old_pwd/source4/bin/python");
 
 if ($opt_socket_wrapper_keep_pcap) {
        # Socket wrapper keep pcap implies socket wrapper pcap
index 1a607c463df7b9d8bcda10cdc200d26f8530abb5..12d37ce6b03e58e3e1c3f66942f9f9178bacfa6b 100644 (file)
@@ -196,7 +196,7 @@ TORTURE_PROGS = bin/smbtorture@EXEEXT@ bin/msgtest@EXEEXT@ \
        bin/locktest2@EXEEXT@ bin/nsstest@EXEEXT@ bin/vfstest@EXEEXT@ \
        bin/pdbtest@EXEEXT@ bin/talloctort@EXEEXT@ bin/replacetort@EXEEXT@ \
        bin/tdbtorture@EXEEXT@ \
-       bin/smbconftort@EXEEXT@
+       bin/smbconftort@EXEEXT@ bin/vlp@EXEEXT@
 
 BIN_PROGS = @EXTRA_BIN_PROGS@ \
        $(BIN_PROGS1) $(BIN_PROGS2) $(BIN_PROGS3) $(BIN_PROGS4) 
@@ -247,9 +247,10 @@ SERVER_MUTEX_OBJ = lib/server_mutex.o
 
 PASSCHANGE_OBJ = libsmb/passchange.o
 
-LIBNDR_DRSUAPI_OBJ = librpc/ndr/ndr_drsuapi.o \
+LIBNDR_DRSUAPI_OBJ = ../librpc/ndr/ndr_drsuapi.o \
                     ../librpc/ndr/ndr_compression.o \
                     librpc/gen_ndr/ndr_drsuapi.o \
+                    ../librpc/ndr/ndr_drsblobs.o \
                     librpc/gen_ndr/ndr_drsblobs.o
 
 ZLIB_OBJ = @ZLIB_OBJS@
@@ -318,7 +319,8 @@ LIBSAMBAUTIL_OBJ = @LIBTALLOC_STATIC@ \
 UTIL_OBJ = ../lib/util/rbtree.o ../lib/util/signal.o ../lib/util/time.o \
                   ../lib/util/xfile.o ../lib/util/util_strlist.o  \
                   ../lib/util/util_file.o ../lib/util/data_blob.o \
-                  ../lib/util/util.o ../lib/util/fsusage.o 
+                  ../lib/util/util.o ../lib/util/fsusage.o \
+                  ../lib/util/params.o 
 
 CRYPTO_OBJ = ../lib/crypto/crc32.o ../lib/crypto/md5.o \
                         ../lib/crypto/hmacmd5.o ../lib/crypto/arcfour.o \
@@ -360,7 +362,7 @@ READLINE_OBJ = lib/readline.o
 # Be sure to include them into your application
 POPT_LIB_OBJ = lib/popt_common.o
 
-PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o ../lib/util/params.o param/util.o lib/sharesec.o lib/ldap_debug_handler.o
+PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o param/util.o lib/sharesec.o lib/ldap_debug_handler.o
 PARAM_REG_ADD_OBJ = $(REG_SMBCONF_OBJ) $(LIBSMBCONF_OBJ) $(PRIVILEGES_BASIC_OBJ)
 PARAM_OBJ = $(PARAM_WITHOUT_REG_OBJ) $(PARAM_REG_ADD_OBJ)
 
@@ -918,7 +920,7 @@ SMBTORTURE_OBJ = $(SMBTORTURE_OBJ1) $(PARAM_OBJ) \
 
 MASKTEST_OBJ = torture/masktest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
                  $(LIB_NONSMBD_OBJ) \
-                $(LIBNDR_GEN_OBJ0)
+                $(LIBNDR_GEN_OBJ0) $(ZLIB_LIBS)
 
 MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
                  $(LIB_NONSMBD_OBJ) \
@@ -926,7 +928,7 @@ MSGTEST_OBJ = torture/msgtest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
 
 LOCKTEST_OBJ = torture/locktest.o $(PARAM_OBJ) $(LOCKING_OBJ) $(KRBCLIENT_OBJ) \
                $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) \
-               $(LIBNDR_GEN_OBJ0)
+               $(LIBNDR_GEN_OBJ0) $(ZLIB_LIBS)
 
 NSSTEST_OBJ = torture/nsstest.o $(PARAM_OBJ) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \
                  $(LIB_NONSMBD_OBJ) \
@@ -945,7 +947,7 @@ LOG2PCAP_OBJ = utils/log2pcaphex.o
 
 LOCKTEST2_OBJ = torture/locktest2.o $(PARAM_OBJ) $(LOCKING_OBJ) $(LIBSMB_OBJ) \
                $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) \
-               $(LIBNDR_GEN_OBJ0)
+               $(LIBNDR_GEN_OBJ0) $(ZLIB_LIBS)
 
 SMBCACLS_OBJ = utils/smbcacls.o $(PARAM_OBJ) $(LIBSMB_OBJ) \
                $(KRBCLIENT_OBJ) $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ) \
@@ -1161,7 +1163,7 @@ pam_winbind: SHOWFLAGS bin/pam_winbind.@SHLIBEXT@
 
 gpext_modules:: $(GPEXT_MODULES)
 
-torture:: SHOWFLAGS $(TORTURE_PROGS)
+torture:: SHOWFLAGS $(TORTURE_PROGS) 
 
 smbtorture : SHOWFLAGS bin/smbtorture@EXEEXT@
 
@@ -1212,8 +1214,8 @@ samba3-idl::
                ../librpc/idl/notify.idl ../librpc/idl/epmapper.idl librpc/idl/messaging.idl \
                ../librpc/idl/xattr.idl ../librpc/idl/misc.idl librpc/idl/samr.idl \
                ../librpc/idl/security.idl ../librpc/idl/dssetup.idl librpc/idl/krb5pac.idl \
-               ../librpc/idl/ntsvcs.idl librpc/idl/libnetapi.idl librpc/idl/drsuapi.idl \
-               librpc/idl/drsblobs.idl ../librpc/idl/nbt.idl
+               ../librpc/idl/ntsvcs.idl librpc/idl/libnetapi.idl ../librpc/idl/drsuapi.idl \
+               ../librpc/idl/drsblobs.idl ../librpc/idl/nbt.idl
 
 #####################################################################
 
@@ -1327,40 +1329,41 @@ bin/smbd@EXEEXT@: $(BINARY_PREREQS) $(SMBD_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARE
                $(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
                $(ACL_LIBS) $(PASSDB_LIBS) $(LIBS) $(DNSSD_LIBS) \
                $(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
-               $(WINBIND_LIBS)
+               $(WINBIND_LIBS) $(ZLIB_LIBS)
 
 bin/nmbd@EXEEXT@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
                $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(POPT_LIBS) \
-               $(KRB5LIBS) $(LDAP_LIBS)
+               $(KRB5LIBS) $(LDAP_LIBS) $(ZLIB_LIBS)
 
 bin/swat@EXEEXT@: $(BINARY_PREREQS) $(SWAT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \
          $(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) $(POPT_LIBS) $(KRB5LIBS) \
-         $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+         $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
 
 bin/rpcclient@EXEEXT@: $(BINARY_PREREQS) $(RPCCLIENT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(LDFLAGS) $(PASSDB_LIBS) $(RPCCLIENT_OBJ) \
                $(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
                $(KRB5LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
-               $(WINBIND_LIBS)
+               $(WINBIND_LIBS) $(ZLIB_LIBS)
 
 bin/smbclient@EXEEXT@: $(BINARY_PREREQS) $(CLIENT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) \
                $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
                $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(DNSSD_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
 
 bin/net@EXEEXT@: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@ @LIBNETAPI_SHARED@
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
                $(POPT_LIBS) $(KRB5LIBS) $(UUID_LIBS) $(LDAP_LIBS) \
                $(PASSDB_LIBS) $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) \
-               @INIPARSERLIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(LIBNETAPI_LIBS)
+               @INIPARSERLIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(LIBNETAPI_LIBS) \
+               $(ZLIB_LIBS)
 
 bin/profiles@EXEEXT@: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
        @echo Linking $@
@@ -1370,7 +1373,7 @@ bin/profiles@EXEEXT@: $(BINARY_PREREQS) $(PROFILES_OBJ) @BUILD_POPT@ @LIBTALLOC_
 bin/smbspool@EXEEXT@: $(BINARY_PREREQS) $(CUPS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(CUPS_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
-               $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+               $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
 
 bin/mount.cifs@EXEEXT@: $(BINARY_PREREQS) $(CIFS_MOUNT_OBJ) @BUILD_POPT@
        @echo Linking $@
@@ -1408,13 +1411,13 @@ bin/smbtree@EXEEXT@: $(BINARY_PREREQS) $(SMBTREE_OBJ) @BUILD_POPT@ @LIBTALLOC_SH
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(SMBTREE_OBJ) $(LDFLAGS) $(DYNEXP) \
                $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
 
 bin/smbpasswd@EXEEXT@: $(BINARY_PREREQS) $(SMBPASSWD_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(PASSDB_LIBS) \
                $(DYNEXP) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
 
 bin/pdbedit@EXEEXT@: $(BINARY_PREREQS) $(PDBEDIT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo Linking $@
@@ -1426,7 +1429,7 @@ bin/smbget@EXEEXT@: $(BINARY_PREREQS) $(SMBGET_OBJ) @BUILD_POPT@ @LIBTALLOC_SHAR
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(SMBGET_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
                $(POPT_LIBS)  $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
 
 bin/nmblookup@EXEEXT@: $(BINARY_PREREQS) $(NMBLOOKUP_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
        @echo Linking $@
@@ -1437,7 +1440,7 @@ bin/smbtorture@EXEEXT@: $(BINARY_PREREQS) $(SMBTORTURE_OBJ) @BUILD_POPT@ @LIBTAL
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(DYNEXP) \
                $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) $(LIBTALLOC_LIBS) \
-               $(LIBTDB_LIBS)
+               $(LIBTDB_LIBS) $(ZLIB_LIBS)
 
 bin/talloctort@EXEEXT@: $(BINARY_PREREQS) $(TALLOCTORT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
        @echo Linking $@
@@ -1460,25 +1463,25 @@ bin/masktest@EXEEXT@: $(BINARY_PREREQS) $(MASKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(MASKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
                $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
 
 bin/msgtest@EXEEXT@: $(BINARY_PREREQS) $(MSGTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(MSGTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
                $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
 
 bin/smbcacls@EXEEXT@: $(BINARY_PREREQS) $(SMBCACLS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(SMBCACLS_OBJ) $(DYNEXP) $(LDFLAGS) \
                $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
 
 bin/smbcquotas@EXEEXT@: $(BINARY_PREREQS) $(SMBCQUOTAS_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(SMBCQUOTAS_OBJ) $(DYNEXP) $(LDFLAGS) \
                $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
 
 bin/eventlogadm@EXEEXT@: $(BINARY_PREREQS) $(EVTLOGADM_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
        @echo Linking $@
@@ -1494,19 +1497,19 @@ bin/locktest@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(LOCKTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
                $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
 
 bin/nsstest@EXEEXT@: $(BINARY_PREREQS) $(NSSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(NSSTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
                $(LIBS) $(KRB5LIBS)  $(LDAP_LIBS) $(POPT_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
 
 bin/pdbtest@EXEEXT@: $(BINARY_PREREQS) $(PDBTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(PDBTEST_OBJ) $(LDFLAGS) $(DYNEXP) \
                $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) \
-               $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+               $(POPT_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) $(ZLIB_LIBS)
 
 bin/vfstest@EXEEXT@: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo Linking $@
@@ -1514,7 +1517,7 @@ bin/vfstest@EXEEXT@: $(BINARY_PREREQS) $(VFSTEST_OBJ) @BUILD_POPT@ @LIBTALLOC_SH
                $(TERMLIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
                $(ACL_LIBS) $(LIBS) $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
                @SMBD_LIBS@ $(NSCD_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
-               $(WINBIND_LIBS)
+               $(WINBIND_LIBS) $(ZLIB_LIBS)
 
 bin/smbiconv@EXEEXT@: $(BINARY_PREREQS) $(SMBICONV_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
        @echo Linking $@
@@ -1531,7 +1534,7 @@ bin/locktest2@EXEEXT@: $(BINARY_PREREQS) $(LOCKTEST2_OBJ) @BUILD_POPT@ @LIBTALLO
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(LOCKTEST2_OBJ) $(LDFLAGS) $(DYNEXP) \
                $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
 
 bin/ndrdump@EXEEXT@: $(BINARY_PREREQS) $(NDRDUMP_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@
        @echo Linking $@
@@ -1547,7 +1550,7 @@ bin/smbfilter@EXEEXT@: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@ @LIBTALLO
        @echo Linking $@
        @$(CC) $(FLAGS) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) \
                $(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(ZLIB_LIBS)
 
 bin/ldbedit: $(BINARY_PREREQS) $(LDBEDIT_OBJ) @BUILD_POPT@ @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo Linking $@
@@ -2171,14 +2174,16 @@ bin/winbindd@EXEEXT@: $(BINARY_PREREQS) $(WINBINDD_OBJ) @BUILD_POPT@ @LIBTALLOC_
        @echo "Linking $@"
        @$(CC) $(FLAGS) -o $@ $(WINBINDD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
                $(POPT_LIBS) $(KRB5LIBS) $(LDAP_LIBS) \
-               $(PASSDB_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+               $(PASSDB_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) \
+               $(ZLIB_LIBS)
 
 bin/vlp@EXEEXT@: $(BINARY_PREREQS) $(VLP_OBJ) @LIBTALLOC_SHARED@ @LIBTDB_SHARED@ @LIBWBCLIENT_SHARED@
        @echo "Linking $@"
        @$(CC) $(FLAGS) -o $@ $(VLP_OBJ) $(LDFLAGS) $(DYNEXP) \
                $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
                $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
-               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS)
+               $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(WINBIND_LIBS) \
+               $(ZLIB_LIBS)
 
 @WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ)
        @echo "Linking $@"
index 9594393474659116112dfd3df1929431ce62acab..ac5b2b215c6878ffde76636d3867154bc88470e5 100644 (file)
 #undef HAVE_TERMIOS_H
 #endif
 
-#ifndef _PUBLIC_
-#ifdef HAVE_VISIBILITY_ATTR
-#  define _PUBLIC_ __attribute__((visibility("default")))
-#else
-#  define _PUBLIC_
-#endif
-#endif
-
-#if defined(__GNUC__) && !defined(__cplusplus)
-/** gcc attribute used on function parameters so that it does not emit
- * warnings about them being unused. **/
-#  define UNUSED(param) param __attribute__ ((unused))
-#else
-#  define UNUSED(param) param
-/** Feel free to add definitions for other compilers here. */
-#endif
-
 #ifdef RELIANTUNIX
 /*
  * <unistd.h> has to be included before any other to get
@@ -288,12 +271,10 @@ typedef int ber_int_t;
 /*
  * Define additional missing types
  */
-#if defined(HAVE_SIG_ATOMIC_T_TYPE) && defined(AIX)
+#if defined(AIX)
 typedef sig_atomic_t SIG_ATOMIC_T;
-#elif defined(HAVE_SIG_ATOMIC_T_TYPE) && !defined(AIX)
-typedef sig_atomic_t volatile SIG_ATOMIC_T;
 #else
-typedef int volatile SIG_ATOMIC_T;
+typedef sig_atomic_t volatile SIG_ATOMIC_T;
 #endif
 
 #ifndef uchar
@@ -593,6 +574,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 /* Lists, trees, caching, database... */
 #include "../lib/util/xfile.h"
 #include "../lib/util/memory.h"
+#include "../lib/util/attr.h"
 #include "intl.h"
 #include "../lib/util/dlinklist.h"
 #include "tdb.h"
@@ -782,14 +764,6 @@ enum flush_reason_enum {
 /* prototypes from lib/util_transfer_file.c */
 #include "transfer_file.h"
 
-#ifdef __COMPAR_FN_T
-#define QSORT_CAST (__compar_fn_t)
-#endif
-
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif
-
 #ifndef DEFAULT_PRINTING
 #ifdef HAVE_CUPS
 #define DEFAULT_PRINTING PRINT_CUPS
@@ -1107,19 +1081,11 @@ ssize_t readahead(int fd, off64_t offset, size_t count);
 #define CONST_DISCARD(type, ptr)      ((type) ((void *) (ptr)))
 #define CONST_ADD(type, ptr)          ((type) ((const void *) (ptr)))
 
-#ifndef NORETURN_ATTRIBUTE
-#if (__GNUC__ >= 3)
-#define NORETURN_ATTRIBUTE __attribute__ ((noreturn))
-#else
-#define NORETURN_ATTRIBUTE
-#endif
-#endif
-
-void smb_panic( const char *why ) NORETURN_ATTRIBUTE ;
-void dump_core(void) NORETURN_ATTRIBUTE ;
-void exit_server(const char *const reason) NORETURN_ATTRIBUTE ;
-void exit_server_cleanly(const char *const reason) NORETURN_ATTRIBUTE ;
-void exit_server_fault(void) NORETURN_ATTRIBUTE ;
+void smb_panic( const char *why ) _NORETURN_;
+void dump_core(void) _NORETURN_;
+void exit_server(const char *const reason) _NORETURN_;
+void exit_server_cleanly(const char *const reason) _NORETURN_;
+void exit_server_fault(void) _NORETURN_;
 
 #ifdef HAVE_LIBNSCD
 #include "libnscd.h"
index 4551325843042b5d03b3c3cb9ef44c349108ce82..800393c75ddb49fec66947c24ade9c4177cfa857 100644 (file)
@@ -64,12 +64,4 @@ struct dfs_path {
        bool posix_path;
 };
 
-#define init_dfsroot(conn, inbuf, outbuf)                      \
-{ if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) {          \
-        DEBUG(2,("Serving %s as a Dfs root\n",                         \
-                lp_servicename(SNUM(conn)) ));                 \
-       SSVAL(outbuf, smb_vwv2, SMB_SHARE_IN_DFS                \
-             | SVAL(outbuf, smb_vwv2));                        \
-} }
-
 #endif /* _MSDFS_H */
index c4c89b0448486cfdbe49c7781b4fc2250e07113a..18bbd11ab93bff5bacc70ad5988d4c69bdbd8f5b 100644 (file)
@@ -577,8 +577,8 @@ void gencache_unlock_entry( const char *key );
 
 void set_rand_reseed_callback(void (*fn)(int *));
 void set_need_random_reseed(void);
-void generate_random_buffer( unsigned char *out, int len);
-char *generate_random_str(size_t len);
+void generate_random_buffer(uint8_t *out, int len);
+char *generate_random_str(TALLOC_CTX *mem_ctx, size_t len);
 
 /* The following definitions come from lib/iconv.c  */
 
@@ -769,12 +769,6 @@ int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorf
 
 /* The following definitions come from lib/sendfile.c  */
 
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
-ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
 ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count);
 
 /* The following definitions come from lib/server_mutex.c  */
index 57314c55df112bbbe0d57aecbc1c4d2825ea086a..076a2fd51896cab64fcecc3caaf53340fc56f113 100644 (file)
@@ -156,7 +156,7 @@ static int do_reseed(bool use_fd, int fd)
  Interface to the (hopefully) good crypto random number generator.
 ********************************************************************/
 
-void generate_random_buffer( unsigned char *out, int len)
+void generate_random_buffer(uint8_t *out, int len)
 {
        static int urand_fd = -1;
        unsigned char md4_buf[64];
@@ -205,15 +205,11 @@ void generate_random_buffer( unsigned char *out, int len)
 
 static char c_list[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+_-#.,";
 
-char *generate_random_str(size_t len)
+char *generate_random_str(TALLOC_CTX *mem_ctx, size_t len)
 {
-       static unsigned char retstr[256];
+       unsigned char *retstr = talloc_zero_array(mem_ctx, unsigned char, len);
        size_t i;
 
-       memset(retstr, '\0', sizeof(retstr));
-
-       if (len > sizeof(retstr)-1)
-               len = sizeof(retstr) -1;
        generate_random_buffer( retstr, len);
        for (i = 0; i < len; i++)
                retstr[i] = c_list[ retstr[i] % (sizeof(c_list)-1) ];
index 92b818b0aa82530b6934709deb1f156585c849ff..820cf376beb79baf2d6552101f4b89474a47d8e1 100644 (file)
@@ -1227,17 +1227,6 @@ void add_to_large_array(TALLOC_CTX *mem_ctx, size_t element_size,
        *array_size = -1;
 }
 
-/****************************************************************************
- Free memory, checks for NULL.
- Use directly SAFE_FREE()
- Exists only because we need to pass a function pointer somewhere --SSS
-****************************************************************************/
-
-void safe_free(void *p)
-{
-       SAFE_FREE(p);
-}
-
 /****************************************************************************
  Get my own name and IP.
 ****************************************************************************/
index f6783f10ffd8537c40cc39a543d21833bc2194cd..046ce61ea31a83a7cd32da061371e55fcceaa0e1 100644 (file)
@@ -557,47 +557,6 @@ bool trim_char(char *s,char cfront,char cback)
        return ret;
 }
 
-/**
- Trim the specified elements off the front and back of a string.
-**/
-
-bool trim_string(char *s,const char *front,const char *back)
-{
-       bool ret = false;
-       size_t front_len;
-       size_t back_len;
-       size_t len;
-
-       /* Ignore null or empty strings. */
-       if (!s || (s[0] == '\0'))
-               return false;
-
-       front_len       = front? strlen(front) : 0;
-       back_len        = back? strlen(back) : 0;
-
-       len = strlen(s);
-
-       if (front_len) {
-               while (len && strncmp(s, front, front_len)==0) {
-                       /* Must use memmove here as src & dest can
-                        * easily overlap. Found by valgrind. JRA. */
-                       memmove(s, s+front_len, (len-front_len)+1);
-                       len -= front_len;
-                       ret=true;
-               }
-       }
-
-       if (back_len) {
-               while ((len >= back_len) &&
-                               strncmp(s+len-back_len,back,back_len)==0) {
-                       s[len-back_len]='\0';
-                       len -= back_len;
-                       ret=true;
-               }
-       }
-       return ret;
-}
-
 /**
  Does a string have any uppercase chars in it?
 **/
@@ -648,29 +607,6 @@ bool strhaslower(const char *s)
        return ret;
 }
 
-/**
- Find the number of 'c' chars in a string
-**/
-
-size_t count_chars(const char *s,char c)
-{
-       smb_ucs2_t *ptr;
-       int count;
-       smb_ucs2_t *alloc_tmpbuf = NULL;
-       size_t converted_size;
-
-       if (!push_ucs2_allocate(&alloc_tmpbuf, s, &converted_size)) {
-               return 0;
-       }
-
-       for(count=0,ptr=alloc_tmpbuf;*ptr;ptr++)
-               if(*ptr==UCS2_CHAR(c))
-                       count++;
-
-       SAFE_FREE(alloc_tmpbuf);
-       return(count);
-}
-
 /**
  Safe string copy into a known length string. maxlength does not
  include the terminating zero.
@@ -870,88 +806,6 @@ static char *strncpyn(char *dest, const char *src, size_t n, char c)
 }
 #endif
 
-/**
- Routine to get hex characters and turn them into a 16 byte array.
- the array can be variable length, and any non-hex-numeric
- characters are skipped.  "0xnn" or "0Xnn" is specially catered
- for.
-
- valid examples: "0A5D15"; "0x15, 0x49, 0xa2"; "59\ta9\te3\n"
-
-**/
-
-size_t strhex_to_str(char *buf, size_t buf_len, const char *strhex, size_t strhex_len)
-{
-       size_t i;
-       size_t num_chars = 0;
-       unsigned char   lonybble, hinybble;
-       const char     *hexchars = "0123456789ABCDEF";
-       char           *p1 = NULL, *p2 = NULL;
-
-       for (i = 0; i < strhex_len && strhex[i] != 0; i++) {
-               if (strnequal(hexchars, "0x", 2)) {
-                       i++; /* skip two chars */
-                       continue;
-               }
-
-               if (!(p1 = strchr_m(hexchars, toupper_ascii(strhex[i]))))
-                       break;
-
-               i++; /* next hex digit */
-
-               if (!(p2 = strchr_m(hexchars, toupper_ascii(strhex[i]))))
-                       break;
-
-               /* get the two nybbles */
-               hinybble = PTR_DIFF(p1, hexchars);
-               lonybble = PTR_DIFF(p2, hexchars);
-
-               if (num_chars >= buf_len) {
-                       break;
-               }
-               buf[num_chars] = (hinybble << 4) | lonybble;
-               num_chars++;
-
-               p1 = NULL;
-               p2 = NULL;
-       }
-       return num_chars;
-}
-
-DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex)
-{
-       DATA_BLOB ret_blob;
-
-       if (mem_ctx != NULL)
-               ret_blob = data_blob_talloc(mem_ctx, NULL, strlen(strhex)/2+1);
-       else
-               ret_blob = data_blob(NULL, strlen(strhex)/2+1);
-
-       ret_blob.length = strhex_to_str((char*)ret_blob.data,
-                                       ret_blob.length,
-                                       strhex,
-                                       strlen(strhex));
-
-       return ret_blob;
-}
-
-/**
- * Routine to print a buffer as HEX digits, into an allocated string.
- */
-
-char *hex_encode_talloc(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len)
-{
-       int i;
-       char *hex_buffer;
-
-       hex_buffer = TALLOC_ARRAY(mem_ctx, char, (len*2)+1);
-
-       for (i = 0; i < len; i++)
-               slprintf(&hex_buffer[i*2], 3, "%02X", buff_in[i]);
-
-       return hex_buffer;
-}
-
 /**
  Check if a string is part of a list.
 **/
@@ -2105,41 +1959,6 @@ void ipstr_list_free(char* ipstr_list)
        SAFE_FREE(ipstr_list);
 }
 
-/**
- Unescape a URL encoded string, in place.
-**/
-
-void rfc1738_unescape(char *buf)
-{
-       char *p=buf;
-
-       while (p && *p && (p=strchr_m(p,'%'))) {
-               int c1 = p[1];
-               int c2 = p[2];
-
-               if (c1 >= '0' && c1 <= '9')
-                       c1 = c1 - '0';
-               else if (c1 >= 'A' && c1 <= 'F')
-                       c1 = 10 + c1 - 'A';
-               else if (c1 >= 'a' && c1 <= 'f')
-                       c1 = 10 + c1 - 'a';
-               else {p++; continue;}
-
-               if (c2 >= '0' && c2 <= '9')
-                       c2 = c2 - '0';
-               else if (c2 >= 'A' && c2 <= 'F')
-                       c2 = 10 + c2 - 'A';
-               else if (c2 >= 'a' && c2 <= 'f')
-                       c2 = 10 + c2 - 'a';
-               else {p++; continue;}
-
-               *p = (c1<<4) | c2;
-
-               memmove(p+1, p+3, strlen(p+3)+1);
-               p++;
-       }
-}
-
 static const char b64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 
 /**
@@ -2550,54 +2369,6 @@ bool validate_net_name( const char *name,
 }
 
 
-/**
-return the number of bytes occupied by a buffer in ASCII format
-the result includes the null termination
-limited by 'n' bytes
-**/
-size_t ascii_len_n(const char *src, size_t n)
-{
-       size_t len;
-
-       len = strnlen(src, n);
-       if (len+1 <= n) {
-               len += 1;
-       }
-
-       return len;
-}
-
-/**
-return the number of bytes occupied by a buffer in CH_UTF16 format
-the result includes the null termination
-**/
-size_t utf16_len(const void *buf)
-{
-       size_t len;
-
-       for (len = 0; SVAL(buf,len); len += 2) ;
-
-       return len + 2;
-}
-
-/**
-return the number of bytes occupied by a buffer in CH_UTF16 format
-the result includes the null termination
-limited by 'n' bytes
-**/
-size_t utf16_len_n(const void *src, size_t n)
-{
-       size_t len;
-
-       for (len = 0; (len+2 < n) && SVAL(src, len); len += 2) ;
-
-       if (len+2 <= n) {
-               len += 2;
-       }
-
-       return len;
-}
-
 /*******************************************************************
  Add a shell escape character '\' to any character not in a known list
  of characters. UNIX charset format.
index d23c36f3269fc2bb4e0b72c362bedd0a10df5adb..9866a15285faaa2a17f0b4d209cedd17e9c9a631 100644 (file)
@@ -33,7 +33,7 @@ ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_princip
                return ADS_ERROR_SYSTEM(ENOENT);
        }
 
-       new_password = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
+       new_password = generate_random_str(talloc_tos(), DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
     
        ret = kerberos_set_password(ads->auth.kdc_server, host_principal, password, host_principal, new_password, ads->auth.time_offset);
 
index ab8af0be6bec6d1a3b75be613d3e04ef2257d54a..6935e000dc224b44c609bb6cdab61f4ad8227286 100644 (file)
@@ -775,7 +775,7 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX *mem_ctx,
        ZERO_STRUCT(user_pol);
 
        if (!r->in.machine_password) {
-               r->in.machine_password = talloc_strdup(mem_ctx, generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH));
+               r->in.machine_password = generate_random_str(mem_ctx, DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
                NT_STATUS_HAVE_NO_MEMORY(r->in.machine_password);
        }
 
index bc5dba4d9186a107b5d0d8c0e2adb86d3e5b1b60..f8ef7a99ad18240ba1f871db4cb9bea3a33d6c44 100644 (file)
@@ -424,12 +424,19 @@ NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli,
 
 NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
                                  TALLOC_CTX *mem_ctx,
+                                 const char *filter /* [in] [unique,charset(UTF16)] */,
+                                 uint16_t *buffer /* [out] [ref,length_is(*length),size_is(*length)] */,
+                                 uint32_t *length /* [in,out] [ref] */,
+                                 uint32_t flags /* [in]  */,
                                  WERROR *werror)
 {
        struct PNP_GetDeviceList r;
        NTSTATUS status;
 
        /* In parameters */
+       r.in.filter = filter;
+       r.in.length = length;
+       r.in.flags = flags;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, &r);
@@ -454,6 +461,8 @@ NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
        }
 
        /* Return variables */
+       memcpy(buffer, r.out.buffer, *r.in.length * sizeof(*buffer));
+       *length = *r.out.length;
 
        /* Return result */
        if (werror) {
@@ -555,11 +564,11 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
                                     const char *devicepath /* [in] [ref,charset(UTF16)] */,
                                     uint32_t property /* [in]  */,
-                                    uint32_t *unknown1 /* [in,out] [ref] */,
+                                    uint32_t *reg_data_type /* [in,out] [ref] */,
                                     uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
                                     uint32_t *buffer_size /* [in,out] [ref] */,
                                     uint32_t *needed /* [in,out] [ref] */,
-                                    uint32_t unknown3 /* [in]  */,
+                                    uint32_t flags /* [in]  */,
                                     WERROR *werror)
 {
        struct PNP_GetDeviceRegProp r;
@@ -568,10 +577,10 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
        /* In parameters */
        r.in.devicepath = devicepath;
        r.in.property = property;
-       r.in.unknown1 = unknown1;
+       r.in.reg_data_type = reg_data_type;
        r.in.buffer_size = buffer_size;
        r.in.needed = needed;
-       r.in.unknown3 = unknown3;
+       r.in.flags = flags;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, &r);
@@ -596,7 +605,7 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
        }
 
        /* Return variables */
-       *unknown1 = *r.out.unknown1;
+       *reg_data_type = *r.out.reg_data_type;
        memcpy(buffer, r.out.buffer, *r.in.buffer_size * sizeof(*buffer));
        *buffer_size = *r.out.buffer_size;
        *needed = *r.out.needed;
index a52a79ecc5da6b6c8c076f64cc37bd6626768723..4ed8a401ec78b970365a89ff5642d20a72b30e76 100644 (file)
@@ -36,6 +36,10 @@ NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli,
                                     WERROR *werror);
 NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli,
                                  TALLOC_CTX *mem_ctx,
+                                 const char *filter /* [in] [unique,charset(UTF16)] */,
+                                 uint16_t *buffer /* [out] [ref,length_is(*length),size_is(*length)] */,
+                                 uint32_t *length /* [in,out] [ref] */,
+                                 uint32_t flags /* [in]  */,
                                  WERROR *werror);
 NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli,
                                      TALLOC_CTX *mem_ctx,
@@ -50,11 +54,11 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
                                     const char *devicepath /* [in] [ref,charset(UTF16)] */,
                                     uint32_t property /* [in]  */,
-                                    uint32_t *unknown1 /* [in,out] [ref] */,
+                                    uint32_t *reg_data_type /* [in,out] [ref] */,
                                     uint8_t *buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */,
                                     uint32_t *buffer_size /* [in,out] [ref] */,
                                     uint32_t *needed /* [in,out] [ref] */,
-                                    uint32_t unknown3 /* [in]  */,
+                                    uint32_t flags /* [in]  */,
                                     WERROR *werror);
 NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli,
                                     TALLOC_CTX *mem_ctx,
index b0ab9aea2a5f03487fde7ced67a23ce21d33023d..692746468e8c433407f15091ea6a6914f937a5f1 100644 (file)
@@ -4,12 +4,16 @@
 
 #include "librpc/gen_ndr/drsuapi.h"
 #include "librpc/gen_ndr/misc.h"
+#include "librpc/gen_ndr/samr.h"
+#include "librpc/gen_ndr/lsa.h"
 #ifndef _HEADER_drsblobs
 #define _HEADER_drsblobs
 
 #define SUPPLEMENTAL_CREDENTIALS_PREFIX        ( "                                                " )
 enum drsuapi_DsAttributeId;
 
+enum lsa_TrustAuthType;
+
 struct replPropertyMetaData1 {
        enum drsuapi_DsAttributeId attid;
        uint32_t version;
@@ -247,7 +251,7 @@ struct package_PrimaryKerberosBlob {
 }/* [public] */;
 
 struct package_PrimaryCLEARTEXTBlob {
-       const char * cleartext;/* [flag(LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING)] */
+       DATA_BLOB cleartext;/* [flag(LIBNDR_FLAG_REMAINING)] */
 }/* [public] */;
 
 struct package_PrimaryWDigestHash {
@@ -263,63 +267,158 @@ struct package_PrimaryWDigestBlob {
        struct package_PrimaryWDigestHash *hashes;
 }/* [public] */;
 
-struct trustAuthInOutSecret1 {
-       NTTIME time1;
-       uint32_t unknown1;
-       DATA_BLOB value;
-       DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
+struct AuthInfoNone {
+       uint32_t size;/* [value(0)] */
 };
 
-struct trustAuthInOutCtr1 {
-       struct trustAuthInOutSecret1 *value1;/* [relative] */
-       struct trustAuthInOutSecret1 *value2;/* [relative] */
+struct AuthInfoNT4Owf {
+       uint32_t size;/* [value(16)] */
+       struct samr_Password password;
 };
 
-struct trustAuthInOutSecret2V1 {
-       NTTIME time1;
-       uint32_t unknown1;
-       DATA_BLOB value;
-       NTTIME time2;
-       uint32_t unknown2;
-       uint32_t unknown3;
-       uint32_t unknown4;
-       DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
+struct AuthInfoClear {
+       uint32_t size;
+       uint8_t *password;
 };
 
-struct trustAuthInOutSecret2V2 {
-       NTTIME time1;
-       uint32_t unknown1;
-       DATA_BLOB value;
-       NTTIME time2;
-       uint32_t unknown2;
-       uint32_t unknown3;
-       DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
-};
-
-struct trustAuthInOutCtr2 {
-       struct trustAuthInOutSecret2V1 *value1;/* [relative] */
-       struct trustAuthInOutSecret2V2 *value2;/* [relative] */
+struct AuthInfoVersion {
+       uint32_t size;/* [value(4)] */
+       uint32_t version;
 };
 
-union trustAuthInOutCtr {
-       struct trustAuthInOutCtr1 ctr1;/* [case] */
-       struct trustAuthInOutCtr2 ctr2;/* [case(2)] */
+union AuthInfo {
+       struct AuthInfoNone none;/* [case(TRUST_AUTH_TYPE_NONE)] */
+       struct AuthInfoNT4Owf nt4owf;/* [case(TRUST_AUTH_TYPE_NT4OWF)] */
+       struct AuthInfoClear clear;/* [case(TRUST_AUTH_TYPE_CLEAR)] */
+       struct AuthInfoVersion version;/* [case(TRUST_AUTH_TYPE_VERSION)] */
 }/* [nodiscriminant] */;
 
-struct trustAuthInOutBlob {
-       uint32_t version;
-       union trustAuthInOutCtr ctr;/* [switch_is(version)] */
+struct AuthenticationInformation {
+       NTTIME LastUpdateTime;
+       enum lsa_TrustAuthType AuthType;
+       union AuthInfo AuthInfo;/* [switch_is(AuthType)] */
+       DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
 }/* [public] */;
 
+struct AuthenticationInformationArray {
+       struct AuthenticationInformation *array;/* [size_is] */
+}/* [noprint,nopush,nopull] */;
+
+struct trustAuthInOutBlob {
+       uint32_t count;
+       struct AuthenticationInformationArray *current;/* [relative] */
+       struct AuthenticationInformationArray *previous;/* [relative] */
+}/* [noprint,gensize,nopull,public,nopush] */;
+
+struct trustCurrentPasswords {
+       uint32_t count;
+       struct AuthenticationInformation **current;/* [relative] */
+}/* [gensize,public] */;
+
+struct trustDomainPasswords {
+       uint8_t confounder[512];
+       struct trustCurrentPasswords outgoing;/* [subcontext_size(outgoing_size),subcontext(0)] */
+       struct trustCurrentPasswords incoming;/* [subcontext_size(incoming_size),subcontext(0)] */
+       uint32_t outgoing_size;/* [value(ndr_size_trustCurrentPasswords(&outgoing,ndr->flags))] */
+       uint32_t incoming_size;/* [value(ndr_size_trustCurrentPasswords(&incoming,ndr->flags))] */
+}/* [public,nopull] */;
+
 struct DsCompressedChunk {
        uint32_t marker;
        DATA_BLOB data;
 }/* [public] */;
 
-struct DsCompressedBlob {
-       struct DsCompressedChunk chunks[5];
+struct ExtendedErrorAString {
+       uint16_t __size;
+       const char *string;/* [unique,charset(DOS),size_is(__size)] */
+};
+
+struct ExtendedErrorUString {
+       uint16_t __size;
+       const char *string;/* [unique,charset(UTF16),size_is(__size)] */
+};
+
+struct ExtendedErrorBlob {
+       uint16_t length;
+       uint8_t *data;/* [unique,size_is(length)] */
+};
+
+enum ExtendedErrorComputerNamePresent
+#ifndef USE_UINT_ENUMS
+ {
+       EXTENDED_ERROR_COMPUTER_NAME_PRESENT=1,
+       EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT=2
+}
+#else
+ { __donnot_use_enum_ExtendedErrorComputerNamePresent=0x7FFFFFFF}
+#define EXTENDED_ERROR_COMPUTER_NAME_PRESENT ( 1 )
+#define EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT ( 2 )
+#endif
+;
+
+union ExtendedErrorComputerNameU {
+       struct ExtendedErrorUString name;/* [case(EXTENDED_ERROR_COMPUTER_NAME_PRESENT)] */
+}/* [switch_type(ExtendedErrorComputerNamePresent)] */;
+
+struct ExtendedErrorComputerName {
+       enum ExtendedErrorComputerNamePresent present;
+       union ExtendedErrorComputerNameU n;/* [switch_is(present)] */
+};
+
+enum ExtendedErrorParamType
+#ifndef USE_UINT_ENUMS
+ {
+       EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING=1,
+       EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING=2,
+       EXTENDED_ERROR_PARAM_TYPE_UINT32=3,
+       EXTENDED_ERROR_PARAM_TYPE_UINT16=4,
+       EXTENDED_ERROR_PARAM_TYPE_UINT64=5,
+       EXTENDED_ERROR_PARAM_TYPE_NONE=6,
+       EXTENDED_ERROR_PARAM_TYPE_BLOB=7
+}
+#else
+ { __donnot_use_enum_ExtendedErrorParamType=0x7FFFFFFF}
+#define EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING ( 1 )
+#define EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING ( 2 )
+#define EXTENDED_ERROR_PARAM_TYPE_UINT32 ( 3 )
+#define EXTENDED_ERROR_PARAM_TYPE_UINT16 ( 4 )
+#define EXTENDED_ERROR_PARAM_TYPE_UINT64 ( 5 )
+#define EXTENDED_ERROR_PARAM_TYPE_NONE ( 6 )
+#define EXTENDED_ERROR_PARAM_TYPE_BLOB ( 7 )
+#endif
+;
+
+union ExtendedErrorParamU {
+       struct ExtendedErrorAString a_string;/* [case(EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING)] */
+       struct ExtendedErrorUString u_string;/* [case(EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING)] */
+       uint32_t uint32;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT32)] */
+       uint16_t uint16;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT16)] */
+       uint64_t uint64;/* [case(EXTENDED_ERROR_PARAM_TYPE_UINT64)] */
+       struct ExtendedErrorBlob blob;/* [case(EXTENDED_ERROR_PARAM_TYPE_BLOB)] */
+}/* [switch_type(ExtendedErrorParamType)] */;
+
+struct ExtendedErrorParam {
+       enum ExtendedErrorParamType type;
+       union ExtendedErrorParamU p;/* [switch_is(type)] */
+};
+
+struct ExtendedErrorInfo {
+       struct ExtendedErrorInfo *next;/* [unique] */
+       struct ExtendedErrorComputerName computer_name;
+       uint64_t pid;
+       NTTIME time;
+       uint32_t generating_component;
+       WERROR status;
+       uint16_t detection_location;
+       uint16_t flags;
+       uint16_t num_params;
+       struct ExtendedErrorParam *params;/* [size_is(num_params)] */
 }/* [public] */;
 
+struct ExtendedErrorInfoPtr {
+       struct ExtendedErrorInfo *info;/* [unique] */
+};
+
 
 struct decode_replPropertyMetaData {
        struct {
@@ -417,9 +516,17 @@ struct decode_trustAuthInOut {
 };
 
 
-struct decode_DsCompressed {
+struct decode_trustDomainPasswords {
+       struct {
+               struct trustDomainPasswords blob;
+       } in;
+
+};
+
+
+struct decode_ExtendedErrorInfo {
        struct {
-               struct DsCompressedBlob blob;
+               struct ExtendedErrorInfoPtr ptr;/* [subcontext(0xFFFFFC01)] */
        } in;
 
 };
index 41a448cbe3b197d82cf4af3b306b52855cf4e2b8..dd8d77ea15a4b65cded03f1c0a66e7f43c4cde34 100644 (file)
@@ -5,6 +5,8 @@
 
 #include "librpc/gen_ndr/ndr_drsuapi.h"
 #include "librpc/gen_ndr/ndr_misc.h"
+#include "librpc/gen_ndr/ndr_samr.h"
+#include "librpc/gen_ndr/ndr_lsa.h"
 static enum ndr_err_code ndr_push_replPropertyMetaData1(struct ndr_push *ndr, int ndr_flags, const struct replPropertyMetaData1 *r)
 {
        if (ndr_flags & NDR_SCALARS) {
@@ -2165,10 +2167,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_package_PrimaryCLEARTEXTBlob(struct ndr_push
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
                {
-                       uint32_t _flags_save_string = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
-                       NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->cleartext));
-                       ndr->flags = _flags_save_string;
+                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+                       NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->cleartext));
+                       ndr->flags = _flags_save_DATA_BLOB;
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -2181,10 +2183,10 @@ _PUBLIC_ enum ndr_err_code ndr_pull_package_PrimaryCLEARTEXTBlob(struct ndr_pull
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
                {
-                       uint32_t _flags_save_string = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_REMAINING);
-                       NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->cleartext));
-                       ndr->flags = _flags_save_string;
+                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
+                       NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->cleartext));
+                       ndr->flags = _flags_save_DATA_BLOB;
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
@@ -2196,7 +2198,7 @@ _PUBLIC_ void ndr_print_package_PrimaryCLEARTEXTBlob(struct ndr_print *ndr, cons
 {
        ndr_print_struct(ndr, name, "package_PrimaryCLEARTEXTBlob");
        ndr->depth++;
-       ndr_print_string(ndr, "cleartext", r->cleartext);
+       ndr_print_DATA_BLOB(ndr, "cleartext", r->cleartext);
        ndr->depth--;
 }
 
@@ -2311,13 +2313,269 @@ _PUBLIC_ void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_trustAuthInOutSecret1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret1 *r)
+static enum ndr_err_code ndr_push_AuthInfoNone(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNone *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfoNone(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNone *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r)
+{
+       ndr_print_struct(ndr, name, "AuthInfoNone");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->size);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_AuthInfoNT4Owf(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoNT4Owf *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 16));
+               NDR_CHECK(ndr_push_samr_Password(ndr, NDR_SCALARS, &r->password));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_samr_Password(ndr, NDR_BUFFERS, &r->password));
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfoNT4Owf(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoNT4Owf *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+               NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_SCALARS, &r->password));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_samr_Password(ndr, NDR_BUFFERS, &r->password));
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r)
+{
+       ndr_print_struct(ndr, name, "AuthInfoNT4Owf");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?16:r->size);
+       ndr_print_samr_Password(ndr, "password", &r->password);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_AuthInfoClear(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoClear *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
+               NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfoClear(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoClear *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+               NDR_PULL_ALLOC_N(ndr, r->password, r->size);
+               NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->password, r->size));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r)
+{
+       ndr_print_struct(ndr, name, "AuthInfoClear");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "size", r->size);
+       ndr_print_array_uint8(ndr, "password", r->password, r->size);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_AuthInfoVersion(struct ndr_push *ndr, int ndr_flags, const struct AuthInfoVersion *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfoVersion(struct ndr_pull *ndr, int ndr_flags, struct AuthInfoVersion *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r)
+{
+       ndr_print_struct(ndr, name, "AuthInfoVersion");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?4:r->size);
+       ndr_print_uint32(ndr, "version", r->version);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_AuthInfo(struct ndr_push *ndr, int ndr_flags, const union AuthInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               switch (level) {
+                       case TRUST_AUTH_TYPE_NONE: {
+                               NDR_CHECK(ndr_push_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
+                       break; }
+
+                       case TRUST_AUTH_TYPE_NT4OWF: {
+                               NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
+                       break; }
+
+                       case TRUST_AUTH_TYPE_CLEAR: {
+                               NDR_CHECK(ndr_push_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
+                       break; }
+
+                       case TRUST_AUTH_TYPE_VERSION: {
+                               NDR_CHECK(ndr_push_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
+                       break; }
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               switch (level) {
+                       case TRUST_AUTH_TYPE_NONE:
+                       break;
+
+                       case TRUST_AUTH_TYPE_NT4OWF:
+                               NDR_CHECK(ndr_push_AuthInfoNT4Owf(ndr, NDR_BUFFERS, &r->nt4owf));
+                       break;
+
+                       case TRUST_AUTH_TYPE_CLEAR:
+                       break;
+
+                       case TRUST_AUTH_TYPE_VERSION:
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_AuthInfo(struct ndr_pull *ndr, int ndr_flags, union AuthInfo *r)
+{
+       int level;
+       level = ndr_pull_get_switch_value(ndr, r);
+       if (ndr_flags & NDR_SCALARS) {
+               switch (level) {
+                       case TRUST_AUTH_TYPE_NONE: {
+                               NDR_CHECK(ndr_pull_AuthInfoNone(ndr, NDR_SCALARS, &r->none));
+                       break; }
+
+                       case TRUST_AUTH_TYPE_NT4OWF: {
+                               NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_SCALARS, &r->nt4owf));
+                       break; }
+
+                       case TRUST_AUTH_TYPE_CLEAR: {
+                               NDR_CHECK(ndr_pull_AuthInfoClear(ndr, NDR_SCALARS, &r->clear));
+                       break; }
+
+                       case TRUST_AUTH_TYPE_VERSION: {
+                               NDR_CHECK(ndr_pull_AuthInfoVersion(ndr, NDR_SCALARS, &r->version));
+                       break; }
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case TRUST_AUTH_TYPE_NONE:
+                       break;
+
+                       case TRUST_AUTH_TYPE_NT4OWF:
+                               NDR_CHECK(ndr_pull_AuthInfoNT4Owf(ndr, NDR_BUFFERS, &r->nt4owf));
+                       break;
+
+                       case TRUST_AUTH_TYPE_CLEAR:
+                       break;
+
+                       case TRUST_AUTH_TYPE_VERSION:
+                       break;
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r)
+{
+       int level;
+       level = ndr_print_get_switch_value(ndr, r);
+       ndr_print_union(ndr, name, level, "AuthInfo");
+       switch (level) {
+               case TRUST_AUTH_TYPE_NONE:
+                       ndr_print_AuthInfoNone(ndr, "none", &r->none);
+               break;
+
+               case TRUST_AUTH_TYPE_NT4OWF:
+                       ndr_print_AuthInfoNT4Owf(ndr, "nt4owf", &r->nt4owf);
+               break;
+
+               case TRUST_AUTH_TYPE_CLEAR:
+                       ndr_print_AuthInfoClear(ndr, "clear", &r->clear);
+               break;
+
+               case TRUST_AUTH_TYPE_VERSION:
+                       ndr_print_AuthInfoVersion(ndr, "version", &r->version);
+               break;
+
+               default:
+                       ndr_print_bad_level(ndr, name, level);
+       }
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
-               NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
+               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->LastUpdateTime));
+               NDR_CHECK(ndr_push_lsa_TrustAuthType(ndr, NDR_SCALARS, r->AuthType));
+               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
+               NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
                {
                        uint32_t _flags_save_DATA_BLOB = ndr->flags;
                        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
@@ -2326,17 +2584,19 @@ static enum ndr_err_code ndr_push_trustAuthInOutSecret1(struct ndr_push *ndr, in
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_AuthInfo(ndr, NDR_BUFFERS, &r->AuthInfo));
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_trustAuthInOutSecret1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret1 *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
-               NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
+               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->LastUpdateTime));
+               NDR_CHECK(ndr_pull_lsa_TrustAuthType(ndr, NDR_SCALARS, &r->AuthType));
+               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->AuthInfo, r->AuthType));
+               NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_SCALARS, &r->AuthInfo));
                {
                        uint32_t _flags_save_DATA_BLOB = ndr->flags;
                        ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
@@ -2345,325 +2605,583 @@ static enum ndr_err_code ndr_pull_trustAuthInOutSecret1(struct ndr_pull *ndr, in
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_AuthInfo(ndr, NDR_BUFFERS, &r->AuthInfo));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutSecret1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret1 *r)
+_PUBLIC_ void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r)
 {
-       ndr_print_struct(ndr, name, "trustAuthInOutSecret1");
+       ndr_print_struct(ndr, name, "AuthenticationInformation");
        ndr->depth++;
-       ndr_print_NTTIME(ndr, "time1", r->time1);
-       ndr_print_uint32(ndr, "unknown1", r->unknown1);
-       ndr_print_DATA_BLOB(ndr, "value", r->value);
+       ndr_print_NTTIME(ndr, "LastUpdateTime", r->LastUpdateTime);
+       ndr_print_lsa_TrustAuthType(ndr, "AuthType", r->AuthType);
+       ndr_print_set_switch_value(ndr, &r->AuthInfo, r->AuthType);
+       ndr_print_AuthInfo(ndr, "AuthInfo", &r->AuthInfo);
        ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_trustAuthInOutCtr1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutCtr1 *r)
+_PUBLIC_ size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, int flags)
 {
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustAuthInOutBlob);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r)
+{
+       uint32_t cntr_current_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value1));
-               NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value2));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
+                       NDR_CHECK(ndr_push_relative_ptr1(ndr, r->current[cntr_current_0]));
+               }
        }
        if (ndr_flags & NDR_BUFFERS) {
-               if (r->value1) {
-                       NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value1));
-                       NDR_CHECK(ndr_push_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value1));
+               for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
+                       if (r->current[cntr_current_0]) {
+                               NDR_CHECK(ndr_push_relative_ptr2(ndr, r->current[cntr_current_0]));
+                               NDR_CHECK(ndr_push_AuthenticationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->current[cntr_current_0]));
+                       }
                }
-               if (r->value2) {
-                       NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value2));
-                       NDR_CHECK(ndr_push_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value2));
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r)
+{
+       uint32_t _ptr_current;
+       uint32_t cntr_current_0;
+       TALLOC_CTX *_mem_save_current_0;
+       TALLOC_CTX *_mem_save_current_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               NDR_PULL_ALLOC_N(ndr, r->current, r->count);
+               _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
+               for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_current));
+                       if (_ptr_current) {
+                               NDR_PULL_ALLOC(ndr, r->current[cntr_current_0]);
+                               NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->current[cntr_current_0], _ptr_current));
+                       } else {
+                               r->current[cntr_current_0] = NULL;
+                       }
+               }
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               _mem_save_current_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->current, 0);
+               for (cntr_current_0 = 0; cntr_current_0 < r->count; cntr_current_0++) {
+                       if (r->current[cntr_current_0]) {
+                               uint32_t _relative_save_offset;
+                               _relative_save_offset = ndr->offset;
+                               NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->current[cntr_current_0]));
+                               _mem_save_current_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                               NDR_PULL_SET_MEM_CTX(ndr, r->current[cntr_current_0], 0);
+                               NDR_CHECK(ndr_pull_AuthenticationInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->current[cntr_current_0]));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_1, 0);
+                               ndr->offset = _relative_save_offset;
+                       }
                }
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_current_0, 0);
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_trustAuthInOutCtr1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutCtr1 *r)
+_PUBLIC_ void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r)
+{
+       uint32_t cntr_current_0;
+       ndr_print_struct(ndr, name, "trustCurrentPasswords");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr->print(ndr, "%s: ARRAY(%d)", "current", (int)r->count);
+       ndr->depth++;
+       for (cntr_current_0=0;cntr_current_0<r->count;cntr_current_0++) {
+               char *idx_0=NULL;
+               if (asprintf(&idx_0, "[%d]", cntr_current_0) != -1) {
+                       ndr_print_ptr(ndr, "current", r->current[cntr_current_0]);
+                       ndr->depth++;
+                       if (r->current[cntr_current_0]) {
+                               ndr_print_AuthenticationInformation(ndr, "current", r->current[cntr_current_0]);
+                       }
+                       ndr->depth--;
+                       free(idx_0);
+               }
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+_PUBLIC_ size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, int flags)
+{
+       return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_trustCurrentPasswords);
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->confounder, 512));
+               {
+                       struct ndr_push *_ndr_outgoing;
+                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags)));
+                       NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_outgoing, NDR_SCALARS|NDR_BUFFERS, &r->outgoing));
+                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_outgoing, 0, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags)));
+               }
+               {
+                       struct ndr_push *_ndr_incoming;
+                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags)));
+                       NDR_CHECK(ndr_push_trustCurrentPasswords(_ndr_incoming, NDR_SCALARS|NDR_BUFFERS, &r->incoming));
+                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_incoming, 0, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags)));
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags)));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r)
+{
+       ndr_print_struct(ndr, name, "trustDomainPasswords");
+       ndr->depth++;
+       ndr_print_array_uint8(ndr, "confounder", r->confounder, 512);
+       ndr_print_trustCurrentPasswords(ndr, "outgoing", &r->outgoing);
+       ndr_print_trustCurrentPasswords(ndr, "incoming", &r->incoming);
+       ndr_print_uint32(ndr, "outgoing_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->outgoing, ndr->flags):r->outgoing_size);
+       ndr_print_uint32(ndr, "incoming_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_trustCurrentPasswords(&r->incoming, ndr->flags):r->incoming_size);
+       ndr->depth--;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
+               NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
 {
-       uint32_t _ptr_value1;
-       TALLOC_CTX *_mem_save_value1_0;
-       uint32_t _ptr_value2;
-       TALLOC_CTX *_mem_save_value2_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value1));
-               if (_ptr_value1) {
-                       NDR_PULL_ALLOC(ndr, r->value1);
-                       NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value1, _ptr_value1));
-               } else {
-                       r->value1 = NULL;
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
+               NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
+{
+       ndr_print_struct(ndr, name, "DsCompressedChunk");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "marker", r->marker);
+       ndr_print_DATA_BLOB(ndr, "data", r->data);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_ExtendedErrorAString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorAString *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->string) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint8_t), CH_DOS));
                }
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value2));
-               if (_ptr_value2) {
-                       NDR_PULL_ALLOC(ndr, r->value2);
-                       NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value2, _ptr_value2));
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ExtendedErrorAString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorAString *r)
+{
+       uint32_t _ptr_string;
+       TALLOC_CTX *_mem_save_string_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
+               if (_ptr_string) {
+                       NDR_PULL_ALLOC(ndr, r->string);
                } else {
-                       r->value2 = NULL;
+                       r->string = NULL;
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
-               if (r->value1) {
-                       uint32_t _relative_save_offset;
-                       _relative_save_offset = ndr->offset;
-                       NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value1));
-                       _mem_save_value1_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->value1, 0);
-                       NDR_CHECK(ndr_pull_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value1));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value1_0, 0);
-                       ndr->offset = _relative_save_offset;
+               if (r->string) {
+                       _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint8_t), CH_DOS));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
                }
-               if (r->value2) {
-                       uint32_t _relative_save_offset;
-                       _relative_save_offset = ndr->offset;
-                       NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value2));
-                       _mem_save_value2_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->value2, 0);
-                       NDR_CHECK(ndr_pull_trustAuthInOutSecret1(ndr, NDR_SCALARS, r->value2));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value2_0, 0);
-                       ndr->offset = _relative_save_offset;
+               if (r->string) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
                }
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutCtr1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr1 *r)
+_PUBLIC_ void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r)
 {
-       ndr_print_struct(ndr, name, "trustAuthInOutCtr1");
+       ndr_print_struct(ndr, name, "ExtendedErrorAString");
        ndr->depth++;
-       ndr_print_ptr(ndr, "value1", r->value1);
+       ndr_print_uint16(ndr, "__size", r->__size);
+       ndr_print_ptr(ndr, "string", r->string);
        ndr->depth++;
-       if (r->value1) {
-               ndr_print_trustAuthInOutSecret1(ndr, "value1", r->value1);
+       if (r->string) {
+               ndr_print_string(ndr, "string", r->string);
        }
        ndr->depth--;
-       ndr_print_ptr(ndr, "value2", r->value2);
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_ExtendedErrorUString(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorUString *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->__size));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->string) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->__size));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->__size, sizeof(uint16_t), CH_UTF16));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ExtendedErrorUString(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorUString *r)
+{
+       uint32_t _ptr_string;
+       TALLOC_CTX *_mem_save_string_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__size));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
+               if (_ptr_string) {
+                       NDR_PULL_ALLOC(ndr, r->string);
+               } else {
+                       r->string = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->string) {
+                       _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
+               }
+               if (r->string) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->__size));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r)
+{
+       ndr_print_struct(ndr, name, "ExtendedErrorUString");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "__size", r->__size);
+       ndr_print_ptr(ndr, "string", r->string);
        ndr->depth++;
-       if (r->value2) {
-               ndr_print_trustAuthInOutSecret1(ndr, "value2", r->value2);
+       if (r->string) {
+               ndr_print_string(ndr, "string", r->string);
        }
        ndr->depth--;
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_trustAuthInOutSecret2V1(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret2V1 *r)
+static enum ndr_err_code ndr_push_ExtendedErrorBlob(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorBlob *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
-               NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
-               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time2));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown4));
-               {
-                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
-                       NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
-                       ndr->flags = _flags_save_DATA_BLOB;
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->length));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->data) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
+                       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ExtendedErrorBlob(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorBlob *r)
+{
+       uint32_t _ptr_data;
+       TALLOC_CTX *_mem_save_data_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
+               if (_ptr_data) {
+                       NDR_PULL_ALLOC(ndr, r->data);
+               } else {
+                       r->data = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->data) {
+                       _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
+                       NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
+                       NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
+               }
+               if (r->data) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->data, r->length));
+               }
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r)
+{
+       ndr_print_struct(ndr, name, "ExtendedErrorBlob");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "length", r->length);
+       ndr_print_ptr(ndr, "data", r->data);
+       ndr->depth++;
+       if (r->data) {
+               ndr_print_array_uint8(ndr, "data", r->data, r->length);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_ExtendedErrorComputerNamePresent(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent r)
+{
+       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_ExtendedErrorComputerNamePresent(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorComputerNamePresent *r)
+{
+       uint16_t v;
+       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r)
+{
+       const char *val = NULL;
+
+       switch (r) {
+               case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_PRESENT"; break;
+               case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: val = "EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT"; break;
+       }
+       ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static enum ndr_err_code ndr_push_ExtendedErrorComputerNameU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorComputerNameU *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, level));
+               switch (level) {
+                       case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
+                               NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
+                       break; }
+
+                       case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
+                       break; }
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               int level = ndr_push_get_switch_value(ndr, r);
+               switch (level) {
+                       case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
+                               NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
+                       break;
+
+                       case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_trustAuthInOutSecret2V1(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret2V1 *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorComputerNameU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorComputerNameU *r)
 {
+       int level;
+       uint16_t _level;
+       level = ndr_pull_get_switch_value(ndr, r);
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
-               NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
-               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time2));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown4));
-               {
-                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
-                       NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
-                       ndr->flags = _flags_save_DATA_BLOB;
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
+               if (_level != level) {
+                       return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+               }
+               switch (level) {
+                       case EXTENDED_ERROR_COMPUTER_NAME_PRESENT: {
+                               NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->name));
+                       break; }
+
+                       case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT: {
+                       break; }
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
+                               NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->name));
+                       break;
+
+                       case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
+                       break;
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutSecret2V1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V1 *r)
+_PUBLIC_ void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r)
 {
-       ndr_print_struct(ndr, name, "trustAuthInOutSecret2V1");
-       ndr->depth++;
-       ndr_print_NTTIME(ndr, "time1", r->time1);
-       ndr_print_uint32(ndr, "unknown1", r->unknown1);
-       ndr_print_DATA_BLOB(ndr, "value", r->value);
-       ndr_print_NTTIME(ndr, "time2", r->time2);
-       ndr_print_uint32(ndr, "unknown2", r->unknown2);
-       ndr_print_uint32(ndr, "unknown3", r->unknown3);
-       ndr_print_uint32(ndr, "unknown4", r->unknown4);
-       ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
-       ndr->depth--;
+       int level;
+       level = ndr_print_get_switch_value(ndr, r);
+       ndr_print_union(ndr, name, level, "ExtendedErrorComputerNameU");
+       switch (level) {
+               case EXTENDED_ERROR_COMPUTER_NAME_PRESENT:
+                       ndr_print_ExtendedErrorUString(ndr, "name", &r->name);
+               break;
+
+               case EXTENDED_ERROR_COMPUTER_NAME_NOT_PRESENT:
+               break;
+
+               default:
+                       ndr_print_bad_level(ndr, name, level);
+       }
 }
 
-static enum ndr_err_code ndr_push_trustAuthInOutSecret2V2(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutSecret2V2 *r)
+static enum ndr_err_code ndr_push_ExtendedErrorComputerName(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorComputerName *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time1));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
-               NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->value));
-               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time2));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown3));
-               {
-                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
-                       NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
-                       ndr->flags = _flags_save_DATA_BLOB;
-               }
+               NDR_CHECK(ndr_push_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, r->present));
+               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->n, r->present));
+               NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
        }
        if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_trustAuthInOutSecret2V2(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutSecret2V2 *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorComputerName(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorComputerName *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time1));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
-               NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->value));
-               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time2));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown3));
-               {
-                       uint32_t _flags_save_DATA_BLOB = ndr->flags;
-                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
-                       NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
-                       ndr->flags = _flags_save_DATA_BLOB;
-               }
+               NDR_CHECK(ndr_pull_ExtendedErrorComputerNamePresent(ndr, NDR_SCALARS, &r->present));
+               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->n, r->present));
+               NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_SCALARS, &r->n));
        }
        if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_ExtendedErrorComputerNameU(ndr, NDR_BUFFERS, &r->n));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutSecret2V2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V2 *r)
+_PUBLIC_ void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r)
 {
-       ndr_print_struct(ndr, name, "trustAuthInOutSecret2V2");
+       ndr_print_struct(ndr, name, "ExtendedErrorComputerName");
        ndr->depth++;
-       ndr_print_NTTIME(ndr, "time1", r->time1);
-       ndr_print_uint32(ndr, "unknown1", r->unknown1);
-       ndr_print_DATA_BLOB(ndr, "value", r->value);
-       ndr_print_NTTIME(ndr, "time2", r->time2);
-       ndr_print_uint32(ndr, "unknown2", r->unknown2);
-       ndr_print_uint32(ndr, "unknown3", r->unknown3);
-       ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
+       ndr_print_ExtendedErrorComputerNamePresent(ndr, "present", r->present);
+       ndr_print_set_switch_value(ndr, &r->n, r->present);
+       ndr_print_ExtendedErrorComputerNameU(ndr, "n", &r->n);
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_trustAuthInOutCtr2(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutCtr2 *r)
+static enum ndr_err_code ndr_push_ExtendedErrorParamType(struct ndr_push *ndr, int ndr_flags, enum ExtendedErrorParamType r)
 {
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value1));
-               NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value2));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->value1) {
-                       NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value1));
-                       NDR_CHECK(ndr_push_trustAuthInOutSecret2V1(ndr, NDR_SCALARS, r->value1));
-               }
-               if (r->value2) {
-                       NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value2));
-                       NDR_CHECK(ndr_push_trustAuthInOutSecret2V2(ndr, NDR_SCALARS, r->value2));
-               }
-       }
+       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_trustAuthInOutCtr2(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutCtr2 *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorParamType(struct ndr_pull *ndr, int ndr_flags, enum ExtendedErrorParamType *r)
 {
-       uint32_t _ptr_value1;
-       TALLOC_CTX *_mem_save_value1_0;
-       uint32_t _ptr_value2;
-       TALLOC_CTX *_mem_save_value2_0;
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value1));
-               if (_ptr_value1) {
-                       NDR_PULL_ALLOC(ndr, r->value1);
-                       NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value1, _ptr_value1));
-               } else {
-                       r->value1 = NULL;
-               }
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value2));
-               if (_ptr_value2) {
-                       NDR_PULL_ALLOC(ndr, r->value2);
-                       NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value2, _ptr_value2));
-               } else {
-                       r->value2 = NULL;
-               }
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->value1) {
-                       uint32_t _relative_save_offset;
-                       _relative_save_offset = ndr->offset;
-                       NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value1));
-                       _mem_save_value1_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->value1, 0);
-                       NDR_CHECK(ndr_pull_trustAuthInOutSecret2V1(ndr, NDR_SCALARS, r->value1));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value1_0, 0);
-                       ndr->offset = _relative_save_offset;
-               }
-               if (r->value2) {
-                       uint32_t _relative_save_offset;
-                       _relative_save_offset = ndr->offset;
-                       NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value2));
-                       _mem_save_value2_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, r->value2, 0);
-                       NDR_CHECK(ndr_pull_trustAuthInOutSecret2V2(ndr, NDR_SCALARS, r->value2));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value2_0, 0);
-                       ndr->offset = _relative_save_offset;
-               }
-       }
+       uint16_t v;
+       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+       *r = v;
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutCtr2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr2 *r)
+_PUBLIC_ void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r)
 {
-       ndr_print_struct(ndr, name, "trustAuthInOutCtr2");
-       ndr->depth++;
-       ndr_print_ptr(ndr, "value1", r->value1);
-       ndr->depth++;
-       if (r->value1) {
-               ndr_print_trustAuthInOutSecret2V1(ndr, "value1", r->value1);
-       }
-       ndr->depth--;
-       ndr_print_ptr(ndr, "value2", r->value2);
-       ndr->depth++;
-       if (r->value2) {
-               ndr_print_trustAuthInOutSecret2V2(ndr, "value2", r->value2);
+       const char *val = NULL;
+
+       switch (r) {
+               case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING"; break;
+               case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: val = "EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING"; break;
+               case EXTENDED_ERROR_PARAM_TYPE_UINT32: val = "EXTENDED_ERROR_PARAM_TYPE_UINT32"; break;
+               case EXTENDED_ERROR_PARAM_TYPE_UINT16: val = "EXTENDED_ERROR_PARAM_TYPE_UINT16"; break;
+               case EXTENDED_ERROR_PARAM_TYPE_UINT64: val = "EXTENDED_ERROR_PARAM_TYPE_UINT64"; break;
+               case EXTENDED_ERROR_PARAM_TYPE_NONE: val = "EXTENDED_ERROR_PARAM_TYPE_NONE"; break;
+               case EXTENDED_ERROR_PARAM_TYPE_BLOB: val = "EXTENDED_ERROR_PARAM_TYPE_BLOB"; break;
        }
-       ndr->depth--;
-       ndr->depth--;
+       ndr_print_enum(ndr, name, "ENUM", val, r);
 }
 
-static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int ndr_flags, const union trustAuthInOutCtr *r)
+static enum ndr_err_code ndr_push_ExtendedErrorParamU(struct ndr_push *ndr, int ndr_flags, const union ExtendedErrorParamU *r)
 {
        if (ndr_flags & NDR_SCALARS) {
                int level = ndr_push_get_switch_value(ndr, r);
+               NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, level));
                switch (level) {
-                       case 1: {
-                               NDR_CHECK(ndr_push_trustAuthInOutCtr1(ndr, NDR_SCALARS, &r->ctr1));
+                       case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
+                               NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
                        break; }
 
-                       case 2: {
-                               NDR_CHECK(ndr_push_trustAuthInOutCtr2(ndr, NDR_SCALARS, &r->ctr2));
+                       case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
+                               NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
+                               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uint32));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
+                               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->uint16));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
+                               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uint64));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_NONE: {
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
+                               NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
                        break; }
 
                        default:
@@ -2673,12 +3191,28 @@ static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int nd
        if (ndr_flags & NDR_BUFFERS) {
                int level = ndr_push_get_switch_value(ndr, r);
                switch (level) {
-                       case 1:
-                               NDR_CHECK(ndr_push_trustAuthInOutCtr1(ndr, NDR_BUFFERS, &r->ctr1));
+                       case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
+                               NDR_CHECK(ndr_push_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
                        break;
 
-                       case 2:
-                               NDR_CHECK(ndr_push_trustAuthInOutCtr2(ndr, NDR_BUFFERS, &r->ctr2));
+                       case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
+                               NDR_CHECK(ndr_push_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT32:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT16:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT64:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_NONE:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_BLOB:
+                               NDR_CHECK(ndr_push_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
                        break;
 
                        default:
@@ -2688,18 +3222,42 @@ static enum ndr_err_code ndr_push_trustAuthInOutCtr(struct ndr_push *ndr, int nd
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int ndr_flags, union trustAuthInOutCtr *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorParamU(struct ndr_pull *ndr, int ndr_flags, union ExtendedErrorParamU *r)
 {
        int level;
+       uint16_t _level;
        level = ndr_pull_get_switch_value(ndr, r);
        if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &_level));
+               if (_level != level) {
+                       return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
+               }
                switch (level) {
-                       case 1: {
-                               NDR_CHECK(ndr_pull_trustAuthInOutCtr1(ndr, NDR_SCALARS, &r->ctr1));
+                       case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING: {
+                               NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_SCALARS, &r->a_string));
                        break; }
 
-                       case 2: {
-                               NDR_CHECK(ndr_pull_trustAuthInOutCtr2(ndr, NDR_SCALARS, &r->ctr2));
+                       case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING: {
+                               NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_SCALARS, &r->u_string));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT32: {
+                               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uint32));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT16: {
+                               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->uint16));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT64: {
+                               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uint64));
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_NONE: {
+                       break; }
+
+                       case EXTENDED_ERROR_PARAM_TYPE_BLOB: {
+                               NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_SCALARS, &r->blob));
                        break; }
 
                        default:
@@ -2708,12 +3266,28 @@ static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int nd
        }
        if (ndr_flags & NDR_BUFFERS) {
                switch (level) {
-                       case 1:
-                               NDR_CHECK(ndr_pull_trustAuthInOutCtr1(ndr, NDR_BUFFERS, &r->ctr1));
+                       case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
+                               NDR_CHECK(ndr_pull_ExtendedErrorAString(ndr, NDR_BUFFERS, &r->a_string));
                        break;
 
-                       case 2:
-                               NDR_CHECK(ndr_pull_trustAuthInOutCtr2(ndr, NDR_BUFFERS, &r->ctr2));
+                       case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
+                               NDR_CHECK(ndr_pull_ExtendedErrorUString(ndr, NDR_BUFFERS, &r->u_string));
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT32:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT16:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_UINT64:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_NONE:
+                       break;
+
+                       case EXTENDED_ERROR_PARAM_TYPE_BLOB:
+                               NDR_CHECK(ndr_pull_ExtendedErrorBlob(ndr, NDR_BUFFERS, &r->blob));
                        break;
 
                        default:
@@ -2723,18 +3297,37 @@ static enum ndr_err_code ndr_pull_trustAuthInOutCtr(struct ndr_pull *ndr, int nd
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *name, const union trustAuthInOutCtr *r)
+_PUBLIC_ void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r)
 {
        int level;
        level = ndr_print_get_switch_value(ndr, r);
-       ndr_print_union(ndr, name, level, "trustAuthInOutCtr");
+       ndr_print_union(ndr, name, level, "ExtendedErrorParamU");
        switch (level) {
-               case 1:
-                       ndr_print_trustAuthInOutCtr1(ndr, "ctr1", &r->ctr1);
+               case EXTENDED_ERROR_PARAM_TYPE_ASCII_STRING:
+                       ndr_print_ExtendedErrorAString(ndr, "a_string", &r->a_string);
                break;
 
-               case 2:
-                       ndr_print_trustAuthInOutCtr2(ndr, "ctr2", &r->ctr2);
+               case EXTENDED_ERROR_PARAM_TYPE_UNICODE_STRING:
+                       ndr_print_ExtendedErrorUString(ndr, "u_string", &r->u_string);
+               break;
+
+               case EXTENDED_ERROR_PARAM_TYPE_UINT32:
+                       ndr_print_uint32(ndr, "uint32", r->uint32);
+               break;
+
+               case EXTENDED_ERROR_PARAM_TYPE_UINT16:
+                       ndr_print_uint16(ndr, "uint16", r->uint16);
+               break;
+
+               case EXTENDED_ERROR_PARAM_TYPE_UINT64:
+                       ndr_print_hyper(ndr, "uint64", r->uint64);
+               break;
+
+               case EXTENDED_ERROR_PARAM_TYPE_NONE:
+               break;
+
+               case EXTENDED_ERROR_PARAM_TYPE_BLOB:
+                       ndr_print_ExtendedErrorBlob(ndr, "blob", &r->blob);
                break;
 
                default:
@@ -2742,118 +3335,205 @@ _PUBLIC_ void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *nam
        }
 }
 
-_PUBLIC_ enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r)
+static enum ndr_err_code ndr_push_ExtendedErrorParam(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorParam *r)
 {
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
-               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->version));
-               NDR_CHECK(ndr_push_trustAuthInOutCtr(ndr, NDR_SCALARS, &r->ctr));
+               NDR_CHECK(ndr_push_align(ndr, 8));
+               NDR_CHECK(ndr_push_ExtendedErrorParamType(ndr, NDR_SCALARS, r->type));
+               NDR_CHECK(ndr_push_set_switch_value(ndr, &r->p, r->type));
+               NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_push_trustAuthInOutCtr(ndr, NDR_BUFFERS, &r->ctr));
+               NDR_CHECK(ndr_push_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorParam(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorParam *r)
 {
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
-               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->version));
-               NDR_CHECK(ndr_pull_trustAuthInOutCtr(ndr, NDR_SCALARS, &r->ctr));
+               NDR_CHECK(ndr_pull_align(ndr, 8));
+               NDR_CHECK(ndr_pull_ExtendedErrorParamType(ndr, NDR_SCALARS, &r->type));
+               NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->p, r->type));
+               NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_SCALARS, &r->p));
        }
        if (ndr_flags & NDR_BUFFERS) {
-               NDR_CHECK(ndr_pull_trustAuthInOutCtr(ndr, NDR_BUFFERS, &r->ctr));
+               NDR_CHECK(ndr_pull_ExtendedErrorParamU(ndr, NDR_BUFFERS, &r->p));
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r)
+_PUBLIC_ void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r)
 {
-       ndr_print_struct(ndr, name, "trustAuthInOutBlob");
+       ndr_print_struct(ndr, name, "ExtendedErrorParam");
        ndr->depth++;
-       ndr_print_uint32(ndr, "version", r->version);
-       ndr_print_set_switch_value(ndr, &r->ctr, r->version);
-       ndr_print_trustAuthInOutCtr(ndr, "ctr", &r->ctr);
+       ndr_print_ExtendedErrorParamType(ndr, "type", r->type);
+       ndr_print_set_switch_value(ndr, &r->p, r->type);
+       ndr_print_ExtendedErrorParamU(ndr, "p", &r->p);
        ndr->depth--;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r)
+_PUBLIC_ enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r)
 {
+       uint32_t cntr_params_0;
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->marker));
-               NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_params));
+               NDR_CHECK(ndr_push_align(ndr, 8));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->next));
+               NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
+               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->pid));
+               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->generating_component));
+               NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->status));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->detection_location));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->flags));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_params));
+               for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
+                       NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
+               }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               if (r->next) {
+                       NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
+               }
+               NDR_CHECK(ndr_push_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
+               for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
+                       NDR_CHECK(ndr_push_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r)
 {
+       uint32_t _ptr_next;
+       TALLOC_CTX *_mem_save_next_0;
+       uint32_t cntr_params_0;
+       TALLOC_CTX *_mem_save_params_0;
        if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->marker));
-               NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
+               NDR_CHECK(ndr_pull_array_size(ndr, &r->params));
+               NDR_CHECK(ndr_pull_align(ndr, 8));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_next));
+               if (_ptr_next) {
+                       NDR_PULL_ALLOC(ndr, r->next);
+               } else {
+                       r->next = NULL;
+               }
+               NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_SCALARS, &r->computer_name));
+               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->pid));
+               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->generating_component));
+               NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->status));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->detection_location));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->flags));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_params));
+               NDR_PULL_ALLOC_N(ndr, r->params, ndr_get_array_size(ndr, &r->params));
+               _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
+               for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
+                       NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_SCALARS, &r->params[cntr_params_0]));
+               }
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
+               if (r->params) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->params, r->num_params));
+               }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               if (r->next) {
+                       _mem_save_next_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->next, 0);
+                       NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->next));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_next_0, 0);
+               }
+               NDR_CHECK(ndr_pull_ExtendedErrorComputerName(ndr, NDR_BUFFERS, &r->computer_name));
+               _mem_save_params_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->params, 0);
+               for (cntr_params_0 = 0; cntr_params_0 < r->num_params; cntr_params_0++) {
+                       NDR_CHECK(ndr_pull_ExtendedErrorParam(ndr, NDR_BUFFERS, &r->params[cntr_params_0]));
+               }
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_params_0, 0);
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r)
+_PUBLIC_ void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r)
 {
-       ndr_print_struct(ndr, name, "DsCompressedChunk");
+       uint32_t cntr_params_0;
+       ndr_print_struct(ndr, name, "ExtendedErrorInfo");
        ndr->depth++;
-       ndr_print_uint32(ndr, "marker", r->marker);
-       ndr_print_DATA_BLOB(ndr, "data", r->data);
+       ndr_print_ptr(ndr, "next", r->next);
+       ndr->depth++;
+       if (r->next) {
+               ndr_print_ExtendedErrorInfo(ndr, "next", r->next);
+       }
+       ndr->depth--;
+       ndr_print_ExtendedErrorComputerName(ndr, "computer_name", &r->computer_name);
+       ndr_print_hyper(ndr, "pid", r->pid);
+       ndr_print_NTTIME(ndr, "time", r->time);
+       ndr_print_uint32(ndr, "generating_component", r->generating_component);
+       ndr_print_WERROR(ndr, "status", r->status);
+       ndr_print_uint16(ndr, "detection_location", r->detection_location);
+       ndr_print_uint16(ndr, "flags", r->flags);
+       ndr_print_uint16(ndr, "num_params", r->num_params);
+       ndr->print(ndr, "%s: ARRAY(%d)", "params", (int)r->num_params);
+       ndr->depth++;
+       for (cntr_params_0=0;cntr_params_0<r->num_params;cntr_params_0++) {
+               char *idx_0=NULL;
+               if (asprintf(&idx_0, "[%d]", cntr_params_0) != -1) {
+                       ndr_print_ExtendedErrorParam(ndr, "params", &r->params[cntr_params_0]);
+                       free(idx_0);
+               }
+       }
+       ndr->depth--;
        ndr->depth--;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_push_DsCompressedBlob(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedBlob *r)
+static enum ndr_err_code ndr_push_ExtendedErrorInfoPtr(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfoPtr *r)
 {
-       uint32_t cntr_chunks_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_push_align(ndr, 4));
-               for (cntr_chunks_0 = 0; cntr_chunks_0 < 5; cntr_chunks_0++) {
-                       NDR_CHECK(ndr_push_DsCompressedChunk(ndr, NDR_SCALARS, &r->chunks[cntr_chunks_0]));
-               }
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->info));
        }
        if (ndr_flags & NDR_BUFFERS) {
+               if (r->info) {
+                       NDR_CHECK(ndr_push_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ enum ndr_err_code ndr_pull_DsCompressedBlob(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedBlob *r)
+static enum ndr_err_code ndr_pull_ExtendedErrorInfoPtr(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfoPtr *r)
 {
-       uint32_t cntr_chunks_0;
+       uint32_t _ptr_info;
+       TALLOC_CTX *_mem_save_info_0;
        if (ndr_flags & NDR_SCALARS) {
                NDR_CHECK(ndr_pull_align(ndr, 4));
-               for (cntr_chunks_0 = 0; cntr_chunks_0 < 5; cntr_chunks_0++) {
-                       NDR_CHECK(ndr_pull_DsCompressedChunk(ndr, NDR_SCALARS, &r->chunks[cntr_chunks_0]));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+               if (_ptr_info) {
+                       NDR_PULL_ALLOC(ndr, r->info);
+               } else {
+                       r->info = NULL;
                }
        }
        if (ndr_flags & NDR_BUFFERS) {
+               if (r->info) {
+                       _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->info, 0);
+                       NDR_CHECK(ndr_pull_ExtendedErrorInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_DsCompressedBlob(struct ndr_print *ndr, const char *name, const struct DsCompressedBlob *r)
+_PUBLIC_ void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r)
 {
-       uint32_t cntr_chunks_0;
-       ndr_print_struct(ndr, name, "DsCompressedBlob");
+       ndr_print_struct(ndr, name, "ExtendedErrorInfoPtr");
        ndr->depth++;
-       ndr->print(ndr, "%s: ARRAY(%d)", "chunks", (int)5);
+       ndr_print_ptr(ndr, "info", r->info);
        ndr->depth++;
-       for (cntr_chunks_0=0;cntr_chunks_0<5;cntr_chunks_0++) {
-               char *idx_0=NULL;
-               if (asprintf(&idx_0, "[%d]", cntr_chunks_0) != -1) {
-                       ndr_print_DsCompressedChunk(ndr, "chunks", &r->chunks[cntr_chunks_0]);
-                       free(idx_0);
-               }
+       if (r->info) {
+               ndr_print_ExtendedErrorInfo(ndr, "info", r->info);
        }
        ndr->depth--;
        ndr->depth--;
@@ -3351,41 +4031,92 @@ _PUBLIC_ void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char
        ndr->depth--;
 }
 
-static enum ndr_err_code ndr_push_decode_DsCompressed(struct ndr_push *ndr, int flags, const struct decode_DsCompressed *r)
+static enum ndr_err_code ndr_push_decode_trustDomainPasswords(struct ndr_push *ndr, int flags, const struct decode_trustDomainPasswords *r)
+{
+       if (flags & NDR_IN) {
+               NDR_CHECK(ndr_push_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
+       }
+       if (flags & NDR_OUT) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_decode_trustDomainPasswords(struct ndr_pull *ndr, int flags, struct decode_trustDomainPasswords *r)
+{
+       if (flags & NDR_IN) {
+               NDR_CHECK(ndr_pull_trustDomainPasswords(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.blob));
+       }
+       if (flags & NDR_OUT) {
+       }
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r)
+{
+       ndr_print_struct(ndr, name, "decode_trustDomainPasswords");
+       ndr->depth++;
+       if (flags & NDR_SET_VALUES) {
+               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+       }
+       if (flags & NDR_IN) {
+               ndr_print_struct(ndr, "in", "decode_trustDomainPasswords");
+               ndr->depth++;
+               ndr_print_trustDomainPasswords(ndr, "blob", &r->in.blob);
+               ndr->depth--;
+       }
+       if (flags & NDR_OUT) {
+               ndr_print_struct(ndr, "out", "decode_trustDomainPasswords");
+               ndr->depth++;
+               ndr->depth--;
+       }
+       ndr->depth--;
+}
+
+static enum ndr_err_code ndr_push_decode_ExtendedErrorInfo(struct ndr_push *ndr, int flags, const struct decode_ExtendedErrorInfo *r)
 {
        if (flags & NDR_IN) {
-               NDR_CHECK(ndr_push_DsCompressedBlob(ndr, NDR_SCALARS, &r->in.blob));
+               {
+                       struct ndr_push *_ndr_ptr;
+                       NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
+                       NDR_CHECK(ndr_push_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
+                       NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
+               }
        }
        if (flags & NDR_OUT) {
        }
        return NDR_ERR_SUCCESS;
 }
 
-static enum ndr_err_code ndr_pull_decode_DsCompressed(struct ndr_pull *ndr, int flags, struct decode_DsCompressed *r)
+static enum ndr_err_code ndr_pull_decode_ExtendedErrorInfo(struct ndr_pull *ndr, int flags, struct decode_ExtendedErrorInfo *r)
 {
        if (flags & NDR_IN) {
-               NDR_CHECK(ndr_pull_DsCompressedBlob(ndr, NDR_SCALARS, &r->in.blob));
+               {
+                       struct ndr_pull *_ndr_ptr;
+                       NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_ptr, 0xFFFFFC01, -1));
+                       NDR_CHECK(ndr_pull_ExtendedErrorInfoPtr(_ndr_ptr, NDR_SCALARS|NDR_BUFFERS, &r->in.ptr));
+                       NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_ptr, 0xFFFFFC01, -1));
+               }
        }
        if (flags & NDR_OUT) {
        }
        return NDR_ERR_SUCCESS;
 }
 
-_PUBLIC_ void ndr_print_decode_DsCompressed(struct ndr_print *ndr, const char *name, int flags, const struct decode_DsCompressed *r)
+_PUBLIC_ void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r)
 {
-       ndr_print_struct(ndr, name, "decode_DsCompressed");
+       ndr_print_struct(ndr, name, "decode_ExtendedErrorInfo");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
                ndr->flags |= LIBNDR_PRINT_SET_VALUES;
        }
        if (flags & NDR_IN) {
-               ndr_print_struct(ndr, "in", "decode_DsCompressed");
+               ndr_print_struct(ndr, "in", "decode_ExtendedErrorInfo");
                ndr->depth++;
-               ndr_print_DsCompressedBlob(ndr, "blob", &r->in.blob);
+               ndr_print_ExtendedErrorInfoPtr(ndr, "ptr", &r->in.ptr);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
-               ndr_print_struct(ndr, "out", "decode_DsCompressed");
+               ndr_print_struct(ndr, "out", "decode_ExtendedErrorInfo");
                ndr->depth++;
                ndr->depth--;
        }
@@ -3490,11 +4221,19 @@ static const struct ndr_interface_call drsblobs_calls[] = {
                false,
        },
        {
-               "decode_DsCompressed",
-               sizeof(struct decode_DsCompressed),
-               (ndr_push_flags_fn_t) ndr_push_decode_DsCompressed,
-               (ndr_pull_flags_fn_t) ndr_pull_decode_DsCompressed,
-               (ndr_print_function_t) ndr_print_decode_DsCompressed,
+               "decode_trustDomainPasswords",
+               sizeof(struct decode_trustDomainPasswords),
+               (ndr_push_flags_fn_t) ndr_push_decode_trustDomainPasswords,
+               (ndr_pull_flags_fn_t) ndr_pull_decode_trustDomainPasswords,
+               (ndr_print_function_t) ndr_print_decode_trustDomainPasswords,
+               false,
+       },
+       {
+               "decode_ExtendedErrorInfo",
+               sizeof(struct decode_ExtendedErrorInfo),
+               (ndr_push_flags_fn_t) ndr_push_decode_ExtendedErrorInfo,
+               (ndr_pull_flags_fn_t) ndr_pull_decode_ExtendedErrorInfo,
+               (ndr_print_function_t) ndr_print_decode_ExtendedErrorInfo,
                false,
        },
        { NULL, 0, NULL, NULL, NULL, false }
@@ -3526,7 +4265,7 @@ const struct ndr_interface_table ndr_table_drsblobs = {
                NDR_DRSBLOBS_VERSION
        },
        .helpstring     = NDR_DRSBLOBS_HELPSTRING,
-       .num_calls      = 13,
+       .num_calls      = 14,
        .calls          = drsblobs_calls,
        .endpoints      = &drsblobs_endpoints,
        .authservices   = &drsblobs_authservices
index 171e7e25a144f5464448e1e31a44d28414dc8f0c..8a5298874a237d6d8e6683d3c58c8c0ce059f578 100644 (file)
@@ -35,9 +35,11 @@ extern const struct ndr_interface_table ndr_table_drsblobs;
 
 #define NDR_DECODE_TRUSTAUTHINOUT (0x0b)
 
-#define NDR_DECODE_DSCOMPRESSED (0x0c)
+#define NDR_DECODE_TRUSTDOMAINPASSWORDS (0x0c)
 
-#define NDR_DRSBLOBS_CALL_COUNT (13)
+#define NDR_DECODE_EXTENDEDERRORINFO (0x0d)
+
+#define NDR_DRSBLOBS_CALL_COUNT (14)
 void ndr_print_replPropertyMetaData1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaData1 *r);
 void ndr_print_replPropertyMetaDataCtr1(struct ndr_print *ndr, const char *name, const struct replPropertyMetaDataCtr1 *r);
 void ndr_print_replPropertyMetaDataCtr(struct ndr_print *ndr, const char *name, const union replPropertyMetaDataCtr *r);
@@ -102,21 +104,44 @@ void ndr_print_package_PrimaryWDigestHash(struct ndr_print *ndr, const char *nam
 enum ndr_err_code ndr_push_package_PrimaryWDigestBlob(struct ndr_push *ndr, int ndr_flags, const struct package_PrimaryWDigestBlob *r);
 enum ndr_err_code ndr_pull_package_PrimaryWDigestBlob(struct ndr_pull *ndr, int ndr_flags, struct package_PrimaryWDigestBlob *r);
 void ndr_print_package_PrimaryWDigestBlob(struct ndr_print *ndr, const char *name, const struct package_PrimaryWDigestBlob *r);
-void ndr_print_trustAuthInOutSecret1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret1 *r);
-void ndr_print_trustAuthInOutCtr1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr1 *r);
-void ndr_print_trustAuthInOutSecret2V1(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V1 *r);
-void ndr_print_trustAuthInOutSecret2V2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutSecret2V2 *r);
-void ndr_print_trustAuthInOutCtr2(struct ndr_print *ndr, const char *name, const struct trustAuthInOutCtr2 *r);
-void ndr_print_trustAuthInOutCtr(struct ndr_print *ndr, const char *name, const union trustAuthInOutCtr *r);
+void ndr_print_AuthInfoNone(struct ndr_print *ndr, const char *name, const struct AuthInfoNone *r);
+void ndr_print_AuthInfoNT4Owf(struct ndr_print *ndr, const char *name, const struct AuthInfoNT4Owf *r);
+void ndr_print_AuthInfoClear(struct ndr_print *ndr, const char *name, const struct AuthInfoClear *r);
+void ndr_print_AuthInfoVersion(struct ndr_print *ndr, const char *name, const struct AuthInfoVersion *r);
+void ndr_print_AuthInfo(struct ndr_print *ndr, const char *name, const union AuthInfo *r);
+enum ndr_err_code ndr_push_AuthenticationInformation(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformation *r);
+enum ndr_err_code ndr_pull_AuthenticationInformation(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformation *r);
+void ndr_print_AuthenticationInformation(struct ndr_print *ndr, const char *name, const struct AuthenticationInformation *r);
+enum ndr_err_code ndr_push_AuthenticationInformationArray(struct ndr_push *ndr, int ndr_flags, const struct AuthenticationInformationArray *r);
+enum ndr_err_code ndr_pull_AuthenticationInformationArray(struct ndr_pull *ndr, int ndr_flags, struct AuthenticationInformationArray *r);
+void ndr_print_AuthenticationInformationArray(struct ndr_print *ndr, const char *name, const struct AuthenticationInformationArray *r);
 enum ndr_err_code ndr_push_trustAuthInOutBlob(struct ndr_push *ndr, int ndr_flags, const struct trustAuthInOutBlob *r);
 enum ndr_err_code ndr_pull_trustAuthInOutBlob(struct ndr_pull *ndr, int ndr_flags, struct trustAuthInOutBlob *r);
 void ndr_print_trustAuthInOutBlob(struct ndr_print *ndr, const char *name, const struct trustAuthInOutBlob *r);
+size_t ndr_size_trustAuthInOutBlob(const struct trustAuthInOutBlob *r, int flags);
+enum ndr_err_code ndr_push_trustCurrentPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustCurrentPasswords *r);
+enum ndr_err_code ndr_pull_trustCurrentPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustCurrentPasswords *r);
+void ndr_print_trustCurrentPasswords(struct ndr_print *ndr, const char *name, const struct trustCurrentPasswords *r);
+size_t ndr_size_trustCurrentPasswords(const struct trustCurrentPasswords *r, int flags);
+enum ndr_err_code ndr_push_trustDomainPasswords(struct ndr_push *ndr, int ndr_flags, const struct trustDomainPasswords *r);
+enum ndr_err_code ndr_pull_trustDomainPasswords(struct ndr_pull *ndr, int ndr_flags, struct trustDomainPasswords *r);
+void ndr_print_trustDomainPasswords(struct ndr_print *ndr, const char *name, const struct trustDomainPasswords *r);
 enum ndr_err_code ndr_push_DsCompressedChunk(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedChunk *r);
 enum ndr_err_code ndr_pull_DsCompressedChunk(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedChunk *r);
 void ndr_print_DsCompressedChunk(struct ndr_print *ndr, const char *name, const struct DsCompressedChunk *r);
-enum ndr_err_code ndr_push_DsCompressedBlob(struct ndr_push *ndr, int ndr_flags, const struct DsCompressedBlob *r);
-enum ndr_err_code ndr_pull_DsCompressedBlob(struct ndr_pull *ndr, int ndr_flags, struct DsCompressedBlob *r);
-void ndr_print_DsCompressedBlob(struct ndr_print *ndr, const char *name, const struct DsCompressedBlob *r);
+void ndr_print_ExtendedErrorAString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorAString *r);
+void ndr_print_ExtendedErrorUString(struct ndr_print *ndr, const char *name, const struct ExtendedErrorUString *r);
+void ndr_print_ExtendedErrorBlob(struct ndr_print *ndr, const char *name, const struct ExtendedErrorBlob *r);
+void ndr_print_ExtendedErrorComputerNamePresent(struct ndr_print *ndr, const char *name, enum ExtendedErrorComputerNamePresent r);
+void ndr_print_ExtendedErrorComputerNameU(struct ndr_print *ndr, const char *name, const union ExtendedErrorComputerNameU *r);
+void ndr_print_ExtendedErrorComputerName(struct ndr_print *ndr, const char *name, const struct ExtendedErrorComputerName *r);
+void ndr_print_ExtendedErrorParamType(struct ndr_print *ndr, const char *name, enum ExtendedErrorParamType r);
+void ndr_print_ExtendedErrorParamU(struct ndr_print *ndr, const char *name, const union ExtendedErrorParamU *r);
+void ndr_print_ExtendedErrorParam(struct ndr_print *ndr, const char *name, const struct ExtendedErrorParam *r);
+enum ndr_err_code ndr_push_ExtendedErrorInfo(struct ndr_push *ndr, int ndr_flags, const struct ExtendedErrorInfo *r);
+enum ndr_err_code ndr_pull_ExtendedErrorInfo(struct ndr_pull *ndr, int ndr_flags, struct ExtendedErrorInfo *r);
+void ndr_print_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfo *r);
+void ndr_print_ExtendedErrorInfoPtr(struct ndr_print *ndr, const char *name, const struct ExtendedErrorInfoPtr *r);
 void ndr_print_decode_replPropertyMetaData(struct ndr_print *ndr, const char *name, int flags, const struct decode_replPropertyMetaData *r);
 void ndr_print_decode_replUpToDateVector(struct ndr_print *ndr, const char *name, int flags, const struct decode_replUpToDateVector *r);
 void ndr_print_decode_repsFromTo(struct ndr_print *ndr, const char *name, int flags, const struct decode_repsFromTo *r);
@@ -129,5 +154,6 @@ void ndr_print_decode_PrimaryKerberos(struct ndr_print *ndr, const char *name, i
 void ndr_print_decode_PrimaryCLEARTEXT(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryCLEARTEXT *r);
 void ndr_print_decode_PrimaryWDigest(struct ndr_print *ndr, const char *name, int flags, const struct decode_PrimaryWDigest *r);
 void ndr_print_decode_trustAuthInOut(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustAuthInOut *r);
-void ndr_print_decode_DsCompressed(struct ndr_print *ndr, const char *name, int flags, const struct decode_DsCompressed *r);
+void ndr_print_decode_trustDomainPasswords(struct ndr_print *ndr, const char *name, int flags, const struct decode_trustDomainPasswords *r);
+void ndr_print_decode_ExtendedErrorInfo(struct ndr_print *ndr, const char *name, int flags, const struct decode_ExtendedErrorInfo *r);
 #endif /* _HEADER_NDR_drsblobs */
index e65bc62301d6346c74c9fc1696d8f5a0199d9e0e..4b5ead467f156edae5a10e495a6fc405533bb2df 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef _HEADER_NDR_drsuapi
 #define _HEADER_NDR_drsuapi
 
-#include "librpc/ndr/ndr_drsuapi.h"
+#include "../librpc/ndr/ndr_drsuapi.h"
 #define NDR_DRSUAPI_UUID "e3514235-4b06-11d1-ab04-00c04fc2dcd2"
 #define NDR_DRSUAPI_VERSION 4.0
 #define NDR_DRSUAPI_NAME "drsuapi"
index 62acf474ae77de2b1cbaa2ea3f010a10560ce664..35d02a0dcbb3b58740b609155208b626c6f66185 100644 (file)
@@ -508,9 +508,35 @@ _PUBLIC_ void ndr_print_PNP_EnumerateSubKeys(struct ndr_print *ndr, const char *
 
 static enum ndr_err_code ndr_push_PNP_GetDeviceList(struct ndr_push *ndr, int flags, const struct PNP_GetDeviceList *r)
 {
+       uint32_t cntr_buffer_1;
        if (flags & NDR_IN) {
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.filter));
+               if (r->in.filter) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.filter, CH_UTF16)));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.filter, CH_UTF16)));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.filter, ndr_charset_length(r->in.filter, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+               }
+               if (r->in.length == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.length));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
        }
        if (flags & NDR_OUT) {
+               if (r->out.buffer == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
+               for (cntr_buffer_1 = 0; cntr_buffer_1 < *r->out.length; cntr_buffer_1++) {
+                       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->out.buffer[cntr_buffer_1]));
+               }
+               if (r->out.length == NULL) {
+                       return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
        }
        return NDR_ERR_SUCCESS;
@@ -518,16 +544,81 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceList(struct ndr_push *ndr, int fl
 
 static enum ndr_err_code ndr_pull_PNP_GetDeviceList(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceList *r)
 {
+       uint32_t _ptr_filter;
+       uint32_t cntr_buffer_1;
+       TALLOC_CTX *_mem_save_filter_0;
+       TALLOC_CTX *_mem_save_buffer_1;
+       TALLOC_CTX *_mem_save_length_0;
        if (flags & NDR_IN) {
+               ZERO_STRUCT(r->out);
+
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_filter));
+               if (_ptr_filter) {
+                       NDR_PULL_ALLOC(ndr, r->in.filter);
+               } else {
+                       r->in.filter = NULL;
+               }
+               if (r->in.filter) {
+                       _mem_save_filter_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->in.filter, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->in.filter));
+                       NDR_CHECK(ndr_pull_array_length(ndr, &r->in.filter));
+                       if (ndr_get_array_length(ndr, &r->in.filter) > ndr_get_array_size(ndr, &r->in.filter)) {
+                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.filter), ndr_get_array_length(ndr, &r->in.filter));
+                       }
+                       NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.filter), sizeof(uint16_t)));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.filter, ndr_get_array_length(ndr, &r->in.filter), sizeof(uint16_t), CH_UTF16));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filter_0, 0);
+               }
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.length);
+               }
+               _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.length, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.length));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+               NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.length);
+               memset(r->out.buffer, 0, (*r->in.length) * sizeof(*r->out.buffer));
+               NDR_PULL_ALLOC(ndr, r->out.length);
+               *r->out.length = *r->in.length;
        }
        if (flags & NDR_OUT) {
+               NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
+               NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer));
+               if (ndr_get_array_length(ndr, &r->out.buffer) > ndr_get_array_size(ndr, &r->out.buffer)) {
+                       return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->out.buffer), ndr_get_array_length(ndr, &r->out.buffer));
+               }
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
+               }
+               _mem_save_buffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, 0);
+               for (cntr_buffer_1 = 0; cntr_buffer_1 < *r->out.length; cntr_buffer_1++) {
+                       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->out.buffer[cntr_buffer_1]));
+               }
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_1, 0);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.length);
+               }
+               _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.length, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.length));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
+               if (r->out.buffer) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, *r->out.length));
+               }
+               if (r->out.buffer) {
+                       NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.buffer, *r->out.length));
+               }
        }
        return NDR_ERR_SUCCESS;
 }
 
 _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *name, int flags, const struct PNP_GetDeviceList *r)
 {
+       uint32_t cntr_buffer_1;
        ndr_print_struct(ndr, name, "PNP_GetDeviceList");
        ndr->depth++;
        if (flags & NDR_SET_VALUES) {
@@ -536,11 +627,39 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceList(struct ndr_print *ndr, const char *nam
        if (flags & NDR_IN) {
                ndr_print_struct(ndr, "in", "PNP_GetDeviceList");
                ndr->depth++;
+               ndr_print_ptr(ndr, "filter", r->in.filter);
+               ndr->depth++;
+               if (r->in.filter) {
+                       ndr_print_string(ndr, "filter", r->in.filter);
+               }
+               ndr->depth--;
+               ndr_print_ptr(ndr, "length", r->in.length);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "length", *r->in.length);
+               ndr->depth--;
+               ndr_print_uint32(ndr, "flags", r->in.flags);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "PNP_GetDeviceList");
                ndr->depth++;
+               ndr_print_ptr(ndr, "buffer", r->out.buffer);
+               ndr->depth++;
+               ndr->print(ndr, "%s: ARRAY(%d)", "buffer", (int)*r->out.length);
+               ndr->depth++;
+               for (cntr_buffer_1=0;cntr_buffer_1<*r->out.length;cntr_buffer_1++) {
+                       char *idx_1=NULL;
+                       if (asprintf(&idx_1, "[%d]", cntr_buffer_1) != -1) {
+                               ndr_print_uint16(ndr, "buffer", r->out.buffer[cntr_buffer_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+               ndr->depth--;
+               ndr_print_ptr(ndr, "length", r->out.length);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "length", *r->out.length);
+               ndr->depth--;
                ndr_print_WERROR(ndr, "result", r->out.result);
                ndr->depth--;
        }
@@ -696,10 +815,10 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.devicepath, CH_UTF16)));
                NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.devicepath, ndr_charset_length(r->in.devicepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.property));
-               if (r->in.unknown1 == NULL) {
+               if (r->in.reg_data_type == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.unknown1));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.reg_data_type));
                if (r->in.buffer_size == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
@@ -708,13 +827,13 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.needed));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown3));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
        }
        if (flags & NDR_OUT) {
-               if (r->out.unknown1 == NULL) {
+               if (r->out.reg_data_type == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.unknown1));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.reg_data_type));
                if (r->out.buffer == NULL) {
                        return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
                }
@@ -737,7 +856,7 @@ static enum ndr_err_code ndr_push_PNP_GetDeviceRegProp(struct ndr_push *ndr, int
 
 static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int flags, struct PNP_GetDeviceRegProp *r)
 {
-       TALLOC_CTX *_mem_save_unknown1_0;
+       TALLOC_CTX *_mem_save_reg_data_type_0;
        TALLOC_CTX *_mem_save_buffer_size_0;
        TALLOC_CTX *_mem_save_needed_0;
        if (flags & NDR_IN) {
@@ -752,12 +871,12 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int
                NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.devicepath, ndr_get_array_length(ndr, &r->in.devicepath), sizeof(uint16_t), CH_UTF16));
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.property));
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->in.unknown1);
+                       NDR_PULL_ALLOC(ndr, r->in.reg_data_type);
                }
-               _mem_save_unknown1_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown1, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.unknown1));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown1_0, LIBNDR_FLAG_REF_ALLOC);
+               _mem_save_reg_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.reg_data_type, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.reg_data_type));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_data_type_0, LIBNDR_FLAG_REF_ALLOC);
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
                        NDR_PULL_ALLOC(ndr, r->in.buffer_size);
                }
@@ -772,9 +891,9 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int
                NDR_PULL_SET_MEM_CTX(ndr, r->in.needed, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.needed));
                NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown3));
-               NDR_PULL_ALLOC(ndr, r->out.unknown1);
-               *r->out.unknown1 = *r->in.unknown1;
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
+               NDR_PULL_ALLOC(ndr, r->out.reg_data_type);
+               *r->out.reg_data_type = *r->in.reg_data_type;
                NDR_PULL_ALLOC_N(ndr, r->out.buffer, *r->in.buffer_size);
                memset(r->out.buffer, 0, (*r->in.buffer_size) * sizeof(*r->out.buffer));
                NDR_PULL_ALLOC(ndr, r->out.buffer_size);
@@ -784,12 +903,12 @@ static enum ndr_err_code ndr_pull_PNP_GetDeviceRegProp(struct ndr_pull *ndr, int
        }
        if (flags & NDR_OUT) {
                if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
-                       NDR_PULL_ALLOC(ndr, r->out.unknown1);
+                       NDR_PULL_ALLOC(ndr, r->out.reg_data_type);
                }
-               _mem_save_unknown1_0 = NDR_PULL_GET_MEM_CTX(ndr);
-               NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown1, LIBNDR_FLAG_REF_ALLOC);
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.unknown1));
-               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown1_0, LIBNDR_FLAG_REF_ALLOC);
+               _mem_save_reg_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.reg_data_type, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.reg_data_type));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_data_type_0, LIBNDR_FLAG_REF_ALLOC);
                NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
                NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer));
                if (ndr_get_array_length(ndr, &r->out.buffer) > ndr_get_array_size(ndr, &r->out.buffer)) {
@@ -839,9 +958,9 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *
                ndr_print_string(ndr, "devicepath", r->in.devicepath);
                ndr->depth--;
                ndr_print_uint32(ndr, "property", r->in.property);
-               ndr_print_ptr(ndr, "unknown1", r->in.unknown1);
+               ndr_print_ptr(ndr, "reg_data_type", r->in.reg_data_type);
                ndr->depth++;
-               ndr_print_uint32(ndr, "unknown1", *r->in.unknown1);
+               ndr_print_uint32(ndr, "reg_data_type", *r->in.reg_data_type);
                ndr->depth--;
                ndr_print_ptr(ndr, "buffer_size", r->in.buffer_size);
                ndr->depth++;
@@ -851,15 +970,15 @@ _PUBLIC_ void ndr_print_PNP_GetDeviceRegProp(struct ndr_print *ndr, const char *
                ndr->depth++;
                ndr_print_uint32(ndr, "needed", *r->in.needed);
                ndr->depth--;
-               ndr_print_uint32(ndr, "unknown3", r->in.unknown3);
+               ndr_print_uint32(ndr, "flags", r->in.flags);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
                ndr_print_struct(ndr, "out", "PNP_GetDeviceRegProp");
                ndr->depth++;
-               ndr_print_ptr(ndr, "unknown1", r->out.unknown1);
+               ndr_print_ptr(ndr, "reg_data_type", r->out.reg_data_type);
                ndr->depth++;
-               ndr_print_uint32(ndr, "unknown1", *r->out.unknown1);
+               ndr_print_uint32(ndr, "reg_data_type", *r->out.reg_data_type);
                ndr->depth--;
                ndr_print_ptr(ndr, "buffer", r->out.buffer);
                ndr->depth++;
index 95484e49f5063ff7fc396a9e39fe68a6645652bc..b56b552ae28089d861bacf35a9b7f2cfd39e390c 100644 (file)
@@ -101,6 +101,14 @@ struct PNP_EnumerateSubKeys {
 
 struct PNP_GetDeviceList {
        struct {
+               const char *filter;/* [unique,charset(UTF16)] */
+               uint32_t flags;
+               uint32_t *length;/* [ref] */
+       } in;
+
+       struct {
+               uint16_t *buffer;/* [ref,length_is(*length),size_is(*length)] */
+               uint32_t *length;/* [ref] */
                WERROR result;
        } out;
 
@@ -133,15 +141,15 @@ struct PNP_GetDeviceRegProp {
        struct {
                const char *devicepath;/* [ref,charset(UTF16)] */
                uint32_t property;
-               uint32_t unknown3;
-               uint32_t *unknown1;/* [ref] */
+               uint32_t flags;
+               uint32_t *reg_data_type;/* [ref] */
                uint32_t *buffer_size;/* [ref] */
                uint32_t *needed;/* [ref] */
        } in;
 
        struct {
                uint8_t *buffer;/* [ref,length_is(*buffer_size),size_is(*buffer_size)] */
-               uint32_t *unknown1;/* [ref] */
+               uint32_t *reg_data_type;/* [ref] */
                uint32_t *buffer_size;/* [ref] */
                uint32_t *needed;/* [ref] */
                WERROR result;
index 184d8608fbe390de3f903073c2388ef678910204..87f5d51695c5d6f8c9d668324dfaafb838db9a05 100644 (file)
@@ -781,6 +781,14 @@ static bool api_PNP_GetDeviceList(pipes_struct *p)
                NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, r);
        }
 
+       ZERO_STRUCT(r->out);
+       r->out.buffer = talloc_zero_array(r, uint16_t, *r->out.length);
+       if (r->out.buffer == NULL) {
+               talloc_free(r);
+               return false;
+       }
+
+       r->out.length = r->in.length;
        r->out.result = _PNP_GetDeviceList(p, r);
 
        if (p->rng_fault_state) {
@@ -1008,7 +1016,7 @@ static bool api_PNP_GetDeviceRegProp(pipes_struct *p)
        }
 
        ZERO_STRUCT(r->out);
-       r->out.unknown1 = r->in.unknown1;
+       r->out.reg_data_type = r->in.reg_data_type;
        r->out.buffer = talloc_zero_array(r, uint8_t, *r->out.buffer_size);
        if (r->out.buffer == NULL) {
                talloc_free(r);
diff --git a/source3/librpc/idl/drsblobs.idl b/source3/librpc/idl/drsblobs.idl
deleted file mode 100644 (file)
index 6fdca0e..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-#include "idl_types.h"
-
-import "drsuapi.idl", "misc.idl";
-
-[
-  uuid("12345778-1234-abcd-0001-00000001"),
-  version(0.0),
-  pointer_default(unique),
-  helpstring("Active Directory Replication LDAP Blobs")
-]
-interface drsblobs {
-       typedef bitmap drsuapi_DsReplicaSyncOptions drsuapi_DsReplicaSyncOptions;
-       typedef bitmap drsuapi_DsReplicaNeighbourFlags drsuapi_DsReplicaNeighbourFlags;
-       typedef [v1_enum] enum drsuapi_DsAttributeId drsuapi_DsAttributeId;
-
-       /*
-        * replPropertyMetaData
-        * w2k  uses version 1
-        * w2k3 uses version 1
-        */
-       typedef struct {
-               drsuapi_DsAttributeId attid;
-               uint32 version;
-               NTTIME_1sec originating_change_time;
-               GUID originating_invocation_id;
-               hyper originating_usn;
-               hyper local_usn;
-       } replPropertyMetaData1;
-
-       typedef struct {
-               uint32 count;
-               uint32 reserved;
-               replPropertyMetaData1 array[count];
-       } replPropertyMetaDataCtr1;
-
-       typedef [nodiscriminant] union {
-               [case(1)] replPropertyMetaDataCtr1 ctr1;
-       } replPropertyMetaDataCtr;
-
-       typedef [public] struct {
-               uint32 version;
-               uint32 reserved;
-               [switch_is(version)] replPropertyMetaDataCtr ctr;
-       } replPropertyMetaDataBlob;
-
-       void decode_replPropertyMetaData(
-               [in] replPropertyMetaDataBlob blob
-               );
-
-       /*
-        * replUpToDateVector
-        * w2k  uses version 1
-        * w2k3 uses version 2
-        */
-       typedef struct {
-               uint32 count;
-               uint32 reserved;
-               drsuapi_DsReplicaCursor cursors[count];
-       } replUpToDateVectorCtr1;
-
-       typedef struct {
-               uint32 count;
-               uint32 reserved;
-               drsuapi_DsReplicaCursor2 cursors[count];
-       } replUpToDateVectorCtr2;
-
-       typedef [nodiscriminant] union {
-               [case(1)] replUpToDateVectorCtr1 ctr1;
-               [case(2)] replUpToDateVectorCtr2 ctr2;
-       } replUpToDateVectorCtr;
-
-       typedef [public] struct {
-               uint32 version;
-               uint32 reserved;
-               [switch_is(version)] replUpToDateVectorCtr ctr;
-       } replUpToDateVectorBlob;
-
-       void decode_replUpToDateVector(
-               [in] replUpToDateVectorBlob blob
-               );
-
-       /*
-        * repsFrom/repsTo
-        * w2k  uses version 1
-        * w2k3 uses version 1
-        */
-       typedef [public,gensize] struct {
-               [value(strlen(dns_name)+1)] uint32 __dns_name_size;
-               [charset(DOS)] uint8 dns_name[__dns_name_size];
-       } repsFromTo1OtherInfo;
-
-       typedef [public,gensize,flag(NDR_PAHEX)] struct {
-               /* this includes the 8 bytes of the repsFromToBlob header */
-               [value(ndr_size_repsFromTo1(this, ndr->flags)+8)] uint32 blobsize;
-               uint32 consecutive_sync_failures;
-               NTTIME_1sec last_success;
-               NTTIME_1sec last_attempt;
-               WERROR result_last_attempt;
-               [relative] repsFromTo1OtherInfo *other_info;
-               [value(ndr_size_repsFromTo1OtherInfo(other_info, ndr->flags))] uint32 other_info_length;
-               drsuapi_DsReplicaNeighbourFlags replica_flags;
-               uint8 schedule[84];
-               uint32 reserved;
-               drsuapi_DsReplicaHighWaterMark highwatermark;
-               GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */
-               GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */
-               GUID transport_guid;
-       } repsFromTo1;
-
-       typedef [nodiscriminant] union {
-               [case(1)] repsFromTo1 ctr1;
-       } repsFromTo;
-
-       typedef [public] struct {
-               uint32 version;
-               uint32 reserved;
-               [switch_is(version)] repsFromTo ctr;
-       } repsFromToBlob;
-
-       void decode_repsFromTo(
-               [in] repsFromToBlob blob
-               );
-
-       /*
-        * partialAttributeSet
-        * w2k  uses version 1
-        * w2k3 uses version 1
-        */
-       typedef struct {
-               uint32 count;
-               drsuapi_DsAttributeId array[count];
-       } partialAttributeSetCtr1;
-
-       typedef [nodiscriminant] union {
-               [case(1)] partialAttributeSetCtr1 ctr1;
-       } partialAttributeSetCtr;
-
-       typedef [public] struct {
-               uint32 version;
-               uint32 reserved;
-               [switch_is(version)] partialAttributeSetCtr ctr;
-       } partialAttributeSetBlob;
-
-       void decode_partialAttributeSet(
-               [in] partialAttributeSetBlob blob
-               );
-
-       /*
-        * prefixMap
-        * w2k  unknown
-        * w2k3 unknown
-        * samba4 uses 0x44534442 'DSDB'
-        *
-        * as we windows don't return the prefixMap attribute when you ask for
-        * we don't know the format, but the attribute is not replicated
-        * so that we can choose our own format...
-        */
-       typedef [v1_enum] enum {
-               PREFIX_MAP_VERSION_DSDB = 0x44534442
-       } prefixMapVersion;
-
-       typedef [nodiscriminant] union {
-               [case(PREFIX_MAP_VERSION_DSDB)] drsuapi_DsReplicaOIDMapping_Ctr dsdb;
-       } prefixMapCtr;
-
-       typedef [public] struct {
-               prefixMapVersion version;
-               uint32 reserved;
-               [switch_is(version)] prefixMapCtr ctr;
-       } prefixMapBlob;
-
-       void decode_prefixMap(
-               [in] prefixMapBlob blob
-               );
-
-       /*
-        * the cookie for the LDAP dirsync control
-        */
-       typedef [nodiscriminant,gensize] union {
-               [case(0)];
-               [default] replUpToDateVectorBlob uptodateness_vector;
-       } ldapControlDirSyncExtra;
-
-       typedef struct {
-               [value(3)] uint32 u1;
-               NTTIME time;
-               uint32 u2;
-               uint32 u3;
-               [value(ndr_size_ldapControlDirSyncExtra(&extra, extra.uptodateness_vector.version, 0))]
-                       uint32 extra_length;
-               drsuapi_DsReplicaHighWaterMark highwatermark;
-               GUID guid1;
-               [switch_is(extra_length)] ldapControlDirSyncExtra extra;
-       } ldapControlDirSyncBlob;
-
-       typedef [public,relative_base] struct {
-               [charset(DOS),value("MSDS")] uint8 msds[4];
-               [subcontext(0)] ldapControlDirSyncBlob blob;
-       } ldapControlDirSyncCookie;
-
-       void decode_ldapControlDirSync(
-               [in] ldapControlDirSyncCookie cookie
-               );
-
-       typedef struct {
-               [value(2*strlen_m(name))] uint16 name_len;
-               [value(strlen(data))] uint16 data_len;
-               uint16 reserved; /* 2 for 'Packages', 1 for 'Primary:*', but should be ignored */
-               [charset(UTF16)] uint8 name[name_len];
-               /*
-                * the data field contains data as HEX strings
-                *
-                * 'Packages':
-                *   data contains the list of packages
-                *   as non termiated UTF16 strings with
-                *   a UTF16 NULL byte as separator
-                *
-                * 'Primary:Kerberos-Newer-Keys':
-                *    ...
-                *
-                * 'Primary:Kerberos':
-                *    ...
-                *
-                * 'Primary:WDigest':
-                *    ...
-                *
-                * 'Primary:CLEARTEXT':
-                *    data contains the cleartext password
-                *    as UTF16 string encoded as HEX string
-                */
-               [charset(DOS)] uint8 data[data_len];
-       } supplementalCredentialsPackage;
-
-       /* this are 0x30 (48) whitespaces (0x20) */
-       const string SUPPLEMENTAL_CREDENTIALS_PREFIX = "                                                ";
-
-       typedef [flag(NDR_PAHEX)] enum {
-               SUPPLEMENTAL_CREDENTIALS_SIGNATURE = 0x0050
-       } supplementalCredentialsSignature;
-
-       typedef [gensize] struct {
-               [value(SUPPLEMENTAL_CREDENTIALS_PREFIX),charset(UTF16)] uint16 prefix[0x30];
-               [value(SUPPLEMENTAL_CREDENTIALS_SIGNATURE)] supplementalCredentialsSignature signature;
-               uint16 num_packages;
-               supplementalCredentialsPackage packages[num_packages];
-       } supplementalCredentialsSubBlob;
-
-       typedef [public] struct {
-               [value(0)] uint32 unknown1;
-               [value(ndr_size_supplementalCredentialsSubBlob(&sub, ndr->flags))] uint32 __ndr_size;
-               [value(0)] uint32 unknown2;
-               [subcontext(0),subcontext_size(__ndr_size)] supplementalCredentialsSubBlob sub;
-               [value(0)] uint8 unknown3;
-       } supplementalCredentialsBlob;
-
-       void decode_supplementalCredentials(
-               [in] supplementalCredentialsBlob blob
-               );
-
-       typedef [public] struct {
-               [flag(STR_NOTERM|NDR_REMAINING)] string_array names;
-       } package_PackagesBlob;
-
-       void decode_Packages(
-               [in] package_PackagesBlob blob
-               );
-
-       typedef struct {
-               [value(2*strlen_m(string))] uint16 length;
-               [value(2*strlen_m(string))] uint16 size;
-               [relative,subcontext(0),subcontext_size(size),flag(STR_NOTERM|NDR_REMAINING)] string *string;
-       } package_PrimaryKerberosString;
-
-       typedef struct {
-               [value(0)] uint16 reserved1;
-               [value(0)] uint16 reserved2;
-               [value(0)] uint32 reserved3;
-               uint32 keytype;
-               [value((value?value->length:0))] uint32 value_len;
-               [relative,subcontext(0),subcontext_size(value_len),flag(NDR_REMAINING)] DATA_BLOB *value;
-       } package_PrimaryKerberosKey3;
-
-       typedef struct {
-               uint16 num_keys;
-               uint16 num_old_keys;
-               package_PrimaryKerberosString salt;
-               package_PrimaryKerberosKey3 keys[num_keys];
-               package_PrimaryKerberosKey3 old_keys[num_old_keys];
-               [value(0)] uint32 padding1;
-               [value(0)] uint32 padding2;
-               [value(0)] uint32 padding3;
-               [value(0)] uint32 padding4;
-               [value(0)] uint32 padding5;
-       } package_PrimaryKerberosCtr3;
-
-       typedef struct {
-               [value(0)] uint16 reserved1;
-               [value(0)] uint16 reserved2;
-               [value(0)] uint32 reserved3;
-               uint32 iteration_count;
-               uint32 keytype;
-               [value((value?value->length:0))] uint32 value_len;
-               [relative,subcontext(0),subcontext_size(value_len),flag(NDR_REMAINING)] DATA_BLOB *value;
-       } package_PrimaryKerberosKey4;
-
-       typedef struct {
-               uint16 num_keys;
-               [value(0)] uint16 num_service_keys;
-               uint16 num_old_keys;
-               uint16 num_older_keys;
-               package_PrimaryKerberosString salt;
-               uint32 default_iteration_count;
-               package_PrimaryKerberosKey4 keys[num_keys];
-               package_PrimaryKerberosKey4 service_keys[num_service_keys];
-               package_PrimaryKerberosKey4 old_keys[num_old_keys];
-               package_PrimaryKerberosKey4 older_keys[num_older_keys];
-       } package_PrimaryKerberosCtr4;
-
-       typedef [nodiscriminant] union {
-               [case(3)] package_PrimaryKerberosCtr3 ctr3;
-               [case(4)] package_PrimaryKerberosCtr4 ctr4;
-       } package_PrimaryKerberosCtr;
-
-       typedef [public] struct {
-               uint16 version;
-               [value(0)] uint16 flags;
-               [switch_is(version)] package_PrimaryKerberosCtr ctr;
-       } package_PrimaryKerberosBlob;
-
-       void decode_PrimaryKerberos(
-               [in] package_PrimaryKerberosBlob blob
-               );
-
-       typedef [public] struct {
-               [flag(STR_NOTERM|NDR_REMAINING)] string cleartext;
-       } package_PrimaryCLEARTEXTBlob;
-
-       void decode_PrimaryCLEARTEXT(
-               [in] package_PrimaryCLEARTEXTBlob blob
-               );
-
-       typedef [flag(NDR_PAHEX)] struct {
-               uint8 hash[16];
-       } package_PrimaryWDigestHash;
-
-       typedef [public] struct {
-               [value(0x31)] uint16 unknown1;
-               [value(0x01)] uint8  unknown2;
-               uint8  num_hashes;
-               [value(0)] uint32 unknown3;
-               [value(0)] udlong uuknown4;
-               package_PrimaryWDigestHash hashes[num_hashes];
-       } package_PrimaryWDigestBlob;
-
-       void decode_PrimaryWDigest(
-               [in] package_PrimaryWDigestBlob blob
-               );
-
-       typedef struct {
-               NTTIME time1;
-               uint32 unknown1;
-               /*
-                * the secret value is encoded as UTF16 if it's a string
-                * but krb5 trusts have random bytes here, so converting to UTF16
-                * mayfail...
-                *
-                * TODO: We should try handle the case of a random buffer in all places
-                *       we deal with cleartext passwords from windows
-                *
-                * so we don't use this:
-                *
-                * uint32 value_len;
-                * [charset(UTF16)] uint8 value[value_len];
-                */
-               DATA_BLOB value;
-               [flag(NDR_ALIGN4)] DATA_BLOB _pad;
-       } trustAuthInOutSecret1;
-
-       typedef struct {
-               [relative] trustAuthInOutSecret1 *value1;
-               [relative] trustAuthInOutSecret1 *value2;
-       } trustAuthInOutCtr1;
-
-       typedef struct {
-               NTTIME time1;
-               uint32 unknown1;
-               DATA_BLOB value;
-               NTTIME time2;
-               uint32 unknown2;
-               uint32 unknown3;
-               uint32 unknown4;
-               [flag(NDR_ALIGN4)] DATA_BLOB _pad;
-       } trustAuthInOutSecret2V1;
-
-       typedef struct {
-               NTTIME time1;
-               uint32 unknown1;
-               DATA_BLOB value;
-               NTTIME time2;
-               uint32 unknown2;
-               uint32 unknown3;
-               [flag(NDR_ALIGN4)] DATA_BLOB _pad;
-       } trustAuthInOutSecret2V2;
-
-       typedef struct {
-               [relative] trustAuthInOutSecret2V1 *value1;
-               [relative] trustAuthInOutSecret2V2 *value2;
-       } trustAuthInOutCtr2;
-
-       typedef [nodiscriminant] union {
-               [case(1)] trustAuthInOutCtr1 ctr1;
-               [case(2)] trustAuthInOutCtr2 ctr2;
-       } trustAuthInOutCtr;
-
-       typedef [public] struct {
-               uint32 version;
-               [switch_is(version)] trustAuthInOutCtr ctr;
-       } trustAuthInOutBlob;
-
-       void decode_trustAuthInOut(
-               [in] trustAuthInOutBlob blob
-               );
-
-       typedef [public] struct {
-               uint32 marker;
-               DATA_BLOB data;
-       } DsCompressedChunk;
-
-       typedef [public] struct {
-               DsCompressedChunk chunks[5];
-       } DsCompressedBlob;
-
-       void decode_DsCompressed(
-               [in] DsCompressedBlob blob
-               );
-}
diff --git a/source3/librpc/ndr/ndr_drsuapi.c b/source3/librpc/ndr/ndr_drsuapi.c
deleted file mode 100644 (file)
index 8bc44dc..0000000
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
-   Unix SMB/CIFS implementation.
-
-   routines for printing some linked list structs in DRSUAPI
-
-   Copyright (C) Stefan (metze) Metzmacher 2005
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include "includes.h"
-#include "librpc/gen_ndr/ndr_drsuapi.h"
-#include "librpc/gen_ndr/ndr_misc.h"
-#include "../lib/util/asn1.h"
-#include "librpc/ndr/ndr_compression.h"
-
-void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char *name,
-                                              const struct drsuapi_DsReplicaObjectListItem *r)
-{
-       ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectListItem");
-       ndr->depth++;
-       ndr_print_ptr(ndr, "next_object", r->next_object);
-       ndr_print_drsuapi_DsReplicaObject(ndr, "object", &r->object);
-       ndr->depth--;
-       if (r->next_object) {
-               ndr_print_drsuapi_DsReplicaObjectListItem(ndr, "next_object", r->next_object);
-       }
-}
-
-void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectListItemEx *r)
-{
-       ndr_print_struct(ndr, name, "drsuapi_DsReplicaObjectListItemEx");
-       ndr->depth++;
-       ndr_print_ptr(ndr, "next_object", r->next_object);
-       ndr_print_drsuapi_DsReplicaObject(ndr, "object", &r->object);
-       ndr_print_uint32(ndr, "is_nc_prefix", r->is_nc_prefix);
-       ndr_print_ptr(ndr, "parent_object_guid", r->parent_object_guid);
-       ndr->depth++;
-       if (r->parent_object_guid) {
-               ndr_print_GUID(ndr, "parent_object_guid", r->parent_object_guid);
-       }
-       ndr->depth--;
-       ndr_print_ptr(ndr, "meta_data_ctr", r->meta_data_ctr);
-       ndr->depth++;
-       if (r->meta_data_ctr) {
-               ndr_print_drsuapi_DsReplicaMetaDataCtr(ndr, "meta_data_ctr", r->meta_data_ctr);
-       }
-       ndr->depth--;
-       ndr->depth--;
-       if (r->next_object) {
-               ndr_print_drsuapi_DsReplicaObjectListItemEx(ndr, "next_object", r->next_object);
-       }
-}
-
-#define _OID_PUSH_CHECK(call) do { \
-       bool _status; \
-       _status = call; \
-       if (_status != true) { \
-               return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT, "OID Conversion Error: %s\n", __location__); \
-       } \
-} while (0)
-
-#define _OID_PULL_CHECK(call) do { \
-       bool _status; \
-       _status = call; \
-       if (_status != true) { \
-               return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, "OID Conversion Error: %s\n", __location__); \
-       } \
-} while (0)
-
-enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_drsuapi_DsReplicaOID_oid(r->oid, 0)));
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->oid));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->oid) {
-                       DATA_BLOB blob;
-
-                       if (StrnCaseCmp("ff", r->oid, 2) == 0) {
-                               blob = strhex_to_data_blob(NULL, r->oid);
-                               if (!blob.data) {
-                                       return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT,
-                                                             "HEX String Conversion Error: %s\n",
-                                                             __location__);
-                               }
-                       } else {
-                               _OID_PUSH_CHECK(ber_write_OID_String(&blob, r->oid));
-                       }
-                       talloc_steal(ndr, blob.data);
-
-                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, blob.length));
-                       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, blob.data, blob.length));
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r)
-{
-       uint32_t _ptr_oid;
-       TALLOC_CTX *_mem_save_oid_0;
-       if (ndr_flags & NDR_SCALARS) {
-               NDR_CHECK(ndr_pull_align(ndr, 4));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__ndr_size));
-               if (r->__ndr_size < 0 || r->__ndr_size > 10000) {
-                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
-               }
-               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_oid));
-               if (_ptr_oid) {
-                       NDR_PULL_ALLOC(ndr, r->oid);
-               } else {
-                       r->oid = NULL;
-               }
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->oid) {
-                       DATA_BLOB _oid_array;
-                       const char *_oid;
-
-                       _mem_save_oid_0 = NDR_PULL_GET_MEM_CTX(ndr);
-                       NDR_PULL_SET_MEM_CTX(ndr, ndr, 0);
-                       NDR_CHECK(ndr_pull_array_size(ndr, &r->oid));
-                       _oid_array.length = ndr_get_array_size(ndr, &r->oid);
-                       NDR_PULL_ALLOC_N(ndr, _oid_array.data, _oid_array.length);
-                       NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, _oid_array.data, _oid_array.length));
-                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_oid_0, 0);
-
-                       if (_oid_array.length && _oid_array.data[0] == 0xFF) {
-                               _oid = data_blob_hex_string(ndr, &_oid_array);
-                               NDR_ERR_HAVE_NO_MEMORY(_oid);
-                       } else {
-                               _OID_PULL_CHECK(ber_read_OID_String(ndr, _oid_array, &_oid));
-                       }
-                       data_blob_free(&_oid_array);
-                       talloc_steal(r->oid, _oid);
-                       r->oid = _oid;
-               }
-               if (r->oid) {
-                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->oid, r->__ndr_size));
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags)
-{
-       DATA_BLOB _blob;
-       size_t ret = 0;
-
-       if (!oid) return 0;
-
-       if (StrnCaseCmp("ff", oid, 2) == 0) {
-               _blob = strhex_to_data_blob(NULL, oid);
-               if (_blob.data) {
-                       ret = _blob.length;
-               }
-       } else {
-               if (ber_write_OID_String(&_blob, oid)) {
-                       ret = _blob.length;
-               }
-       }
-       data_blob_free(&_blob);
-       return ret;
-}
-
-enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr1 *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               uint32_t decompressed_length = 0;
-               uint32_t compressed_length = 0;
-               if (r->ts) {
-                       {
-                               struct ndr_push *_ndr_ts;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
-                               {
-                                       struct ndr_push *_ndr_ts_compressed;
-                                       NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
-                                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
-                                       decompressed_length = _ndr_ts_compressed->offset;
-                                       NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
-                               }
-                               compressed_length = _ndr_ts->offset;
-                               talloc_free(_ndr_ts);
-                       }
-               }
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, decompressed_length));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, compressed_length));
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->ts));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->ts) {
-                       {
-                               struct ndr_push *_ndr_ts;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
-                               {
-                                       struct ndr_push *_ndr_ts_compressed;
-                                       NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
-                                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
-                                       NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
-                               }
-                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ts, 4, -1));
-                       }
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesMSZIPCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesMSZIPCtr6 *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               uint32_t decompressed_length = 0;
-               uint32_t compressed_length = 0;
-               if (r->ts) {
-                       {
-                               struct ndr_push *_ndr_ts;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
-                               {
-                                       struct ndr_push *_ndr_ts_compressed;
-                                       NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
-                                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
-                                       decompressed_length = _ndr_ts_compressed->offset;
-                                       NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
-                               }
-                               compressed_length = _ndr_ts->offset;
-                               talloc_free(_ndr_ts);
-                       }
-               }
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, decompressed_length));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, compressed_length));
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->ts));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->ts) {
-                       {
-                               struct ndr_push *_ndr_ts;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
-                               {
-                                       struct ndr_push *_ndr_ts_compressed;
-                                       NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
-                                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
-                                       NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_MSZIP, -1));
-                               }
-                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ts, 4, -1));
-                       }
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr1(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr1 *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               uint32_t decompressed_length = 0;
-               uint32_t compressed_length = 0;
-               if (r->ts) {
-                       {
-                               struct ndr_push *_ndr_ts;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
-                               {
-                                       struct ndr_push *_ndr_ts_compressed;
-                                       NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
-                                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
-                                       decompressed_length = _ndr_ts_compressed->offset;
-                                       NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
-                               }
-                               compressed_length = _ndr_ts->offset;
-                               talloc_free(_ndr_ts);
-                       }
-               }
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, decompressed_length));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, compressed_length));
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->ts));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->ts) {
-                       {
-                               struct ndr_push *_ndr_ts;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
-                               {
-                                       struct ndr_push *_ndr_ts_compressed;
-                                       NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
-                                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr1TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
-                                       NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
-                               }
-                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ts, 4, -1));
-                       }
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
-
-enum ndr_err_code ndr_push_drsuapi_DsGetNCChangesXPRESSCtr6(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsGetNCChangesXPRESSCtr6 *r)
-{
-       if (ndr_flags & NDR_SCALARS) {
-               uint32_t decompressed_length = 0;
-               uint32_t compressed_length = 0;
-               if (r->ts) {
-                       {
-                               struct ndr_push *_ndr_ts;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
-                               {
-                                       struct ndr_push *_ndr_ts_compressed;
-                                       NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
-                                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
-                                       decompressed_length = _ndr_ts_compressed->offset;
-                                       NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
-                               }
-                               compressed_length = _ndr_ts->offset;
-                               talloc_free(_ndr_ts);
-                       }
-               }
-               NDR_CHECK(ndr_push_align(ndr, 4));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, decompressed_length));
-               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, compressed_length));
-               NDR_CHECK(ndr_push_unique_ptr(ndr, r->ts));
-       }
-       if (ndr_flags & NDR_BUFFERS) {
-               if (r->ts) {
-                       {
-                               struct ndr_push *_ndr_ts;
-                               NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_ts, 4, -1));
-                               {
-                                       struct ndr_push *_ndr_ts_compressed;
-                                       NDR_CHECK(ndr_push_compression_start(_ndr_ts, &_ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
-                                       NDR_CHECK(ndr_push_drsuapi_DsGetNCChangesCtr6TS(_ndr_ts_compressed, NDR_SCALARS|NDR_BUFFERS, r->ts));
-                                       NDR_CHECK(ndr_push_compression_end(_ndr_ts, _ndr_ts_compressed, NDR_COMPRESSION_XPRESS, -1));
-                               }
-                               NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_ts, 4, -1));
-                       }
-               }
-       }
-       return NDR_ERR_SUCCESS;
-}
index 2f336f14e6d58b41380a53cda23e34eb1d4585db..f0595695d2279920c04497f3a46941fea6fcca4c 100644 (file)
@@ -33,13 +33,12 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *m
 {
        unsigned char new_trust_passwd_hash[16];
        char *new_trust_passwd;
-       char *str;
        NTSTATUS nt_status;
                
        /* Create a random machine account password */
-       str = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
+       new_trust_passwd = generate_random_str(mem_ctx, DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
 
-       if ((new_trust_passwd = talloc_strdup(mem_ctx, str)) == NULL) {
+       if (new_trust_passwd == NULL) {
                DEBUG(0, ("talloc_strdup failed\n"));
                return NT_STATUS_NO_MEMORY;
        }
index c0e62eac194a9f27a7beb15c18790034860964b7..1826fa88ed3b2f3f6e852de457dfabc41427c1db 100644 (file)
@@ -280,7 +280,7 @@ static bool upgrade_to_version_3(void)
        DEBUG(0,("upgrade_to_version_3: upgrading print tdb's to version 3\n"));
  
        for (kbuf = tdb_firstkey(tdb_drivers); kbuf.dptr;
-                       newkey = tdb_nextkey(tdb_drivers, kbuf), safe_free(kbuf.dptr), kbuf=newkey) {
+                       newkey = tdb_nextkey(tdb_drivers, kbuf), free(kbuf.dptr), kbuf=newkey) {
 
                dbuf = tdb_fetch(tdb_drivers, kbuf);
 
@@ -807,7 +807,7 @@ int get_ntforms(nt_forms_struct **list)
 
        for (kbuf = tdb_firstkey(tdb_forms);
             kbuf.dptr;
-            newkey = tdb_nextkey(tdb_forms, kbuf), safe_free(kbuf.dptr), kbuf=newkey) 
+            newkey = tdb_nextkey(tdb_forms, kbuf), free(kbuf.dptr), kbuf=newkey) 
        {
                if (strncmp((const char *)kbuf.dptr, FORMS_PREFIX, strlen(FORMS_PREFIX)) != 0) 
                        continue;
@@ -1024,7 +1024,7 @@ int get_ntdrivers(fstring **list, const char *architecture, uint32 version)
 
        for (kbuf = tdb_firstkey(tdb_drivers);
             kbuf.dptr;
-            newkey = tdb_nextkey(tdb_drivers, kbuf), safe_free(kbuf.dptr), kbuf=newkey) {
+            newkey = tdb_nextkey(tdb_drivers, kbuf), free(kbuf.dptr), kbuf=newkey) {
 
                if (strncmp((const char *)kbuf.dptr, key, strlen(key)) != 0)
                        continue;
@@ -3123,8 +3123,7 @@ static void map_single_multi_sz_into_ctr(REGVAL_CTR *ctr, const char *val_name,
        regval_ctr_delvalue(ctr, val_name);
        regval_ctr_addvalue(ctr, val_name, REG_MULTI_SZ, 
                            (char *) conv_strs, str_size);      
-       safe_free(conv_strs);
-       
+       SAFE_FREE(conv_strs);
 }
 
 /****************************************************************************
index b9e5ad56adfd73e85b94498b17dbda8e144ea98b..a6bf52a0a4ced7559cfa66520f1543ceac82fd88 100644 (file)
@@ -179,7 +179,7 @@ void pcap_cache_reload(void)
                goto done;
        }
 
-       for (; (pcap_line = fgets_slash(NULL, 1024, pcap_file)) != NULL; safe_free(pcap_line)) {
+       for (; (pcap_line = fgets_slash(NULL, 1024, pcap_file)) != NULL; free(pcap_line)) {
                char name[MAXPRINTERLEN+1];
                char comment[62];
                char *p, *q;
index 57590cc39efd7a71bd281086f86431f2a5b2ab5d..523be77f358da494d1636009a86dda8527265044 100644 (file)
@@ -49,7 +49,7 @@ bool aix_cache_reload(void)
 
        iEtat = 0;
        /* scan qconfig file for searching <printername>:       */
-       for (;(line = fgets_slash(NULL, 1024, pfile)); safe_free(line)) {
+       for (;(line = fgets_slash(NULL, 1024, pfile)); free(line)) {
                if (*line == '*' || *line == 0)
                        continue;
 
@@ -65,7 +65,7 @@ bool aix_cache_reload(void)
                                if (strcmp(p, "bsh") != 0) {
                                        name = talloc_strdup(ctx, p);
                                        if (!name) {
-                                               safe_free(line);
+                                               SAFE_FREE(line);
                                                x_fclose(pfile);
                                                TALLOC_FREE(ctx);
                                                return false;
@@ -85,7 +85,7 @@ bool aix_cache_reload(void)
                                /* probably a good printer ???          */
                                iEtat = 0;
                                if (!pcap_cache_add(name, NULL)) {
-                                       safe_free(line);
+                                       SAFE_FREE(line);
                                        x_fclose(pfile);
                                        TALLOC_FREE(ctx);
                                        return false;
@@ -100,7 +100,7 @@ bool aix_cache_reload(void)
                                /* it's a good virtual printer */
                                iEtat = 0;
                                if (!pcap_cache_add(name, NULL)) {
-                                       safe_free(line);
+                                       SAFE_FREE(line);
                                        x_fclose(pfile);
                                        TALLOC_FREE(ctx);
                                        return false;
index 9ccfaa7bcbfda94e505576e7795a0024d74e948a..b7763cb1cf98cee915187445c98b1bbbfe3ec2e6 100644 (file)
@@ -747,7 +747,12 @@ void reply_tcon_and_X(struct smb_request *req)
                SSVAL(req->outbuf, smb_vwv2, SMB_SUPPORT_SEARCH_BITS|
                      (lp_csc_policy(SNUM(conn)) << 2));
 
-               init_dfsroot(conn, req->inbuf, req->outbuf);
+               if (lp_msdfs_root(SNUM(conn)) && lp_host_msdfs()) {
+                       DEBUG(2,("Serving %s as a Dfs root\n",
+                                lp_servicename(SNUM(conn)) ));
+                       SSVAL(req->outbuf, smb_vwv2,
+                             SMB_SHARE_IN_DFS | SVAL(req->outbuf, smb_vwv2));
+               }
        }
 
 
index f64ba8c05f72e3a4e473604dfd715fc725e52a58..4e81263ee4c30082486d21e96b6cfbed9eb0d8ba 100644 (file)
@@ -888,7 +888,7 @@ bool reload_services(bool test)
 enum server_exit_reason { SERVER_EXIT_NORMAL, SERVER_EXIT_ABNORMAL };
 
 static void exit_server_common(enum server_exit_reason how,
-       const char *const reason) NORETURN_ATTRIBUTE;
+       const char *const reason) _NORETURN_;
 
 static void exit_server_common(enum server_exit_reason how,
        const char *const reason)
index 8e8dd7e7672d4046484dcdc2e2afb68aed4bd37c..5a2d535b305adf2d67f372d59c7befe2dc5b0afa 100644 (file)
@@ -480,7 +480,7 @@ static int ads_user_add(struct net_context *c, int argc, const char **argv)
        asprintf(&upn, "%s@%s", argv[0], ads->config.realm);
        status = ads_krb5_set_password(ads->auth.kdc_server, upn, argv[1],
                                       ads->auth.time_offset);
-       safe_free(upn);
+       SAFE_FREE(upn);
        if (ADS_ERR_OK(status)) {
                d_printf("User %s added\n", argv[0]);
                rc = 0;
@@ -534,7 +534,7 @@ static int ads_user_info(struct net_context *c, int argc, const char **argv)
 
        asprintf(&searchstring, "(sAMAccountName=%s)", escaped_user);
        rc = ads_search(ads, &res, searchstring, attrs);
-       safe_free(searchstring);
+       SAFE_FREE(searchstring);
 
        if (!ADS_ERR_OK(rc)) {
                d_fprintf(stderr, "ads_search: %s\n", ads_errstr(rc));
index 5bc38f979f4a891342db5f84e73c5023d076fb5b..2fe464a0005a08a5a3f33bf0af48ad8952450e6b 100644 (file)
@@ -330,12 +330,8 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv)
        
        /* Create a random machine account password */
 
-       { 
-               char *str;
-               str = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
-               clear_trust_password = SMB_STRDUP(str);
-               E_md4hash(clear_trust_password, md4_trust_password);
-       }
+       clear_trust_password = generate_random_str(talloc_tos(), DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
+       E_md4hash(clear_trust_password, md4_trust_password);
 
        /* Set password on machine account */
 
@@ -468,7 +464,7 @@ done:
 
        cli_shutdown(cli);
 
-       SAFE_FREE(clear_trust_password);
+       TALLOC_FREE(clear_trust_password);
 
        return retval;
 }
index f4b305d4ab103c0adba4a3432210de40380520bb..ddd18a7b9f77d73abe7ea4cc3a8ce5f3b75091cd 100644 (file)
@@ -2482,7 +2482,7 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
                        TALLOC_FREE( reg_ctr );
                }
 
-               safe_free(keylist);
+               SAFE_FREE(keylist);
 
                /* close printer handles here */
                if (got_hnd_src) {
index c04b628b1b6152e4d0309bdaf48fd80c7d3fab54..45da3f1e88fc62820d899b5432b680b0f8ce6438 100644 (file)
@@ -219,7 +219,7 @@ static bool query_one(const char *lookup, unsigned int lookup_type)
                }
        }
 
-       safe_free(ip_list);
+       free(ip_list);
 
        return (ip_list != NULL);
 }
index 7dae4729b74d6e722de1848f87ec2b1bfcec5f09..26cab668c80135cc555a8a4bb50aa951b513a6aa 100644 (file)
@@ -301,8 +301,8 @@ data.mk: config.status $(MK_FILES)
 testcov-html:: 
 
 include $(pidldir)/config.mk
-selftestdir := $(srcdir)/selftest
-include $(selftestdir)/config.mk
+selftestdir := $(srcdir)/../selftest
+include $(srcdir)/selftest/config.mk
 
 showflags::
        @echo '  pwd        = '`/bin/pwd`
index 800645014d208371b96b4f7a7aecbc605352cd25..c292c6db744e4001f3ddcb834bf1ebf69287c56e 100644 (file)
@@ -246,40 +246,42 @@ static void dreplsrv_op_pull_source_get_changes_send(struct dreplsrv_op_pull_sou
        r = talloc(st, struct drsuapi_DsGetNCChanges);
        if (composite_nomem(r, c)) return;
 
-       r->in.level = talloc(r, int32_t);
-       if (composite_nomem(r->in.level, c)) return;
-       r->out.level = talloc(r, int32_t);
-       if (composite_nomem(r->out.level, c)) return;
+       r->out.level_out = talloc(r, int32_t);
+       if (composite_nomem(r->out.level_out, c)) return;
+       r->in.req = talloc(r, union drsuapi_DsGetNCChangesRequest);
+       if (composite_nomem(r->in.req, c)) return;
+       r->out.ctr = talloc(r, union drsuapi_DsGetNCChangesCtr);
+       if (composite_nomem(r->out.ctr, c)) return;
 
        r->in.bind_handle       = &drsuapi->bind_handle;
        if (drsuapi->remote_info28.supported_extensions & DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8) {
-               *r->in.level                            = 8;
-               r->in.req.req8.destination_dsa_guid     = service->ntds_guid;
-               r->in.req.req8.source_dsa_invocation_id = rf1->source_dsa_invocation_id;
-               r->in.req.req8.naming_context           = &partition->nc;
-               r->in.req.req8.highwatermark            = rf1->highwatermark;
-               r->in.req.req8.uptodateness_vector      = NULL;/*&partition->uptodatevector_ex;*/
-               r->in.req.req8.replica_flags            = rf1->replica_flags;
-               r->in.req.req8.max_object_count         = 133;
-               r->in.req.req8.max_ndr_size             = 1336811;
-               r->in.req.req8.extended_op              = DRSUAPI_EXOP_NONE;
-               r->in.req.req8.fsmo_info                = 0;
-               r->in.req.req8.partial_attribute_set    = NULL;
-               r->in.req.req8.partial_attribute_set_ex = NULL;
-               r->in.req.req8.mapping_ctr.num_mappings = 0;
-               r->in.req.req8.mapping_ctr.mappings     = NULL;
+               r->in.level                             = 8;
+               r->in.req->req8.destination_dsa_guid    = service->ntds_guid;
+               r->in.req->req8.source_dsa_invocation_id= rf1->source_dsa_invocation_id;
+               r->in.req->req8.naming_context          = &partition->nc;
+               r->in.req->req8.highwatermark           = rf1->highwatermark;
+               r->in.req->req8.uptodateness_vector     = NULL;/*&partition->uptodatevector_ex;*/
+               r->in.req->req8.replica_flags           = rf1->replica_flags;
+               r->in.req->req8.max_object_count        = 133;
+               r->in.req->req8.max_ndr_size            = 1336811;
+               r->in.req->req8.extended_op             = DRSUAPI_EXOP_NONE;
+               r->in.req->req8.fsmo_info               = 0;
+               r->in.req->req8.partial_attribute_set   = NULL;
+               r->in.req->req8.partial_attribute_set_ex= NULL;
+               r->in.req->req8.mapping_ctr.num_mappings= 0;
+               r->in.req->req8.mapping_ctr.mappings    = NULL;
        } else {
-               *r->in.level                            = 5;
-               r->in.req.req5.destination_dsa_guid     = service->ntds_guid;
-               r->in.req.req5.source_dsa_invocation_id = rf1->source_dsa_invocation_id;
-               r->in.req.req5.naming_context           = &partition->nc;
-               r->in.req.req5.highwatermark            = rf1->highwatermark;
-               r->in.req.req5.uptodateness_vector      = NULL;/*&partition->uptodatevector_ex;*/
-               r->in.req.req5.replica_flags            = rf1->replica_flags;
-               r->in.req.req5.max_object_count         = 133;
-               r->in.req.req5.max_ndr_size             = 1336770;
-               r->in.req.req5.extended_op              = DRSUAPI_EXOP_NONE;
-               r->in.req.req5.fsmo_info                = 0;
+               r->in.level                             = 5;
+               r->in.req->req5.destination_dsa_guid    = service->ntds_guid;
+               r->in.req->req5.source_dsa_invocation_id= rf1->source_dsa_invocation_id;
+               r->in.req->req5.naming_context          = &partition->nc;
+               r->in.req->req5.highwatermark           = rf1->highwatermark;
+               r->in.req->req5.uptodateness_vector     = NULL;/*&partition->uptodatevector_ex;*/
+               r->in.req->req5.replica_flags           = rf1->replica_flags;
+               r->in.req->req5.max_object_count        = 133;
+               r->in.req->req5.max_ndr_size            = 1336770;
+               r->in.req->req5.extended_op             = DRSUAPI_EXOP_NONE;
+               r->in.req->req5.fsmo_info               = 0;
        }
 
        req = dcerpc_drsuapi_DsGetNCChanges_send(drsuapi->pipe, r, r);
@@ -311,28 +313,28 @@ static void dreplsrv_op_pull_source_get_changes_recv(struct rpc_request *req)
                return;
        }
 
-       if (*r->out.level == 1) {
+       if (*r->out.level_out == 1) {
                ctr_level = 1;
-               ctr1 = &r->out.ctr.ctr1;
-       } else if (*r->out.level == 2 &&
-                  r->out.ctr.ctr2.mszip1.ts) {
+               ctr1 = &r->out.ctr->ctr1;
+       } else if (*r->out.level_out == 2 &&
+                  r->out.ctr->ctr2.mszip1.ts) {
                ctr_level = 1;
-               ctr1 = &r->out.ctr.ctr2.mszip1.ts->ctr1;
-       } else if (*r->out.level == 6) {
+               ctr1 = &r->out.ctr->ctr2.mszip1.ts->ctr1;
+       } else if (*r->out.level_out == 6) {
                ctr_level = 6;
-               ctr6 = &r->out.ctr.ctr6;
-       } else if (*r->out.level == 7 &&
-                  r->out.ctr.ctr7.level == 6 &&
-                  r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
-                  r->out.ctr.ctr7.ctr.mszip6.ts) {
+               ctr6 = &r->out.ctr->ctr6;
+       } else if (*r->out.level_out == 7 &&
+                  r->out.ctr->ctr7.level == 6 &&
+                  r->out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
+                  r->out.ctr->ctr7.ctr.mszip6.ts) {
                ctr_level = 6;
-               ctr6 = &r->out.ctr.ctr7.ctr.mszip6.ts->ctr6;
-       } else if (*r->out.level == 7 &&
-                  r->out.ctr.ctr7.level == 6 &&
-                  r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
-                  r->out.ctr.ctr7.ctr.xpress6.ts) {
+               ctr6 = &r->out.ctr->ctr7.ctr.mszip6.ts->ctr6;
+       } else if (*r->out.level_out == 7 &&
+                  r->out.ctr->ctr7.level == 6 &&
+                  r->out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
+                  r->out.ctr->ctr7.ctr.xpress6.ts) {
                ctr_level = 6;
-               ctr6 = &r->out.ctr.ctr7.ctr.xpress6.ts->ctr6;
+               ctr6 = &r->out.ctr->ctr7.ctr.xpress6.ts->ctr6;
        } else {
                composite_error(c, werror_to_ntstatus(WERR_BAD_NET_RESP));
                return;
index 88a8887056ed6c48e7aae3b48c7c3242df929412..a0602d9281504db3f8e46672c964f870f4e5efc5 100644 (file)
@@ -424,7 +424,7 @@ static int extended_search(struct ldb_module *module, struct ldb_request *req)
                                valstr = str;
                        } else {
                                DATA_BLOB binary;
-                               binary = strhex_to_data_blob(str);
+                               binary = strhex_to_data_blob(NULL, str);
                                if (!binary.data) {
                                        ldb_oom(module->ldb);
                                        return LDB_ERR_OPERATIONS_ERROR;
@@ -471,7 +471,7 @@ static int extended_search(struct ldb_module *module, struct ldb_request *req)
                                valstr = str;
                        } else {
                                DATA_BLOB binary;
-                               binary = strhex_to_data_blob(str);
+                               binary = strhex_to_data_blob(NULL, str);
                                if (!binary.data) {
                                        ldb_oom(module->ldb);
                                        return LDB_ERR_OPERATIONS_ERROR;
index c4451d1355f80522e79c6a4647cf48ceccb7065f..5ed7f1fbad59b6eec3526c85c05833da4d96b83d 100644 (file)
@@ -482,12 +482,11 @@ static int setup_primary_kerberos(struct setup_password_fields_io *io,
        if (old_scp) {
                DATA_BLOB blob;
 
-               blob = strhex_to_data_blob(old_scp->data);
+               blob = strhex_to_data_blob(io->ac, old_scp->data);
                if (!blob.data) {
                        ldb_oom(io->ac->module->ldb);
                        return LDB_ERR_OPERATIONS_ERROR;
                }
-               talloc_steal(io->ac, blob.data);
 
                /* TODO: use ndr_pull_struct_blob_all(), when the ndr layer handles it correct with relative pointers */
                ndr_err = ndr_pull_struct_blob(&blob, io->ac, lp_iconv_convenience(ldb_get_opaque(io->ac->module->ldb, "loadparm")), &_old_pkb,
@@ -596,12 +595,11 @@ static int setup_primary_kerberos_newer(struct setup_password_fields_io *io,
        if (old_scp) {
                DATA_BLOB blob;
 
-               blob = strhex_to_data_blob(old_scp->data);
+               blob = strhex_to_data_blob(io->ac, old_scp->data);
                if (!blob.data) {
                        ldb_oom(io->ac->module->ldb);
                        return LDB_ERR_OPERATIONS_ERROR;
                }
-               talloc_steal(io->ac, blob.data);
 
                /* TODO: use ndr_pull_struct_blob_all(), when the ndr layer handles it correct with relative pointers */
                ndr_err = ndr_pull_struct_blob(&blob, io->ac,
index 93697a3df0eb8880702bc9b929d6c019047888ef..69d4c2ce80d61504bce477d6f4a6e39e89f00319 100644 (file)
@@ -199,9 +199,8 @@ WERROR dsdb_get_oid_mappings_ldb(const struct dsdb_schema *schema,
                return ntstatus_to_werror(nt_status);
        }
 
-       *schemaInfo = strhex_to_data_blob(schema->schema_info);
+       *schemaInfo = strhex_to_data_blob(mem_ctx, schema->schema_info);
        W_ERROR_HAVE_NO_MEMORY(schemaInfo->data);
-       talloc_steal(mem_ctx, schemaInfo->data);
 
        return WERR_OK;
 }
@@ -819,12 +818,11 @@ int dsdb_schema_from_ldb_results(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
        }
        info_val = ldb_msg_find_ldb_val(schema_res->msgs[0], "schemaInfo");
        if (!info_val) {
-               info_val_default = strhex_to_data_blob("FF0000000000000000000000000000000000000000");
+               info_val_default = strhex_to_data_blob(mem_ctx, "FF0000000000000000000000000000000000000000");
                if (!info_val_default.data) {
                        dsdb_oom(error_string, mem_ctx);
                        return LDB_ERR_OPERATIONS_ERROR;
                }
-               talloc_steal(mem_ctx, info_val_default.data);
                info_val = &info_val_default;
        }
 
index f8de82e56a3abe433a7cffc2e233a68a15c30270..d0aae4e221bde95e525bb52db829bb36f3b12d20 100644 (file)
@@ -328,11 +328,10 @@ WERROR dsdb_attach_schema_from_ldif_file(struct ldb_context *ldb, const char *pf
 
        info_val = ldb_msg_find_ldb_val(msg, "schemaInfo");
        if (!info_val) {
-               info_val_default = strhex_to_data_blob("FF0000000000000000000000000000000000000000");
+               info_val_default = strhex_to_data_blob(mem_ctx, "FF0000000000000000000000000000000000000000");
                if (!info_val_default.data) {
                        goto nomem;
                }
-               talloc_steal(mem_ctx, info_val_default.data);
                info_val = &info_val_default;
        }
 
index 3a1379bee448d9d45a0f4a984c07a7ae466be198..b6a48e79d0f4d1e18eb58f9732438ecb2d058bfd 100644 (file)
@@ -277,12 +277,11 @@ static krb5_error_code LDB_message2entry_keys(krb5_context context,
        if (scpk) {
                DATA_BLOB blob;
 
-               blob = strhex_to_data_blob(scpk->data);
+               blob = strhex_to_data_blob(mem_ctx, scpk->data);
                if (!blob.data) {
                        ret = ENOMEM;
                        goto out;
                }
-               talloc_steal(mem_ctx, blob.data);
 
                /* we cannot use ndr_pull_struct_blob_all() here, as w2k and w2k3 add padding bytes */
                ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, iconv_convenience, &_pkb,
index 68efd56a86271f8dfdaaa4464d31f895ddc535cc..b3b6e49ea5e6ab7b560eaec7ef2768dcc7a3dd91 100644 (file)
@@ -140,8 +140,7 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx,
                        break;
 
                case REG_BINARY:
-                       *data = strhex_to_data_blob(data_str);
-                       talloc_steal(mem_ctx, data->data);
+                       *data = strhex_to_data_blob(mem_ctx, data_str);
                        break;
 
                default:
index d39c61551be7b0b2f4158c04b01160dddb45c242..d174fbfc28d5aff3c3a3a316975d585f9bf0c86d 100644 (file)
        if (!req) return NULL; \
 } while (0)
 
+/**
+ Return a string representing a CIFS attribute for a file.
+**/
+_PUBLIC_ char *attrib_string(TALLOC_CTX *mem_ctx, uint32_t attrib)
+{
+       int i, len;
+       const struct {
+               char c;
+               uint16_t attr;
+       } attr_strs[] = {
+               {'V', FILE_ATTRIBUTE_VOLUME},
+               {'D', FILE_ATTRIBUTE_DIRECTORY},
+               {'A', FILE_ATTRIBUTE_ARCHIVE},
+               {'H', FILE_ATTRIBUTE_HIDDEN},
+               {'S', FILE_ATTRIBUTE_SYSTEM},
+               {'N', FILE_ATTRIBUTE_NORMAL},
+               {'R', FILE_ATTRIBUTE_READONLY},
+               {'d', FILE_ATTRIBUTE_DEVICE},
+               {'t', FILE_ATTRIBUTE_TEMPORARY},
+               {'s', FILE_ATTRIBUTE_SPARSE},
+               {'r', FILE_ATTRIBUTE_REPARSE_POINT},
+               {'c', FILE_ATTRIBUTE_COMPRESSED},
+               {'o', FILE_ATTRIBUTE_OFFLINE},
+               {'n', FILE_ATTRIBUTE_NONINDEXED},
+               {'e', FILE_ATTRIBUTE_ENCRYPTED}
+       };
+       char *ret;
+
+       ret = talloc_array(mem_ctx, char, ARRAY_SIZE(attr_strs)+1);
+       if (!ret) {
+               return NULL;
+       }
+
+       for (len=i=0; i<ARRAY_SIZE(attr_strs); i++) {
+               if (attrib & attr_strs[i].attr) {
+                       ret[len++] = attr_strs[i].c;
+               }
+       }
+
+       ret[len] = 0;
+
+       return ret;
+}
+
 /****************************************************************************
  Rename a file - async interface
 ****************************************************************************/
index 4cbebbf6d0af1a69f45170eb36c514b903485263..6e7924248c632ff8b5b0ad63691641e4227b7297 100644 (file)
@@ -2173,11 +2173,15 @@ static void becomeDC_drsuapi1_add_entry_send(struct libnet_BecomeDC_state *s)
        /* setup request structure */
        r->in.bind_handle                                               = &s->drsuapi1.bind_handle;
        r->in.level                                                     = 2;
-       r->in.req.req2.first_object.next_object                         = NULL;
-       r->in.req.req2.first_object.object.identifier                   = identifier;
-       r->in.req.req2.first_object.object.flags                        = 0x00000000;
-       r->in.req.req2.first_object.object.attribute_ctr.num_attributes = num_attrs;
-       r->in.req.req2.first_object.object.attribute_ctr.attributes     = attrs;
+       r->in.req                                                       = talloc(s, union drsuapi_DsAddEntryRequest);
+       r->in.req->req2.first_object.next_object                        = NULL;
+       r->in.req->req2.first_object.object.identifier                  = identifier;
+       r->in.req->req2.first_object.object.flags                       = 0x00000000;
+       r->in.req->req2.first_object.object.attribute_ctr.num_attributes= num_attrs;
+       r->in.req->req2.first_object.object.attribute_ctr.attributes    = attrs;
+
+       r->out.level_out        = talloc(s, int32_t);
+       r->out.ctr              = talloc(s, union drsuapi_DsAddEntryCtr);
 
        req = dcerpc_drsuapi_DsAddEntry_send(s->drsuapi1.pipe, r, r);
        composite_continue_rpc(c, req, becomeDC_drsuapi1_add_entry_recv, s);
@@ -2212,37 +2216,37 @@ static void becomeDC_drsuapi1_add_entry_recv(struct rpc_request *req)
                return;
        }
 
-       if (r->out.level == 3) {
-               if (r->out.ctr.ctr3.count != 1) {
+       if (*r->out.level_out == 3) {
+               if (r->out.ctr->ctr3.count != 1) {
                        WERROR status;
 
-                       if (r->out.ctr.ctr3.level != 1) {
+                       if (r->out.ctr->ctr3.level != 1) {
                                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
                                return;
                        }
 
-                       if (!r->out.ctr.ctr3.error) {
+                       if (!r->out.ctr->ctr3.error) {
                                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
                                return;
                        }
 
-                       status = r->out.ctr.ctr3.error->info1.status;
+                       status = r->out.ctr->ctr3.error->info1.status;
 
-                       if (!r->out.ctr.ctr3.error->info1.info) {
+                       if (!r->out.ctr->ctr3.error->info1.info) {
                                composite_error(c, werror_to_ntstatus(status));
                                return;
                        }
 
                        /* see if we can get a more detailed error */
-                       switch (r->out.ctr.ctr3.error->info1.level) {
+                       switch (r->out.ctr->ctr3.error->info1.level) {
                        case 1:
-                               status = r->out.ctr.ctr3.error->info1.info->error1.status;
+                               status = r->out.ctr->ctr3.error->info1.info->error1.status;
                                break;
                        case 4:
                        case 5:
                        case 6:
                        case 7:
-                               status = r->out.ctr.ctr3.error->info1.info->errorX.status;
+                               status = r->out.ctr->ctr3.error->info1.info->errorX.status;
                                break;
                        }
 
@@ -2250,14 +2254,14 @@ static void becomeDC_drsuapi1_add_entry_recv(struct rpc_request *req)
                        return;
                }
 
-               s->dest_dsa.ntds_guid   = r->out.ctr.ctr3.objects[0].guid;
-       } else if (r->out.level == 2) {
-               if (r->out.ctr.ctr2.count != 1) {
-                       composite_error(c, werror_to_ntstatus(r->out.ctr.ctr2.error.status));
+               s->dest_dsa.ntds_guid   = r->out.ctr->ctr3.objects[0].guid;
+       } else if (*r->out.level_out == 2) {
+               if (r->out.ctr->ctr2.count != 1) {
+                       composite_error(c, werror_to_ntstatus(r->out.ctr->ctr2.error.status));
                        return;
                }
 
-               s->dest_dsa.ntds_guid   = r->out.ctr.ctr2.objects[0].guid;
+               s->dest_dsa.ntds_guid   = r->out.ctr->ctr2.objects[0].guid;
        } else {
                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
                return;
@@ -2392,40 +2396,42 @@ static void becomeDC_drsuapi_pull_partition_send(struct libnet_BecomeDC_state *s
        r = talloc(s, struct drsuapi_DsGetNCChanges);
        if (composite_nomem(r, c)) return;
 
-       r->in.level = talloc(r, int32_t);
-       if (composite_nomem(r->in.level, c)) return;
-       r->out.level = talloc(r, int32_t);
-       if (composite_nomem(r->out.level, c)) return;
+       r->out.level_out = talloc(r, int32_t);
+       if (composite_nomem(r->out.level_out, c)) return;
+       r->in.req = talloc(r, union drsuapi_DsGetNCChangesRequest);
+       if (composite_nomem(r->in.req, c)) return;
+       r->out.ctr = talloc(r, union drsuapi_DsGetNCChangesCtr);
+       if (composite_nomem(r->out.ctr, c)) return;
 
        r->in.bind_handle       = &drsuapi_h->bind_handle;
        if (drsuapi_h->remote_info28.supported_extensions & DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8) {
-               *r->in.level                            = 8;
-               r->in.req.req8.destination_dsa_guid     = partition->destination_dsa_guid;
-               r->in.req.req8.source_dsa_invocation_id = partition->source_dsa_invocation_id;
-               r->in.req.req8.naming_context           = &partition->nc;
-               r->in.req.req8.highwatermark            = partition->highwatermark;
-               r->in.req.req8.uptodateness_vector      = NULL;
-               r->in.req.req8.replica_flags            = partition->replica_flags;
-               r->in.req.req8.max_object_count         = 133;
-               r->in.req.req8.max_ndr_size             = 1336811;
-               r->in.req.req8.extended_op              = DRSUAPI_EXOP_NONE;
-               r->in.req.req8.fsmo_info                = 0;
-               r->in.req.req8.partial_attribute_set    = NULL;
-               r->in.req.req8.partial_attribute_set_ex = NULL;
-               r->in.req.req8.mapping_ctr.num_mappings = 0;
-               r->in.req.req8.mapping_ctr.mappings     = NULL;
+               r->in.level                             = 8;
+               r->in.req->req8.destination_dsa_guid    = partition->destination_dsa_guid;
+               r->in.req->req8.source_dsa_invocation_id= partition->source_dsa_invocation_id;
+               r->in.req->req8.naming_context          = &partition->nc;
+               r->in.req->req8.highwatermark           = partition->highwatermark;
+               r->in.req->req8.uptodateness_vector     = NULL;
+               r->in.req->req8.replica_flags           = partition->replica_flags;
+               r->in.req->req8.max_object_count        = 133;
+               r->in.req->req8.max_ndr_size            = 1336811;
+               r->in.req->req8.extended_op             = DRSUAPI_EXOP_NONE;
+               r->in.req->req8.fsmo_info               = 0;
+               r->in.req->req8.partial_attribute_set   = NULL;
+               r->in.req->req8.partial_attribute_set_ex= NULL;
+               r->in.req->req8.mapping_ctr.num_mappings= 0;
+               r->in.req->req8.mapping_ctr.mappings    = NULL;
        } else {
-               *r->in.level                            = 5;
-               r->in.req.req5.destination_dsa_guid     = partition->destination_dsa_guid;
-               r->in.req.req5.source_dsa_invocation_id = partition->source_dsa_invocation_id;
-               r->in.req.req5.naming_context           = &partition->nc;
-               r->in.req.req5.highwatermark            = partition->highwatermark;
-               r->in.req.req5.uptodateness_vector      = NULL;
-               r->in.req.req5.replica_flags            = partition->replica_flags;
-               r->in.req.req5.max_object_count         = 133;
-               r->in.req.req5.max_ndr_size             = 1336770;
-               r->in.req.req5.extended_op              = DRSUAPI_EXOP_NONE;
-               r->in.req.req5.fsmo_info                = 0;
+               r->in.level                             = 5;
+               r->in.req->req5.destination_dsa_guid    = partition->destination_dsa_guid;
+               r->in.req->req5.source_dsa_invocation_id= partition->source_dsa_invocation_id;
+               r->in.req->req5.naming_context          = &partition->nc;
+               r->in.req->req5.highwatermark           = partition->highwatermark;
+               r->in.req->req5.uptodateness_vector     = NULL;
+               r->in.req->req5.replica_flags           = partition->replica_flags;
+               r->in.req->req5.max_object_count        = 133;
+               r->in.req->req5.max_ndr_size            = 1336770;
+               r->in.req->req5.extended_op             = DRSUAPI_EXOP_NONE;
+               r->in.req->req5.fsmo_info               = 0;
        }
 
        /* 
@@ -2457,28 +2463,28 @@ static WERROR becomeDC_drsuapi_pull_partition_recv(struct libnet_BecomeDC_state
                return r->out.result;
        }
 
-       if (*r->out.level == 1) {
+       if (*r->out.level_out == 1) {
                ctr_level = 1;
-               ctr1 = &r->out.ctr.ctr1;
-       } else if (*r->out.level == 2 &&
-                  r->out.ctr.ctr2.mszip1.ts) {
+               ctr1 = &r->out.ctr->ctr1;
+       } else if (*r->out.level_out == 2 &&
+                  r->out.ctr->ctr2.mszip1.ts) {
                ctr_level = 1;
-               ctr1 = &r->out.ctr.ctr2.mszip1.ts->ctr1;
-       } else if (*r->out.level == 6) {
+               ctr1 = &r->out.ctr->ctr2.mszip1.ts->ctr1;
+       } else if (*r->out.level_out == 6) {
                ctr_level = 6;
-               ctr6 = &r->out.ctr.ctr6;
-       } else if (*r->out.level == 7 &&
-                  r->out.ctr.ctr7.level == 6 &&
-                  r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
-                  r->out.ctr.ctr7.ctr.mszip6.ts) {
+               ctr6 = &r->out.ctr->ctr6;
+       } else if (*r->out.level_out == 7 &&
+                  r->out.ctr->ctr7.level == 6 &&
+                  r->out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP &&
+                  r->out.ctr->ctr7.ctr.mszip6.ts) {
                ctr_level = 6;
-               ctr6 = &r->out.ctr.ctr7.ctr.mszip6.ts->ctr6;
-       } else if (*r->out.level == 7 &&
-                  r->out.ctr.ctr7.level == 6 &&
-                  r->out.ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
-                  r->out.ctr.ctr7.ctr.xpress6.ts) {
+               ctr6 = &r->out.ctr->ctr7.ctr.mszip6.ts->ctr6;
+       } else if (*r->out.level_out == 7 &&
+                  r->out.ctr->ctr7.level == 6 &&
+                  r->out.ctr->ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS &&
+                  r->out.ctr->ctr7.ctr.xpress6.ts) {
                ctr_level = 6;
-               ctr6 = &r->out.ctr.ctr7.ctr.xpress6.ts->ctr6;
+               ctr6 = &r->out.ctr->ctr7.ctr.xpress6.ts->ctr6;
        } else {
                return WERR_BAD_NET_RESP;
        }
index f4de9031ec7fb747e0d9ed4274fc4b8e3f721ad6..0ed5e8ae2623b9d44e8045aa515314f472079829 100644 (file)
@@ -162,13 +162,19 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
        ZERO_STRUCT(r_crack_names);
        r_crack_names.in.bind_handle            = &drsuapi_bind_handle;
        r_crack_names.in.level                  = 1;
-       r_crack_names.in.req.req1.codepage      = 1252; /* western european */
-       r_crack_names.in.req.req1.language      = 0x00000407; /* german */
-       r_crack_names.in.req.req1.count         = 1;
-       r_crack_names.in.req.req1.names         = names;
-       r_crack_names.in.req.req1.format_flags  = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
-       r_crack_names.in.req.req1.format_offered= DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY;
-       r_crack_names.in.req.req1.format_desired= DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+       r_crack_names.in.req                    = talloc(r, union drsuapi_DsNameRequest);
+       if (!r_crack_names.in.req) {
+               r->out.error_string = NULL;
+               talloc_free(tmp_ctx);
+               return NT_STATUS_NO_MEMORY;
+       }
+       r_crack_names.in.req->req1.codepage     = 1252; /* western european */
+       r_crack_names.in.req->req1.language     = 0x00000407; /* german */
+       r_crack_names.in.req->req1.count        = 1;
+       r_crack_names.in.req->req1.names        = names;
+       r_crack_names.in.req->req1.format_flags = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
+       r_crack_names.in.req->req1.format_offered = DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY;
+       r_crack_names.in.req->req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
        names[0].str = dom_sid_string(tmp_ctx, r->out.account_sid);
        if (!names[0].str) {
                r->out.error_string = NULL;
@@ -176,6 +182,14 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
                return NT_STATUS_NO_MEMORY;
        }
 
+       r_crack_names.out.ctr                   = talloc(r, union drsuapi_DsNameCtr);
+       r_crack_names.out.level_out             = talloc(r, int32_t);
+       if (!r_crack_names.out.ctr || !r_crack_names.out.level_out) {
+               r->out.error_string = NULL;
+               talloc_free(tmp_ctx);
+               return NT_STATUS_NO_MEMORY;
+       }
+
        status = dcerpc_drsuapi_DsCrackNames(drsuapi_pipe, tmp_ctx, &r_crack_names);
        if (!NT_STATUS_IS_OK(status)) {
                if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
@@ -201,24 +215,24 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
                                                  "DsCrackNames failed - %s", win_errstr(r_crack_names.out.result));
                talloc_free(tmp_ctx);
                return NT_STATUS_UNSUCCESSFUL;
-       } else if (r_crack_names.out.level != 1 
-                  || !r_crack_names.out.ctr.ctr1 
-                  || r_crack_names.out.ctr.ctr1->count != 1) {
+       } else if (*r_crack_names.out.level_out != 1
+                  || !r_crack_names.out.ctr->ctr1
+                  || r_crack_names.out.ctr->ctr1->count != 1) {
                r->out.error_string = talloc_asprintf(r, "DsCrackNames failed");
                talloc_free(tmp_ctx);
                return NT_STATUS_INVALID_PARAMETER;
-       } else if (r_crack_names.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
-               r->out.error_string = talloc_asprintf(r, "DsCrackNames failed: %d", r_crack_names.out.ctr.ctr1->array[0].status);
+       } else if (r_crack_names.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
+               r->out.error_string = talloc_asprintf(r, "DsCrackNames failed: %d", r_crack_names.out.ctr->ctr1->array[0].status);
                talloc_free(tmp_ctx);
                return NT_STATUS_UNSUCCESSFUL;
-       } else if (r_crack_names.out.ctr.ctr1->array[0].result_name == NULL) {
+       } else if (r_crack_names.out.ctr->ctr1->array[0].result_name == NULL) {
                r->out.error_string = talloc_asprintf(r, "DsCrackNames failed: no result name");
                talloc_free(tmp_ctx);
                return NT_STATUS_INVALID_PARAMETER;
        }
 
        /* Store the DN of our machine account. */
-       account_dn_str = r_crack_names.out.ctr.ctr1->array[0].result_name;
+       account_dn_str = r_crack_names.out.ctr->ctr1->array[0].result_name;
 
        /* Now we know the user's DN, open with LDAP, read and modify a few things */
 
@@ -328,8 +342,8 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
        }
                                
        /* DsCrackNames to find out the DN of the domain. */
-       r_crack_names.in.req.req1.format_offered = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
-       r_crack_names.in.req.req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+       r_crack_names.in.req->req1.format_offered = DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT;
+       r_crack_names.in.req->req1.format_desired = DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
        names[0].str = talloc_asprintf(tmp_ctx, "%s\\", r->out.domain_name);
        if (!names[0].str) {
                r->out.error_string = NULL;
@@ -362,11 +376,11 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
                                          "DsCrackNames failed - %s", win_errstr(r_crack_names.out.result));
                talloc_free(tmp_ctx);
                return NT_STATUS_UNSUCCESSFUL;
-       } else if (r_crack_names.out.level != 1 
-                  || !r_crack_names.out.ctr.ctr1 
-                  || r_crack_names.out.ctr.ctr1->count != 1
-                  || !r_crack_names.out.ctr.ctr1->array[0].result_name           
-                  || r_crack_names.out.ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
+       } else if (*r_crack_names.out.level_out != 1
+                  || !r_crack_names.out.ctr->ctr1
+                  || r_crack_names.out.ctr->ctr1->count != 1
+                  || !r_crack_names.out.ctr->ctr1->array[0].result_name
+                  || r_crack_names.out.ctr->ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
                r->out.error_string = talloc_asprintf(r, "DsCrackNames failed");
                talloc_free(tmp_ctx);
                return NT_STATUS_UNSUCCESSFUL;
@@ -377,8 +391,8 @@ static NTSTATUS libnet_JoinADSDomain(struct libnet_context *ctx, struct libnet_J
        talloc_steal(r, account_dn_str);
 
        /* Store the domain DN. */
-       r->out.domain_dn_str = r_crack_names.out.ctr.ctr1->array[0].result_name;
-       talloc_steal(r, r_crack_names.out.ctr.ctr1->array[0].result_name);
+       r->out.domain_dn_str = r_crack_names.out.ctr->ctr1->array[0].result_name;
+       talloc_steal(r, r_crack_names.out.ctr->ctr1->array[0].result_name);
 
        /* Store the KVNO of the account, critical for some kerberos
         * operations */
index 2ee3c641b2bb7afb01ede8e3b7e6e2a38edb767b..79c6dc0fc10e11bb7b609b3428e9071874491e9a 100644 (file)
@@ -639,9 +639,13 @@ static void unbecomeDC_drsuapi_remove_ds_server_send(struct libnet_UnbecomeDC_st
 
        r->in.bind_handle       = &s->drsuapi.bind_handle;
        r->in.level             = 1;
-       r->in.req.req1.server_dn= s->dest_dsa.server_dn_str;
-       r->in.req.req1.domain_dn= s->domain.dn_str;
-       r->in.req.req1.commit   = true;
+       r->in.req               = talloc(s, union drsuapi_DsRemoveDSServerRequest);
+       r->in.req->req1.server_dn = s->dest_dsa.server_dn_str;
+       r->in.req->req1.domain_dn = s->domain.dn_str;
+       r->in.req->req1.commit  = true;
+
+       r->out.level_out        = talloc(s, int32_t);
+       r->out.res              = talloc(s, union drsuapi_DsRemoveDSServerResult);
 
        req = dcerpc_drsuapi_DsRemoveDSServer_send(s->drsuapi.pipe, s, r);
        composite_continue_rpc(c, req, unbecomeDC_drsuapi_remove_ds_server_recv, s);
@@ -662,7 +666,7 @@ static void unbecomeDC_drsuapi_remove_ds_server_recv(struct rpc_request *req)
                return;
        }
 
-       if (r->out.level != 1) {
+       if (*r->out.level_out != 1) {
                composite_error(c, NT_STATUS_INVALID_NETWORK_RESPONSE);
                return;
        }
index a4eaae4367e420b41549e366c0e047c63828f031..819b79f91f7c15612837ed7dfd0a30d207347b20 100644 (file)
@@ -139,12 +139,12 @@ NDR_FRSAPI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_frsapi.o
 [SUBSYSTEM::NDR_DRSUAPI]
 PUBLIC_DEPENDENCIES = LIBNDR NDR_COMPRESSION NDR_SECURITY NDR_SAMR ASN1_UTIL
 
-NDR_DRSUAPI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsuapi.o $(ndrsrcdir)/ndr_drsuapi.o
+NDR_DRSUAPI_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsuapi.o ../librpc/ndr/ndr_drsuapi.o
 
 [SUBSYSTEM::NDR_DRSBLOBS]
 PUBLIC_DEPENDENCIES = LIBNDR NDR_MISC NDR_DRSUAPI
 
-NDR_DRSBLOBS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsblobs.o $(ndrsrcdir)/ndr_drsblobs.o
+NDR_DRSBLOBS_OBJ_FILES = $(gen_ndrsrcdir)/ndr_drsblobs.o ../librpc/ndr/ndr_drsblobs.o
 
 [SUBSYSTEM::NDR_SA