[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-428-g78338d4

Andrew Tridgell tridge at samba.org
Thu Sep 17 22:53:26 MDT 2009


The branch, master has been updated
       via  78338d431c6e4ae8e3ff94b0ba9caaae2a5626a9 (commit)
       via  a3f33356bbad2eb9d8b084a46533e9f0b9b940c9 (commit)
       via  88cded0b61e3d58e2e16e0be4ec5f2d65b87122b (commit)
       via  f2f8bb7b57a6251d78a4973ea97e1c201bf2c54b (commit)
       via  3ec638c770d58d0fcb94f1873d7b227d528fa1c7 (commit)
       via  ae91cff2597caba2f8f033f69c8bf6a3706da409 (commit)
       via  c2523d2e2bb84c38741ea88c0c67ff692fd82b1c (commit)
       via  aeb22cae07272212097e7cefcca0a60f06599dab (commit)
       via  f93d71651640e05500b59fcd8f33a4f2132313ff (commit)
       via  90770e45c7136535e93900189bc46ca0570bfae2 (commit)
       via  ec422edab59dd823aeaf3c4cdcf47e368c28382d (commit)
       via  d27140ab763a1bc5e831fe8416869ff6c875452f (commit)
      from  44674efc818baaad527c73d5a0e9f3d05b76d807 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 78338d431c6e4ae8e3ff94b0ba9caaae2a5626a9
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 17 16:42:11 2009 -0700

    talloc: don't crash if f is NULL in talloc_report_*
    
    It's annoying when you use
      p talloc_report_full(ctx, fopen("/tmp/xx","w"))
    in gdb, and if you don't have write permission on the file then
    you get a segv.

commit a3f33356bbad2eb9d8b084a46533e9f0b9b940c9
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 17 16:02:14 2009 -0700

    s3-rpc: samba3 needs the DCERPC_NDR64 define

commit 88cded0b61e3d58e2e16e0be4ec5f2d65b87122b
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 17 15:15:58 2009 -0700

    s4-sam: add a note about the solaris client

commit f2f8bb7b57a6251d78a4973ea97e1c201bf2c54b
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 17 15:15:36 2009 -0700

    ndrdump: fixed help

commit 3ec638c770d58d0fcb94f1873d7b227d528fa1c7
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 17 15:15:24 2009 -0700

    ndr: num_auths is an array size, thus a uint3264

commit ae91cff2597caba2f8f033f69c8bf6a3706da409
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 17 15:14:31 2009 -0700

    ndr: split out ndr enum functions
    
    This allows for easier implementation of the NDR32/NDR64 split

commit c2523d2e2bb84c38741ea88c0c67ff692fd82b1c
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 17 09:59:50 2009 -0700

    idl: recompile our IDL
    
    The NDR64 change affects every IDL file

commit aeb22cae07272212097e7cefcca0a60f06599dab
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 17 09:10:21 2009 -0700

    s4-pidl: add support for NDR64
    
    Added support for NDR64 to the samba4 pidl generator

commit f93d71651640e05500b59fcd8f33a4f2132313ff
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 17 09:09:48 2009 -0700

    s4-rpc: added NDR64 support
    
    This adds support for the nd464 binding string option

commit 90770e45c7136535e93900189bc46ca0570bfae2
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 17 09:08:47 2009 -0700

    ndr: added support for NDR64
    
    This adds NDR64 support for the push functions in libndr

commit ec422edab59dd823aeaf3c4cdcf47e368c28382d
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 17 09:07:44 2009 -0700

    util: use likely/unlikely for NT_STATUS_* macros

commit d27140ab763a1bc5e831fe8416869ff6c875452f
Author: Andrew Tridgell <tridge at samba.org>
Date:   Thu Sep 17 09:07:17 2009 -0700

    libreplace: added likely()/unlikely() macros for gcc
    
    These macros allow the compile to better optimise code that has a lot
    of if statements. I particularly want to use this for our low level
    generated NDR code.

-----------------------------------------------------------------------

Summary of changes:
 lib/replace/replace.h                    |   19 +
 lib/talloc/talloc.c                      |    6 +-
 libcli/util/ntstatus.h                   |    6 +-
 librpc/gen_ndr/ndr_dcerpc.c              |   12 +-
 librpc/gen_ndr/ndr_dfs.c                 |  476 +++++-----
 librpc/gen_ndr/ndr_drsblobs.c            |   78 +-
 librpc/gen_ndr/ndr_drsuapi.c             |  682 +++++++-------
 librpc/gen_ndr/ndr_dssetup.c             |   42 +-
 librpc/gen_ndr/ndr_echo.c                |   30 +-
 librpc/gen_ndr/ndr_epmapper.c            |   28 +-
 librpc/gen_ndr/ndr_eventlog.c            |   20 +-
 librpc/gen_ndr/ndr_krb5pac.c             |   28 +-
 librpc/gen_ndr/ndr_lsa.c                 |  330 ++++----
 librpc/gen_ndr/ndr_misc.c                |    4 +-
 librpc/gen_ndr/ndr_named_pipe_auth.c     |   34 +-
 librpc/gen_ndr/ndr_nbt.c                 |   32 +-
 librpc/gen_ndr/ndr_netlogon.c            | 1000 ++++++++++----------
 librpc/gen_ndr/ndr_ntlmssp.c             |   32 +-
 librpc/gen_ndr/ndr_ntsvcs.c              |   54 +-
 librpc/gen_ndr/ndr_samr.c                |  262 +++---
 librpc/gen_ndr/ndr_schannel.c            |   28 +-
 librpc/gen_ndr/ndr_security.c            |   26 +-
 librpc/gen_ndr/ndr_spoolss.c             | 1500 +++++++++++++++---------------
 librpc/gen_ndr/ndr_srvsvc.c              | 1196 ++++++++++++------------
 librpc/gen_ndr/ndr_svcctl.c              |  372 ++++----
 librpc/gen_ndr/ndr_winreg.c              |  110 ++--
 librpc/gen_ndr/ndr_wkssvc.c              |  716 +++++++-------
 librpc/gen_ndr/ndr_xattr.c               |   24 +-
 librpc/ndr/libndr.h                      |   34 +-
 librpc/ndr/ndr.c                         |   11 +-
 librpc/ndr/ndr_basic.c                   |  109 ++-
 librpc/ndr/ndr_sec_helper.c              |    4 +-
 librpc/rpc/binding.c                     |    3 +-
 librpc/tools/ndrdump.c                   |    2 +-
 pidl/lib/Parse/Pidl/NDR.pm               |    5 +-
 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm |   14 +-
 source3/librpc/rpc/dcerpc.h              |    3 +
 source4/auth/sam.c                       |    2 +
 source4/librpc/rpc/dcerpc.c              |   12 +
 source4/librpc/rpc/dcerpc.h              |    3 +
 source4/librpc/rpc/dcerpc_auth.c         |   15 +-
 source4/librpc/rpc/dcerpc_smb.c          |    6 +-
 source4/librpc/rpc/dcerpc_util.c         |    2 +-
 43 files changed, 3768 insertions(+), 3604 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index 2db6aa1..6424d10 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -704,4 +704,23 @@ char *ufc_crypt(const char *key, const char *salt);
 #endif
 #endif
 
+/* these macros gain us a few percent of speed on gcc */
+#if (__GNUC__ >= 3)
+/* the strange !! is to ensure that __builtin_expect() takes either 0 or 1
+   as its first argument */
+#ifndef likely
+#define likely(x)   __builtin_expect(!!(x), 1)
+#endif
+#ifndef unlikely
+#define unlikely(x) __builtin_expect(!!(x), 0)
+#endif
+#else
+#ifndef likely
+#define likely(x) (x)
+#endif
+#ifndef unlikely
+#define unlikely(x) (x)
+#endif
+#endif
+
 #endif /* _LIBREPLACE_REPLACE_H */
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index 478767c..f103a9b 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -1421,8 +1421,10 @@ static void talloc_report_depth_FILE_helper(const void *ptr, int depth, int max_
 */
 void talloc_report_depth_file(const void *ptr, int depth, int max_depth, FILE *f)
 {
-	talloc_report_depth_cb(ptr, depth, max_depth, talloc_report_depth_FILE_helper, f);
-	fflush(f);
+	if (f) {
+		talloc_report_depth_cb(ptr, depth, max_depth, talloc_report_depth_FILE_helper, f);
+		fflush(f);
+	}
 }
 
 /*
diff --git a/libcli/util/ntstatus.h b/libcli/util/ntstatus.h
index 5ef4295..1025f47 100644
--- a/libcli/util/ntstatus.h
+++ b/libcli/util/ntstatus.h
@@ -637,8 +637,8 @@ NTSTATUS nt_status_string_to_code(const char *nt_status_str);
 /** Used by ntstatus_dos_equal: */
 extern bool ntstatus_check_dos_mapping;
 
-#define NT_STATUS_IS_OK(x) (NT_STATUS_V(x) == 0)
-#define NT_STATUS_IS_ERR(x) ((NT_STATUS_V(x) & 0xc0000000) == 0xc0000000)
+#define NT_STATUS_IS_OK(x) (likely(NT_STATUS_V(x) == 0))
+#define NT_STATUS_IS_ERR(x) (unlikely((NT_STATUS_V(x) & 0xc0000000) == 0xc0000000))
 /* checking for DOS error mapping here is ugly, but unfortunately the
    alternative is a very intrusive rewrite of the torture code */
 #if _SAMBA_BUILD_ == 4
@@ -648,7 +648,7 @@ extern bool ntstatus_check_dos_mapping;
 #endif
 
 #define NT_STATUS_HAVE_NO_MEMORY(x) do { \
-	if (!(x)) {\
+	if (unlikely(!(x))) {		\
 		return NT_STATUS_NO_MEMORY;\
 	}\
 } while (0)
diff --git a/librpc/gen_ndr/ndr_dcerpc.c b/librpc/gen_ndr/ndr_dcerpc.c
index 9596440..c869841 100644
--- a/librpc/gen_ndr/ndr_dcerpc.c
+++ b/librpc/gen_ndr/ndr_dcerpc.c
@@ -734,14 +734,14 @@ _PUBLIC_ void ndr_print_dcerpc_fault(struct ndr_print *ndr, const char *name, co
 
 static enum ndr_err_code ndr_push_dcerpc_AuthType(struct ndr_push *ndr, int ndr_flags, enum dcerpc_AuthType r)
 {
-	NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
+	NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
 	return NDR_ERR_SUCCESS;
 }
 
 static enum ndr_err_code ndr_pull_dcerpc_AuthType(struct ndr_pull *ndr, int ndr_flags, enum dcerpc_AuthType *r)
 {
 	uint8_t v;
-	NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
+	NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
 	*r = v;
 	return NDR_ERR_SUCCESS;
 }
@@ -767,14 +767,14 @@ _PUBLIC_ void ndr_print_dcerpc_AuthType(struct ndr_print *ndr, const char *name,
 
 static enum ndr_err_code ndr_push_dcerpc_AuthLevel(struct ndr_push *ndr, int ndr_flags, enum dcerpc_AuthLevel r)
 {
-	NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
+	NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
 	return NDR_ERR_SUCCESS;
 }
 
 static enum ndr_err_code ndr_pull_dcerpc_AuthLevel(struct ndr_pull *ndr, int ndr_flags, enum dcerpc_AuthLevel *r)
 {
 	uint8_t v;
-	NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
+	NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
 	*r = v;
 	return NDR_ERR_SUCCESS;
 }
@@ -1229,14 +1229,14 @@ _PUBLIC_ void ndr_print_dcerpc_working(struct ndr_print *ndr, const char *name,
 
 static enum ndr_err_code ndr_push_dcerpc_pkt_type(struct ndr_push *ndr, int ndr_flags, enum dcerpc_pkt_type r)
 {
-	NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
+	NDR_CHECK(ndr_push_enum_uint8(ndr, NDR_SCALARS, r));
 	return NDR_ERR_SUCCESS;
 }
 
 static enum ndr_err_code ndr_pull_dcerpc_pkt_type(struct ndr_pull *ndr, int ndr_flags, enum dcerpc_pkt_type *r)
 {
 	uint8_t v;
-	NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
+	NDR_CHECK(ndr_pull_enum_uint8(ndr, NDR_SCALARS, &v));
 	*r = v;
 	return NDR_ERR_SUCCESS;
 }
diff --git a/librpc/gen_ndr/ndr_dfs.c b/librpc/gen_ndr/ndr_dfs.c
index bf1d300..20d3f22 100644
--- a/librpc/gen_ndr/ndr_dfs.c
+++ b/librpc/gen_ndr/ndr_dfs.c
@@ -6,14 +6,14 @@
 #include "librpc/gen_ndr/ndr_misc.h"
 static enum ndr_err_code ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r)
 {
-	NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+	NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
 	return NDR_ERR_SUCCESS;
 }
 
 static enum ndr_err_code ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r)
 {
 	uint32_t v;
-	NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+	NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
 	*r = v;
 	return NDR_ERR_SUCCESS;
 }
@@ -61,14 +61,14 @@ _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const
 static enum ndr_err_code ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r)
 {
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_align(ndr, 5));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
 	}
 	if (ndr_flags & NDR_BUFFERS) {
 		if (r->path) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 	}
@@ -80,7 +80,7 @@ static enum ndr_err_code ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags,
 	uint32_t _ptr_path;
 	TALLOC_CTX *_mem_save_path_0;
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_pull_align(ndr, 4));
+		NDR_CHECK(ndr_pull_align(ndr, 5));
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
 		if (_ptr_path) {
 			NDR_PULL_ALLOC(ndr, r->path);
@@ -148,7 +148,7 @@ _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name,
 static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r)
 {
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_align(ndr, 5));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 		NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
@@ -156,15 +156,15 @@ static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags,
 	}
 	if (ndr_flags & NDR_BUFFERS) {
 		if (r->path) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 		if (r->comment) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 	}
@@ -178,7 +178,7 @@ static enum ndr_err_code ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags,
 	uint32_t _ptr_comment;
 	TALLOC_CTX *_mem_save_comment_0;
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_pull_align(ndr, 4));
+		NDR_CHECK(ndr_pull_align(ndr, 5));
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
 		if (_ptr_path) {
 			NDR_PULL_ALLOC(ndr, r->path);
@@ -271,22 +271,22 @@ _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name
 static enum ndr_err_code ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r)
 {
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_align(ndr, 5));
 		NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->server));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
 	}
 	if (ndr_flags & NDR_BUFFERS) {
 		if (r->server) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server, ndr_charset_length(r->server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 		if (r->share) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 	}
@@ -300,7 +300,7 @@ static enum ndr_err_code ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_
 	uint32_t _ptr_share;
 	TALLOC_CTX *_mem_save_share_0;
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_pull_align(ndr, 4));
+		NDR_CHECK(ndr_pull_align(ndr, 5));
 		NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
 		if (_ptr_server) {
@@ -368,7 +368,7 @@ static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags,
 {
 	uint32_t cntr_stores_1;
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_align(ndr, 5));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 		NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
@@ -377,19 +377,19 @@ static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags,
 	}
 	if (ndr_flags & NDR_BUFFERS) {
 		if (r->path) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 		if (r->comment) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 		if (r->stores) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores));
 			for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 				NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
 			}
@@ -412,7 +412,7 @@ static enum ndr_err_code ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags,
 	TALLOC_CTX *_mem_save_stores_0;
 	TALLOC_CTX *_mem_save_stores_1;
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_pull_align(ndr, 4));
+		NDR_CHECK(ndr_pull_align(ndr, 5));
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
 		if (_ptr_path) {
 			NDR_PULL_ALLOC(ndr, r->path);
@@ -523,7 +523,7 @@ static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags,
 {
 	uint32_t cntr_stores_1;
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_align(ndr, 5));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 		NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
@@ -534,19 +534,19 @@ static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags,
 	}
 	if (ndr_flags & NDR_BUFFERS) {
 		if (r->path) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 		if (r->comment) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 		if (r->stores) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores));
 			for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 				NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
 			}
@@ -569,7 +569,7 @@ static enum ndr_err_code ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags,
 	TALLOC_CTX *_mem_save_stores_0;
 	TALLOC_CTX *_mem_save_stores_1;
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_pull_align(ndr, 4));
+		NDR_CHECK(ndr_pull_align(ndr, 5));
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
 		if (_ptr_path) {
 			NDR_PULL_ALLOC(ndr, r->path);
@@ -709,7 +709,7 @@ _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *nam
 static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r)
 {
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_align(ndr, 5));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 		NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
@@ -721,15 +721,15 @@ static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags,
 	}
 	if (ndr_flags & NDR_BUFFERS) {
 		if (r->path) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 		if (r->comment) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 	}
@@ -743,7 +743,7 @@ static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags,
 	uint32_t _ptr_comment;
 	TALLOC_CTX *_mem_save_comment_0;
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_pull_align(ndr, 4));
+		NDR_CHECK(ndr_pull_align(ndr, 5));
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
 		if (_ptr_path) {
 			NDR_PULL_ALLOC(ndr, r->path);
@@ -819,14 +819,14 @@ _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const
 
 static enum ndr_err_code ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r)
 {
-	NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+	NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
 	return NDR_ERR_SUCCESS;
 }
 
 static enum ndr_err_code ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r)
 {
 	uint32_t v;
-	NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+	NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
 	*r = v;
 	return NDR_ERR_SUCCESS;
 }
@@ -885,7 +885,7 @@ _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *n
 static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r)
 {
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_align(ndr, 5));
 		NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
 		NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
 	}
@@ -898,7 +898,7 @@ static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr
 static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r)
 {
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_pull_align(ndr, 4));
+		NDR_CHECK(ndr_pull_align(ndr, 5));
 		NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
 		NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
 	}
@@ -921,7 +921,7 @@ static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags,
 {
 	uint32_t cntr_stores_1;
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_align(ndr, 5));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->entry_path));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 		NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
@@ -934,19 +934,19 @@ static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags,
 	}
 	if (ndr_flags & NDR_BUFFERS) {
 		if (r->entry_path) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->entry_path, ndr_charset_length(r->entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 		if (r->comment) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 		if (r->stores) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores));
 			for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
 				NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
 			}
@@ -969,7 +969,7 @@ static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags,
 	TALLOC_CTX *_mem_save_stores_0;
 	TALLOC_CTX *_mem_save_stores_1;
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_pull_align(ndr, 4));
+		NDR_CHECK(ndr_pull_align(ndr, 5));
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entry_path));
 		if (_ptr_entry_path) {
 			NDR_PULL_ALLOC(ndr, r->entry_path);
@@ -1117,14 +1117,14 @@ _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const
 static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
 {
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_align(ndr, 5));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 	}
 	if (ndr_flags & NDR_BUFFERS) {
 		if (r->comment) {
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
+			NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 	}
@@ -1136,7 +1136,7 @@ static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flag
 	uint32_t _ptr_comment;
 	TALLOC_CTX *_mem_save_comment_0;
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_pull_align(ndr, 4));
+		NDR_CHECK(ndr_pull_align(ndr, 5));
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
 		if (_ptr_comment) {
 			NDR_PULL_ALLOC(ndr, r->comment);
@@ -1297,7 +1297,7 @@ _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, con
 static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r)
 {
 	if (ndr_flags & NDR_SCALARS) {
-		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_align(ndr, 5));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
 		NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
 		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
@@ -1306,9 +1306,9 @@ static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flag


-- 
Samba Shared Repository


More information about the samba-cvs mailing list