r18271: Big change:
authorGerald Carter <jerry@samba.org>
Fri, 8 Sep 2006 14:28:06 +0000 (14:28 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:51:18 +0000 (11:51 -0500)
* autogenerate lsa ndr code
* rename 'enum SID_NAME_USE' to 'enum lsa_SidType'
* merge a log more security descriptor functions from
  gen_ndr/ndr_security.c in SAMBA_4_0

The most embarassing thing is the "#define strlen_m strlen"
We need a real implementation in SAMBA_3_0 which I'll work on
after this code is in.

59 files changed:
source/Makefile.in
source/auth/auth_util.c
source/groupdb/mapping.c
source/include/charset.h
source/include/includes.h
source/include/mapping.h
source/include/passdb.h
source/include/smb.h
source/lib/util_sid.c
source/libads/ads_utils.c
source/libmsrpc/cac_lsarpc.c
source/librpc/gen_ndr/cli_lsa.c [new file with mode: 0644]
source/librpc/gen_ndr/cli_lsa.h [new file with mode: 0644]
source/librpc/gen_ndr/lsa.h [new file with mode: 0644]
source/librpc/gen_ndr/ndr_lsa.c [new file with mode: 0644]
source/librpc/gen_ndr/ndr_lsa.h [new file with mode: 0644]
source/librpc/gen_ndr/ndr_unixinfo.c
source/librpc/ndr/ndr_misc.c
source/librpc/ndr/ndr_sec_helper.c
source/librpc/ndr/sid.c
source/libsmb/libsmbclient.c
source/modules/vfs_afsacl.c
source/nsswitch/wb_client.c
source/nsswitch/wbinfo.c
source/nsswitch/winbindd.h
source/nsswitch/winbindd_async.c
source/nsswitch/winbindd_cache.c
source/nsswitch/winbindd_creds.c
source/nsswitch/winbindd_group.c
source/nsswitch/winbindd_pam.c
source/nsswitch/winbindd_passdb.c
source/nsswitch/winbindd_reconnect.c
source/nsswitch/winbindd_rpc.c
source/nsswitch/winbindd_sid.c
source/nsswitch/winbindd_user.c
source/nsswitch/winbindd_util.c
source/passdb/lookup_sid.c
source/passdb/passdb.c
source/passdb/pdb_get_set.c
source/passdb/pdb_interface.c
source/passdb/pdb_ldap.c
source/python/py_lsa.c
source/rpc_client/cli_lsarpc.c
source/rpc_parse/parse_samr.c
source/rpc_server/srv_lsa_nt.c
source/rpc_server/srv_samr_nt.c
source/rpcclient/cmd_lsarpc.c
source/smbd/lanman.c
source/smbd/service.c
source/smbd/share_access.c
source/utils/net_groupmap.c
source/utils/net_lookup.c
source/utils/net_rpc.c
source/utils/net_rpc_rights.c
source/utils/net_sam.c
source/utils/net_util.c
source/utils/netlookup.c
source/utils/smbcacls.c
source/utils/smbcquotas.c

index 231583469f9da84619767ee214db73f4b526905f..f4acd086b43872c9912931cc58f876b90aa599bc 100644 (file)
@@ -212,7 +212,7 @@ SOCKET_WRAPPER_OBJ = lib/socket_wrapper.o
 LIBNDR_OBJ = librpc/ndr/ndr_basic.o librpc/ndr/ndr.o librpc/ndr/ndr_misc.o \
             librpc/ndr/ndr_sec_helper.o librpc/ndr/ndr_string.o librpc/ndr/sid.o
 
-LIBNDR_GEN_OBJ = librpc/gen_ndr/ndr_unixinfo.o
+LIBNDR_GEN_OBJ = librpc/gen_ndr/ndr_unixinfo.o librpc/gen_ndr/ndr_lsa.o
 
 RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o
 
@@ -841,7 +841,7 @@ cac: SHOWFLAGS $(LIBMSRPC)
 
 #####################################################################
 ## Perl IDL Compiler
-IDL_FILES = unixinfo.idl 
+IDL_FILES = unixinfo.idl lsa.idl
 
 pidl/Makefile: pidl/Makefile.PL
        @echo Building Perl IDL Compiler....
@@ -1715,8 +1715,8 @@ uninstallpammodules:
 TOPFILES=dynconfig.o dynconfig.@PICSUFFIX@
 
 clean: delheaders python_clean
-       -rm -f core */*~ *~ */*.o */*.@PICSUFFIX@ */*.@SHLIBEXT@ \
-               tdb/*/*.o tdb/*/*.@PICSUFFIX@ tdb/*/*.@SHLIBEXT@ \
+       -rm -f core */*~ *~ */*.o */*/*.o */*.@PICSUFFIX@ */*/*.@PICSUFFIX@ \
+               */*.@SHLIBEXT@ */*/*.@SHLIBEXT@ \
                $(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(ROOT_SBIN_PROGS) \
                $(MODULES) $(TORTURE_PROGS) $(LIBSMBCLIENT) \
                $(LIBSMBSHAREMODES) $(EVERYTHING_PROGS) $(LIBMSRPC) \
index 1ab9d2a49e11e48557806fd4f53584cca2c9bf74..fd857a280623fb066849473ddf349423b1a3e582 100644 (file)
@@ -781,7 +781,7 @@ static NTSTATUS create_builtin_administrators( void )
        NTSTATUS status;
        DOM_SID dom_admins, root_sid;
        fstring root_name;
-       enum SID_NAME_USE type;         
+       enum lsa_SidType type;          
        TALLOC_CTX *ctx;
        BOOL ret;
 
@@ -1061,7 +1061,7 @@ NTSTATUS create_token_from_username(TALLOC_CTX *mem_ctx, const char *username,
        NTSTATUS result = NT_STATUS_NO_SUCH_USER;
        TALLOC_CTX *tmp_ctx;
        DOM_SID user_sid;
-       enum SID_NAME_USE type;
+       enum lsa_SidType type;
        gid_t *gids;
        DOM_SID primary_group_sid;
        DOM_SID *group_sids;
index b1c5275bc101666f008477a9ed6207e389bcf411..3d7b9f3f91a0aae850030108ea25e07702926e52 100644 (file)
@@ -38,7 +38,7 @@ static TDB_CONTEXT *tdb; /* used for driver files */
 #define MEMBEROF_PREFIX "MEMBEROF/"
 
 
-static BOOL enum_group_mapping(const DOM_SID *sid, enum SID_NAME_USE sid_name_use, GROUP_MAP **pp_rmap,
+static BOOL enum_group_mapping(const DOM_SID *sid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
                                size_t *p_num_entries, BOOL unix_only);
 static BOOL group_map_remove(const DOM_SID *sid);
                        
@@ -136,7 +136,7 @@ static BOOL add_mapping_entry(GROUP_MAP *map, int flag)
 /****************************************************************************
 initialise first time the mapping list
 ****************************************************************************/
-NTSTATUS add_initial_entry(gid_t gid, const char *sid, enum SID_NAME_USE sid_name_use, const char *nt_name, const char *comment)
+NTSTATUS add_initial_entry(gid_t gid, const char *sid, enum lsa_SidType sid_name_use, const char *nt_name, const char *comment)
 {
        GROUP_MAP map;
 
@@ -398,7 +398,7 @@ static BOOL group_map_remove(const DOM_SID *sid)
  Enumerate the group mapping.
 ****************************************************************************/
 
-static BOOL enum_group_mapping(const DOM_SID *domsid, enum SID_NAME_USE sid_name_use, GROUP_MAP **pp_rmap,
+static BOOL enum_group_mapping(const DOM_SID *domsid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
                        size_t *p_num_entries, BOOL unix_only)
 {
        TDB_DATA kbuf, dbuf, newkey;
@@ -1040,7 +1040,7 @@ NTSTATUS pdb_default_delete_group_mapping_entry(struct pdb_methods *methods,
 }
 
 NTSTATUS pdb_default_enum_group_mapping(struct pdb_methods *methods,
-                                          const DOM_SID *sid, enum SID_NAME_USE sid_name_use,
+                                          const DOM_SID *sid, enum lsa_SidType sid_name_use,
                                           GROUP_MAP **pp_rmap, size_t *p_num_entries,
                                           BOOL unix_only)
 {
@@ -1068,7 +1068,7 @@ NTSTATUS pdb_default_create_alias(struct pdb_methods *methods,
                                  const char *name, uint32 *rid)
 {
        DOM_SID sid;
-       enum SID_NAME_USE type;
+       enum lsa_SidType type;
        uint32 new_rid;
        gid_t gid;
        BOOL exists;
@@ -1269,7 +1269,7 @@ NTSTATUS pdb_nop_delete_group_mapping_entry(struct pdb_methods *methods,
 }
 
 NTSTATUS pdb_nop_enum_group_mapping(struct pdb_methods *methods,
-                                          enum SID_NAME_USE sid_name_use,
+                                          enum lsa_SidType sid_name_use,
                                           GROUP_MAP **rmap, size_t *num_entries,
                                           BOOL unix_only)
 {
@@ -1317,7 +1317,7 @@ BOOL pdb_set_dom_grp_info(const DOM_SID *sid, const struct acct_info *info)
 NTSTATUS pdb_create_builtin_alias(uint32 rid)
 {
        DOM_SID sid;
-       enum SID_NAME_USE type;
+       enum lsa_SidType type;
        gid_t gid;
        GROUP_MAP map;
        TALLOC_CTX *mem_ctx;
index c5d03a62e8920aff79751e1b101c6e3bcc3f8990..1edf12309a7c64559c309ca2b9a48a20f492d5d9 100644 (file)
 */
 
 /* this defines the charset types used in samba */
-typedef enum {CH_UCS2=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, CH_UTF8=4} charset_t;
+typedef enum {CH_UCS2=0, CH_UTF16=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, CH_UTF8=4} charset_t;
+
+/* FIXME!!!  Hack job for now to get the lsa ndr code compiling */
+#ifndef strlen_m
+#define strlen_m strlen
+#endif
+
 
 #define NUM_CHARSETS 5
 
index ab85c0e75e514cc20fa56730735990f1ce258ff4..635cf3807fd02f1e6c1e8d4863facc54d1623015 100644 (file)
 #undef HAVE_TERMIOS_H
 #endif
 
+#ifdef __GNUC__
+/** 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
+
+#ifndef _PUBLIC_
+#ifdef HAVE_VISIBILITY_ATTR
+#  define _PUBLIC_ __attribute__((visibility("default")))
+#else
+#  define _PUBLIC_
+#endif
+#endif
+
+#ifndef NORETURN_ATTRIBUTE
+#if (__GNUC__ >= 3)
+/** Use gcc attribute to check printf fns.  a1 is the 1-based index of
+ * the parameter containing the format, and a2 the index of the first
+ * argument. Note that some gcc 2.x versions don't handle this
+ * properly **/
+#define NORETURN_ATTRIBUTE __attribute__ ((noreturn))
+#else
+#define NORETURN_ATTRIBUTE
+#endif
+#endif
+
+
 #if (__GNUC__ >= 3 ) && (__GNUC_MINOR__ >= 1 )
 /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
  * the parameter containing the format, and a2 the index of the first
@@ -1000,9 +1030,6 @@ extern int errno;
 #include "rpc_client.h"
 #include "event.h"
 
-#include "librpc/ndr/libndr.h"
-#include "librpc/gen_ndr/unixinfo.h"
-
 /*
  * Type for wide character dirent structure.
  * Only d_name is defined by POSIX.
index fdaa2b04532148af7e5139b0515321a8d268a0e4..8ba784e98c833cda68ffa7425a4c293586d10eb2 100644 (file)
@@ -26,7 +26,7 @@ typedef struct _GROUP_MAP {
        struct pdb_methods *methods;
        gid_t gid;
        DOM_SID sid;
-       enum SID_NAME_USE sid_name_use;
+       enum lsa_SidType sid_name_use;
        fstring nt_name;
        fstring comment;
 } GROUP_MAP;
index 35bb93aa31cc63b0e70fa7087b4003959e121e3d..9dc6d60eb015bd432766d2e369bb18ed750e5697 100644 (file)
@@ -241,7 +241,7 @@ struct pdb_search {
  * samr_lookup_rids twice. It was done in the srv_samr_nt.c code as well as in
  * the pdb module. Remove the latter, this might happen more often. VL.
  * changed to version 14 to move lookup_rids and lookup_names to return
- * enum SID_NAME_USE rather than uint32.
+ * enum lsa_SidType rather than uint32.
  */
 
 #define PASSDB_INTERFACE_VERSION 14
@@ -300,7 +300,7 @@ struct pdb_methods
                                               DOM_SID sid);
 
        NTSTATUS (*enum_group_mapping)(struct pdb_methods *methods,
-                                      const DOM_SID *sid, enum SID_NAME_USE sid_name_use,
+                                      const DOM_SID *sid, enum lsa_SidType sid_name_use,
                                       GROUP_MAP **pp_rmap, size_t *p_num_entries,
                                       BOOL unix_only);
 
@@ -365,14 +365,14 @@ struct pdb_methods
                                int num_rids,
                                uint32 *rids,
                                const char **pp_names,
-                               enum SID_NAME_USE *attrs);
+                               enum lsa_SidType *attrs);
 
        NTSTATUS (*lookup_names)(struct pdb_methods *methods,
                                 const DOM_SID *domain_sid,
                                 int num_names,
                                 const char **pp_names,
                                 uint32 *rids,
-                                enum SID_NAME_USE *attrs);
+                                enum lsa_SidType *attrs);
 
        NTSTATUS (*get_account_policy)(struct pdb_methods *methods,
                                       int policy_index, uint32 *value);
@@ -396,7 +396,7 @@ struct pdb_methods
        BOOL (*gid_to_sid)(struct pdb_methods *methods, gid_t gid,
                           DOM_SID *sid);
        BOOL (*sid_to_id)(struct pdb_methods *methods, const DOM_SID *sid,
-                         union unid_t *id, enum SID_NAME_USE *type);
+                         union unid_t *id, enum lsa_SidType *type);
 
        BOOL (*rid_algorithm)(struct pdb_methods *methods);
        BOOL (*new_rid)(struct pdb_methods *methods, uint32 *rid);
index 6bc8680f86bc015492e73d8a717dfc1507565e3d..eb8ec93f7eb1c917661386c296bd96e0e0656768 100644 (file)
@@ -248,20 +248,6 @@ typedef uint64_t NTTIME;
 
 #define SID_MAX_SIZE ((size_t)(8+(MAXSUBAUTHS*4)))
 
-/* SID Types */
-enum SID_NAME_USE {
-       SID_NAME_USE_NONE = 0,
-       SID_NAME_USER    = 1, /* user */
-       SID_NAME_DOM_GRP,     /* domain group */
-       SID_NAME_DOMAIN,      /* domain sid */
-       SID_NAME_ALIAS,       /* local group */
-       SID_NAME_WKN_GRP,     /* well-known group */
-       SID_NAME_DELETED,     /* deleted account: needed for c2 rating */
-       SID_NAME_INVALID,     /* invalid account */
-       SID_NAME_UNKNOWN,     /* unknown sid type */
-       SID_NAME_COMPUTER     /* sid for a computer */
-};
-
 #define LOOKUP_NAME_ISOLATED 1 /* Look up unqualified names */
 #define LOOKUP_NAME_REMOTE   2  /* Ask others */
 #define LOOKUP_NAME_ALL (LOOKUP_NAME_ISOLATED|LOOKUP_NAME_REMOTE)
@@ -287,8 +273,14 @@ typedef struct dom_sid {
        uint32 sub_auths[MAXSUBAUTHS];  
 } DOM_SID;
 
+#define dom_sid2 dom_sid
+#define dom_sid28 dom_sid
+
 #include "librpc/ndr/misc.h"
 #include "librpc/ndr/security.h"
+#include "librpc/ndr/libndr.h"
+#include "librpc/gen_ndr/unixinfo.h"
+#include "librpc/gen_ndr/lsa.h"
 
 struct lsa_dom_info {
        BOOL valid;
@@ -300,7 +292,7 @@ struct lsa_dom_info {
 
 struct lsa_name_info {
        uint32 rid;
-       enum SID_NAME_USE type;
+       enum lsa_SidType type;
        const char *name;
        int dom_idx;
 };
index 4d31080ec98fb55f289c8421a9c1648b6e7f8b2f..b6952fca81c45e38c693d35765a5d1a760976b43 100644 (file)
@@ -110,7 +110,7 @@ NT_USER_TOKEN system_token = { 1, system_sid_array, SE_ALL_PRIVS };
 ****************************************************************************/
 
 static const struct {
-       enum SID_NAME_USE sid_type;
+       enum lsa_SidType sid_type;
        const char *string;
 } sid_name_type[] = {
        {SID_NAME_USER, "User"},
@@ -123,7 +123,7 @@ static const struct {
        {SID_NAME_UNKNOWN, "UNKNOWN"},
        {SID_NAME_COMPUTER, "Computer"},
 
-       {(enum SID_NAME_USE)0, NULL}
+       {(enum lsa_SidType)0, NULL}
 };
 
 const char *sid_type_lookup(uint32 sid_type) 
index 0cbf235989efcf308ef5ddd948058779c98b12bf..5b450e02dda5752d956ebee9f220de071ebdbe9e 100644 (file)
@@ -135,7 +135,7 @@ uint32 ads_gtype2atype(uint32 gtype)
 }
 
 /* turn a sAMAccountType into a SID_NAME_USE */
-enum SID_NAME_USE ads_atype_map(uint32 atype)
+enum lsa_SidType ads_atype_map(uint32 atype)
 {
        switch (atype & 0xF0000000) {
        case ATYPE_GLOBAL_GROUP:
index 72c429e724791215b085792321aa43324d4ccc87..5ff49b58d14d48ce8dfe924284eb8a2b5ed50f03 100644 (file)
@@ -144,7 +144,7 @@ int cac_LsaGetNamesFromSids(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct Ls
    /*buffers for outputs*/
    char **domains   = NULL;
    char **names     = NULL;
-   enum SID_NAME_USE *types    = NULL;
+   enum lsa_SidType *types    = NULL;
 
    CacSidInfo *sids_out   = NULL;
    DOM_SID *unknown_out   = NULL;
@@ -267,7 +267,7 @@ int cac_LsaGetSidsFromNames(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct Ls
 
    /*buffers for outputs*/
    DOM_SID *sids     = NULL;
-   enum SID_NAME_USE *types     = NULL;
+   enum lsa_SidType *types     = NULL;
 
    CacSidInfo *sids_out  = NULL;
    char **unknown_out     = NULL;
@@ -579,7 +579,7 @@ int cac_LsaEnumAccountRights(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct L
 
    if(op->in.name && !op->in.sid) {
       DOM_SID *user_sid = NULL;
-      enum SID_NAME_USE *type;
+      enum lsa_SidType *type;
 
       /*lookup the SID*/
       hnd->status = rpccli_lsa_lookup_names( pipe_hnd, mem_ctx, op->in.pol, 1, (const char **)&(op->in.name), NULL, &user_sid, &type);
@@ -806,7 +806,7 @@ int cac_LsaOpenAccount(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaOpen
    /*look up the user's SID if we have to*/
    if(op->in.name && !op->in.sid) {
       DOM_SID *user_sid = NULL;
-      enum SID_NAME_USE *type;
+      enum lsa_SidType *type;
 
       /*lookup the SID*/
       hnd->status = rpccli_lsa_lookup_names( pipe_hnd, mem_ctx, op->in.pol, 1, (const char **)&(op->in.name), NULL, &user_sid, &type);
@@ -840,7 +840,7 @@ int cac_LsaAddPrivileges(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaAd
    struct rpc_pipe_client *pipe_hnd = NULL;
 
    DOM_SID *user_sid = NULL;
-   enum SID_NAME_USE  *type     = NULL;
+   enum lsa_SidType  *type     = NULL;
 
    if(!hnd) {
       return CAC_FAILURE;
@@ -890,7 +890,7 @@ int cac_LsaRemovePrivileges(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct Ls
    struct rpc_pipe_client *pipe_hnd = NULL;
 
    DOM_SID *user_sid = NULL;
-   enum SID_NAME_USE  *type     = NULL;
+   enum lsa_SidType  *type     = NULL;
 
    if(!hnd) {
       return CAC_FAILURE;
@@ -940,7 +940,7 @@ int cac_LsaClearPrivileges(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct Lsa
    struct rpc_pipe_client *pipe_hnd = NULL;
 
    DOM_SID *user_sid = NULL;
-   enum SID_NAME_USE  *type     = NULL;
+   enum lsa_SidType  *type     = NULL;
 
    if(!hnd) {
       return CAC_FAILURE;
@@ -990,7 +990,7 @@ int cac_LsaSetPrivileges(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaAd
    struct rpc_pipe_client *pipe_hnd = NULL;
 
    DOM_SID *user_sid = NULL;
-   enum SID_NAME_USE  *type     = NULL;
+   enum lsa_SidType  *type     = NULL;
 
    if(!hnd) {
       return CAC_FAILURE;
diff --git a/source/librpc/gen_ndr/cli_lsa.c b/source/librpc/gen_ndr/cli_lsa.c
new file mode 100644 (file)
index 0000000..49ba425
--- /dev/null
@@ -0,0 +1,1612 @@
+/*
+ * Unix SMB/CIFS implementation.
+ * client auto-generated by pidl. DO NOT MODIFY!
+ */
+
+#include "includes.h"
+#include "librpc/gen_ndr/cli_lsa.h"
+
+NTSTATUS rpccli_lsa_Close(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
+{
+       struct lsa_Close r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CLOSE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_Close, (ndr_push_flags_fn_t)ndr_push_lsa_Close);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *handle = *r.out.handle;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_Delete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
+{
+       struct lsa_Delete r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_DELETE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_Delete, (ndr_push_flags_fn_t)ndr_push_lsa_Delete);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_EnumPrivs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, uint32_t max_count, struct lsa_PrivArray *privs)
+{
+       struct lsa_EnumPrivs r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.resume_handle = resume_handle;
+       r.in.max_count = max_count;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMPRIVS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumPrivs, (ndr_push_flags_fn_t)ndr_push_lsa_EnumPrivs);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *resume_handle = *r.out.resume_handle;
+       *privs = *r.out.privs;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t sec_info, struct sec_desc_buf *sdbuf)
+{
+       struct lsa_QuerySecurity r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.sec_info = sec_info;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYSECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QuerySecurity, (ndr_push_flags_fn_t)ndr_push_lsa_QuerySecurity);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *sdbuf = *r.out.sdbuf;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_SetSecObj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_SetSecObj r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETSECOBJ, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetSecObj, (ndr_push_flags_fn_t)ndr_push_lsa_SetSecObj);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_ChangePassword(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_ChangePassword r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CHANGEPASSWORD, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_ChangePassword, (ndr_push_flags_fn_t)ndr_push_lsa_ChangePassword);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_OpenPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, struct lsa_ObjectAttribute *attr, uint32_t access_mask, struct policy_handle *handle)
+{
+       struct lsa_OpenPolicy r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.system_name = system_name;
+       r.in.attr = attr;
+       r.in.access_mask = access_mask;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_OPENPOLICY, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_OpenPolicy, (ndr_push_flags_fn_t)ndr_push_lsa_OpenPolicy);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *handle = *r.out.handle;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint16_t level, union lsa_PolicyInformation *info)
+{
+       struct lsa_QueryInfoPolicy r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.level = level;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYINFOPOLICY, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QueryInfoPolicy, (ndr_push_flags_fn_t)ndr_push_lsa_QueryInfoPolicy);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *info = *r.out.info;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_SetInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_SetInfoPolicy r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETINFOPOLICY, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetInfoPolicy, (ndr_push_flags_fn_t)ndr_push_lsa_SetInfoPolicy);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_ClearAuditLog(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_ClearAuditLog r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CLEARAUDITLOG, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_ClearAuditLog, (ndr_push_flags_fn_t)ndr_push_lsa_ClearAuditLog);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CreateAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, struct policy_handle *acct_handle)
+{
+       struct lsa_CreateAccount r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.sid = sid;
+       r.in.access_mask = access_mask;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREATEACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CreateAccount, (ndr_push_flags_fn_t)ndr_push_lsa_CreateAccount);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *acct_handle = *r.out.acct_handle;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, uint32_t num_entries, struct lsa_SidArray *sids)
+{
+       struct lsa_EnumAccounts r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.resume_handle = resume_handle;
+       r.in.num_entries = num_entries;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMACCOUNTS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumAccounts, (ndr_push_flags_fn_t)ndr_push_lsa_EnumAccounts);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *resume_handle = *r.out.resume_handle;
+       *sids = *r.out.sids;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_DomainInfo *info, uint32_t access_mask, struct policy_handle *trustdom_handle)
+{
+       struct lsa_CreateTrustedDomain r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.info = info;
+       r.in.access_mask = access_mask;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREATETRUSTEDDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CreateTrustedDomain, (ndr_push_flags_fn_t)ndr_push_lsa_CreateTrustedDomain);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *trustdom_handle = *r.out.trustdom_handle;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_EnumTrustDom(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, uint32_t max_size, struct lsa_DomainList *domains)
+{
+       struct lsa_EnumTrustDom r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.resume_handle = resume_handle;
+       r.in.max_size = max_size;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMTRUSTDOM, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumTrustDom, (ndr_push_flags_fn_t)ndr_push_lsa_EnumTrustDom);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *resume_handle = *r.out.resume_handle;
+       *domains = *r.out.domains;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray *sids, uint16_t level, uint32_t *count)
+{
+       struct lsa_LookupNames r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.num_names = num_names;
+       r.in.names = names;
+       r.in.sids = sids;
+       r.in.level = level;
+       r.in.count = count;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPNAMES, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupNames, (ndr_push_flags_fn_t)ndr_push_lsa_LookupNames);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *domains = *r.out.domains;
+       *sids = *r.out.sids;
+       *count = *r.out.count;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_SidArray *sids, struct lsa_RefDomainList *domains, struct lsa_TransNameArray *names, uint16_t level, uint32_t *count)
+{
+       struct lsa_LookupSids r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.sids = sids;
+       r.in.names = names;
+       r.in.level = level;
+       r.in.count = count;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPSIDS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupSids, (ndr_push_flags_fn_t)ndr_push_lsa_LookupSids);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *domains = *r.out.domains;
+       *names = *r.out.names;
+       *count = *r.out.count;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CreateSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String name, uint32_t access_mask, struct policy_handle *sec_handle)
+{
+       struct lsa_CreateSecret r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.name = name;
+       r.in.access_mask = access_mask;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREATESECRET, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CreateSecret, (ndr_push_flags_fn_t)ndr_push_lsa_CreateSecret);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *sec_handle = *r.out.sec_handle;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, struct policy_handle *acct_handle)
+{
+       struct lsa_OpenAccount r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.sid = sid;
+       r.in.access_mask = access_mask;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_OPENACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_OpenAccount, (ndr_push_flags_fn_t)ndr_push_lsa_OpenAccount);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *acct_handle = *r.out.acct_handle;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_PrivilegeSet *privs)
+{
+       struct lsa_EnumPrivsAccount r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMPRIVSACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumPrivsAccount, (ndr_push_flags_fn_t)ndr_push_lsa_EnumPrivsAccount);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *privs = *r.out.privs;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_PrivilegeSet *privs)
+{
+       struct lsa_AddPrivilegesToAccount r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.privs = privs;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ADDPRIVILEGESTOACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_AddPrivilegesToAccount, (ndr_push_flags_fn_t)ndr_push_lsa_AddPrivilegesToAccount);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_RemovePrivilegesFromAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t remove_all, struct lsa_PrivilegeSet *privs)
+{
+       struct lsa_RemovePrivilegesFromAccount r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.remove_all = remove_all;
+       r.in.privs = privs;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_REMOVEPRIVILEGESFROMACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_RemovePrivilegesFromAccount, (ndr_push_flags_fn_t)ndr_push_lsa_RemovePrivilegesFromAccount);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_GetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_GetQuotasForAccount r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_GETQUOTASFORACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_GetQuotasForAccount, (ndr_push_flags_fn_t)ndr_push_lsa_GetQuotasForAccount);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_SetQuotasForAccount r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETQUOTASFORACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetQuotasForAccount, (ndr_push_flags_fn_t)ndr_push_lsa_SetQuotasForAccount);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_GetSystemAccessAccount r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_GETSYSTEMACCESSACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_GetSystemAccessAccount, (ndr_push_flags_fn_t)ndr_push_lsa_GetSystemAccessAccount);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_SetSystemAccessAccount r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETSYSTEMACCESSACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetSystemAccessAccount, (ndr_push_flags_fn_t)ndr_push_lsa_SetSystemAccessAccount);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_OpenTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, struct policy_handle *trustdom_handle)
+{
+       struct lsa_OpenTrustedDomain r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.sid = sid;
+       r.in.access_mask = access_mask;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_OPENTRUSTEDDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_OpenTrustedDomain, (ndr_push_flags_fn_t)ndr_push_lsa_OpenTrustedDomain);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *trustdom_handle = *r.out.trustdom_handle;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *trustdom_handle, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info)
+{
+       struct lsa_QueryTrustedDomainInfo r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.trustdom_handle = trustdom_handle;
+       r.in.level = level;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYTRUSTEDDOMAININFO, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QueryTrustedDomainInfo, (ndr_push_flags_fn_t)ndr_push_lsa_QueryTrustedDomainInfo);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *info = *r.out.info;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_SetInformationTrustedDomain r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETINFORMATIONTRUSTEDDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetInformationTrustedDomain, (ndr_push_flags_fn_t)ndr_push_lsa_SetInformationTrustedDomain);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_OpenSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String name, uint32_t access_mask, struct policy_handle *sec_handle)
+{
+       struct lsa_OpenSecret r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.name = name;
+       r.in.access_mask = access_mask;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_OPENSECRET, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_OpenSecret, (ndr_push_flags_fn_t)ndr_push_lsa_OpenSecret);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *sec_handle = *r.out.sec_handle;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_SetSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *sec_handle, struct lsa_DATA_BUF *new_val, struct lsa_DATA_BUF *old_val)
+{
+       struct lsa_SetSecret r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.sec_handle = sec_handle;
+       r.in.new_val = new_val;
+       r.in.old_val = old_val;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETSECRET, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetSecret, (ndr_push_flags_fn_t)ndr_push_lsa_SetSecret);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_QuerySecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *sec_handle, struct lsa_DATA_BUF_PTR *new_val, NTTIME *new_mtime, struct lsa_DATA_BUF_PTR *old_val, NTTIME *old_mtime)
+{
+       struct lsa_QuerySecret r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.sec_handle = sec_handle;
+       r.in.new_val = new_val;
+       r.in.new_mtime = new_mtime;
+       r.in.old_val = old_val;
+       r.in.old_mtime = old_mtime;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYSECRET, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QuerySecret, (ndr_push_flags_fn_t)ndr_push_lsa_QuerySecret);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *new_val = *r.out.new_val;
+       *new_mtime = *r.out.new_mtime;
+       *old_val = *r.out.old_val;
+       *old_mtime = *r.out.old_mtime;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LookupPrivValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String *name, struct lsa_LUID *luid)
+{
+       struct lsa_LookupPrivValue r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.name = name;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPPRIVVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupPrivValue, (ndr_push_flags_fn_t)ndr_push_lsa_LookupPrivValue);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *luid = *r.out.luid;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_LUID *luid, struct lsa_StringLarge *name)
+{
+       struct lsa_LookupPrivName r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.luid = luid;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPPRIVNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupPrivName, (ndr_push_flags_fn_t)ndr_push_lsa_LookupPrivName);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *name = *r.out.name;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String *name, struct lsa_StringLarge *disp_name, uint16_t *language_id, uint16_t unknown)
+{
+       struct lsa_LookupPrivDisplayName r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.name = name;
+       r.in.language_id = language_id;
+       r.in.unknown = unknown;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPPRIVDISPLAYNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupPrivDisplayName, (ndr_push_flags_fn_t)ndr_push_lsa_LookupPrivDisplayName);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *disp_name = *r.out.disp_name;
+       *language_id = *r.out.language_id;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_DeleteObject r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_DELETEOBJECT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_DeleteObject, (ndr_push_flags_fn_t)ndr_push_lsa_DeleteObject);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String *name, struct lsa_SidArray *sids)
+{
+       struct lsa_EnumAccountsWithUserRight r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.name = name;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMACCOUNTSWITHUSERRIGHT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumAccountsWithUserRight, (ndr_push_flags_fn_t)ndr_push_lsa_EnumAccountsWithUserRight);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *sids = *r.out.sids;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_EnumAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, struct lsa_RightSet *rights)
+{
+       struct lsa_EnumAccountRights r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.sid = sid;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMACCOUNTRIGHTS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumAccountRights, (ndr_push_flags_fn_t)ndr_push_lsa_EnumAccountRights);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *rights = *r.out.rights;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_AddAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, struct lsa_RightSet *rights)
+{
+       struct lsa_AddAccountRights r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.sid = sid;
+       r.in.rights = rights;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ADDACCOUNTRIGHTS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_AddAccountRights, (ndr_push_flags_fn_t)ndr_push_lsa_AddAccountRights);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t unknown, struct lsa_RightSet *rights)
+{
+       struct lsa_RemoveAccountRights r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.sid = sid;
+       r.in.unknown = unknown;
+       r.in.rights = rights;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_REMOVEACCOUNTRIGHTS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_RemoveAccountRights, (ndr_push_flags_fn_t)ndr_push_lsa_RemoveAccountRights);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *dom_sid, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info)
+{
+       struct lsa_QueryTrustedDomainInfoBySid r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.dom_sid = dom_sid;
+       r.in.level = level;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYTRUSTEDDOMAININFOBYSID, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QueryTrustedDomainInfoBySid, (ndr_push_flags_fn_t)ndr_push_lsa_QueryTrustedDomainInfoBySid);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *info = *r.out.info;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_SetTrustedDomainInfo r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETTRUSTEDDOMAININFO, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetTrustedDomainInfo, (ndr_push_flags_fn_t)ndr_push_lsa_SetTrustedDomainInfo);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *dom_sid)
+{
+       struct lsa_DeleteTrustedDomain r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.dom_sid = dom_sid;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_DELETETRUSTEDDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_DeleteTrustedDomain, (ndr_push_flags_fn_t)ndr_push_lsa_DeleteTrustedDomain);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_StorePrivateData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_StorePrivateData r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_STOREPRIVATEDATA, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_StorePrivateData, (ndr_push_flags_fn_t)ndr_push_lsa_StorePrivateData);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_RetrievePrivateData r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_RETRIEVEPRIVATEDATA, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_RetrievePrivateData, (ndr_push_flags_fn_t)ndr_push_lsa_RetrievePrivateData);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_OpenPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name, struct lsa_ObjectAttribute *attr, uint32_t access_mask, struct policy_handle *handle)
+{
+       struct lsa_OpenPolicy2 r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.system_name = system_name;
+       r.in.attr = attr;
+       r.in.access_mask = access_mask;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_OPENPOLICY2, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_OpenPolicy2, (ndr_push_flags_fn_t)ndr_push_lsa_OpenPolicy2);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *handle = *r.out.handle;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name, struct lsa_String *account_name, struct lsa_StringPointer *authority_name)
+{
+       struct lsa_GetUserName r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.system_name = system_name;
+       r.in.account_name = account_name;
+       r.in.authority_name = authority_name;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_GETUSERNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_GetUserName, (ndr_push_flags_fn_t)ndr_push_lsa_GetUserName);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *account_name = *r.out.account_name;
+       *authority_name = *r.out.authority_name;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint16_t level, union lsa_PolicyInformation *info)
+{
+       struct lsa_QueryInfoPolicy2 r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.level = level;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYINFOPOLICY2, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QueryInfoPolicy2, (ndr_push_flags_fn_t)ndr_push_lsa_QueryInfoPolicy2);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *info = *r.out.info;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_SetInfoPolicy2 r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETINFOPOLICY2, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetInfoPolicy2, (ndr_push_flags_fn_t)ndr_push_lsa_SetInfoPolicy2);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String trusted_domain, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info)
+{
+       struct lsa_QueryTrustedDomainInfoByName r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.trusted_domain = trusted_domain;
+       r.in.level = level;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYTRUSTEDDOMAININFOBYNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QueryTrustedDomainInfoByName, (ndr_push_flags_fn_t)ndr_push_lsa_QueryTrustedDomainInfoByName);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *info = *r.out.info;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String trusted_domain, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info)
+{
+       struct lsa_SetTrustedDomainInfoByName r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.trusted_domain = trusted_domain;
+       r.in.level = level;
+       r.in.info = info;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETTRUSTEDDOMAININFOBYNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetTrustedDomainInfoByName, (ndr_push_flags_fn_t)ndr_push_lsa_SetTrustedDomainInfoByName);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, struct lsa_DomainListEx *domains, uint32_t max_size)
+{
+       struct lsa_EnumTrustedDomainsEx r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.resume_handle = resume_handle;
+       r.in.max_size = max_size;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMTRUSTEDDOMAINSEX, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumTrustedDomainsEx, (ndr_push_flags_fn_t)ndr_push_lsa_EnumTrustedDomainsEx);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *resume_handle = *r.out.resume_handle;
+       *domains = *r.out.domains;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_CreateTrustedDomainEx r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREATETRUSTEDDOMAINEX, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CreateTrustedDomainEx, (ndr_push_flags_fn_t)ndr_push_lsa_CreateTrustedDomainEx);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CloseTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle)
+{
+       struct lsa_CloseTrustedDomainEx r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CLOSETRUSTEDDOMAINEX, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CloseTrustedDomainEx, (ndr_push_flags_fn_t)ndr_push_lsa_CloseTrustedDomainEx);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *handle = *r.out.handle;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint16_t level, union lsa_DomainInformationPolicy *info)
+{
+       struct lsa_QueryDomainInformationPolicy r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.level = level;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYDOMAININFORMATIONPOLICY, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QueryDomainInformationPolicy, (ndr_push_flags_fn_t)ndr_push_lsa_QueryDomainInformationPolicy);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *info = *r.out.info;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_SetDomainInformationPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint16_t level, union lsa_DomainInformationPolicy *info)
+{
+       struct lsa_SetDomainInformationPolicy r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.level = level;
+       r.in.info = info;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETDOMAININFORMATIONPOLICY, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetDomainInformationPolicy, (ndr_push_flags_fn_t)ndr_push_lsa_SetDomainInformationPolicy);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_OpenTrustedDomainByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String name, uint32_t access_mask, struct policy_handle *trustdom_handle)
+{
+       struct lsa_OpenTrustedDomainByName r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.name = name;
+       r.in.access_mask = access_mask;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_OPENTRUSTEDDOMAINBYNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_OpenTrustedDomainByName, (ndr_push_flags_fn_t)ndr_push_lsa_OpenTrustedDomainByName);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *trustdom_handle = *r.out.trustdom_handle;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_TestCall(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_TestCall r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_TESTCALL, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_TestCall, (ndr_push_flags_fn_t)ndr_push_lsa_TestCall);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_SidArray *sids, struct lsa_RefDomainList *domains, struct lsa_TransNameArray2 *names, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2)
+{
+       struct lsa_LookupSids2 r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.sids = sids;
+       r.in.names = names;
+       r.in.level = level;
+       r.in.count = count;
+       r.in.unknown1 = unknown1;
+       r.in.unknown2 = unknown2;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPSIDS2, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupSids2, (ndr_push_flags_fn_t)ndr_push_lsa_LookupSids2);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *domains = *r.out.domains;
+       *names = *r.out.names;
+       *count = *r.out.count;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray2 *sids, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2)
+{
+       struct lsa_LookupNames2 r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.num_names = num_names;
+       r.in.names = names;
+       r.in.sids = sids;
+       r.in.level = level;
+       r.in.count = count;
+       r.in.unknown1 = unknown1;
+       r.in.unknown2 = unknown2;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPNAMES2, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupNames2, (ndr_push_flags_fn_t)ndr_push_lsa_LookupNames2);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *domains = *r.out.domains;
+       *sids = *r.out.sids;
+       *count = *r.out.count;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_CreateTrustedDomainEx2 r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREATETRUSTEDDOMAINEX2, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CreateTrustedDomainEx2, (ndr_push_flags_fn_t)ndr_push_lsa_CreateTrustedDomainEx2);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CREDRWRITE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_CREDRWRITE r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRWRITE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRWRITE, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRWRITE);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CREDRREAD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_CREDRREAD r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRREAD, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRREAD, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRREAD);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CREDRENUMERATE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_CREDRENUMERATE r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRENUMERATE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRENUMERATE, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRENUMERATE);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_CREDRWRITEDOMAINCREDENTIALS r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRWRITEDOMAINCREDENTIALS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CREDRREADDOMAINCREDENTIALS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_CREDRREADDOMAINCREDENTIALS r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRREADDOMAINCREDENTIALS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRREADDOMAINCREDENTIALS);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CREDRDELETE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_CREDRDELETE r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRDELETE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRDELETE, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRDELETE);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CREDRGETTARGETINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_CREDRGETTARGETINFO r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRGETTARGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRGETTARGETINFO, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRGETTARGETINFO);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CREDRPROFILELOADED(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_CREDRPROFILELOADED r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRPROFILELOADED, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRPROFILELOADED, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRPROFILELOADED);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray3 *sids, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2)
+{
+       struct lsa_LookupNames3 r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.handle = handle;
+       r.in.num_names = num_names;
+       r.in.names = names;
+       r.in.sids = sids;
+       r.in.level = level;
+       r.in.count = count;
+       r.in.unknown1 = unknown1;
+       r.in.unknown2 = unknown2;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPNAMES3, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupNames3, (ndr_push_flags_fn_t)ndr_push_lsa_LookupNames3);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *domains = *r.out.domains;
+       *sids = *r.out.sids;
+       *count = *r.out.count;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_CREDRGETSESSIONTYPES r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRGETSESSIONTYPES, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRGETSESSIONTYPES, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRGETSESSIONTYPES);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_LSARREGISTERAUDITEVENT r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARREGISTERAUDITEVENT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARREGISTERAUDITEVENT, (ndr_push_flags_fn_t)ndr_push_lsa_LSARREGISTERAUDITEVENT);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LSARGENAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_LSARGENAUDITEVENT r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARGENAUDITEVENT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARGENAUDITEVENT, (ndr_push_flags_fn_t)ndr_push_lsa_LSARGENAUDITEVENT);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_LSARUNREGISTERAUDITEVENT r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARUNREGISTERAUDITEVENT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARUNREGISTERAUDITEVENT, (ndr_push_flags_fn_t)ndr_push_lsa_LSARUNREGISTERAUDITEVENT);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_LSARQUERYFORESTTRUSTINFORMATION r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARQUERYFORESTTRUSTINFORMATION, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARQUERYFORESTTRUSTINFORMATION, (ndr_push_flags_fn_t)ndr_push_lsa_LSARQUERYFORESTTRUSTINFORMATION);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_LSARSETFORESTTRUSTINFORMATION r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARSETFORESTTRUSTINFORMATION, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION, (ndr_push_flags_fn_t)ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_CREDRRENAME r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRRENAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRRENAME, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRRENAME);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_SidArray *sids, struct lsa_RefDomainList *domains, struct lsa_TransNameArray2 *names, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2)
+{
+       struct lsa_LookupSids3 r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.sids = sids;
+       r.in.names = names;
+       r.in.level = level;
+       r.in.count = count;
+       r.in.unknown1 = unknown1;
+       r.in.unknown2 = unknown2;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPSIDS3, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupSids3, (ndr_push_flags_fn_t)ndr_push_lsa_LookupSids3);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *domains = *r.out.domains;
+       *names = *r.out.names;
+       *count = *r.out.count;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_names, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray3 *sids, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2)
+{
+       struct lsa_LookupNames4 r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       r.in.num_names = num_names;
+       r.in.names = names;
+       r.in.sids = sids;
+       r.in.level = level;
+       r.in.count = count;
+       r.in.unknown1 = unknown1;
+       r.in.unknown2 = unknown2;
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPNAMES4, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupNames4, (ndr_push_flags_fn_t)ndr_push_lsa_LookupNames4);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       *domains = *r.out.domains;
+       *sids = *r.out.sids;
+       *count = *r.out.count;
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_LSAROPENPOLICYSCE r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSAROPENPOLICYSCE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSAROPENPOLICYSCE, (ndr_push_flags_fn_t)ndr_push_lsa_LSAROPENPOLICYSCE);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARADTREGISTERSECURITYEVENTSOURCE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE, (ndr_push_flags_fn_t)ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, (ndr_push_flags_fn_t)ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
+NTSTATUS rpccli_lsa_LSARADTREPORTSECURITYEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx)
+{
+       struct lsa_LSARADTREPORTSECURITYEVENT r;
+       NTSTATUS status;
+       
+       /* In parameters */
+       status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARADTREPORTSECURITYEVENT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARADTREPORTSECURITYEVENT, (ndr_push_flags_fn_t)ndr_push_lsa_LSARADTREPORTSECURITYEVENT);
+       if (NT_STATUS_IS_ERR(status)) {
+               return status;
+       }
+       
+       /* Return variables */
+       
+       /* Return result */
+       return r.out.result;
+}
+
diff --git a/source/librpc/gen_ndr/cli_lsa.h b/source/librpc/gen_ndr/cli_lsa.h
new file mode 100644 (file)
index 0000000..a44105e
--- /dev/null
@@ -0,0 +1,86 @@
+#include "librpc/gen_ndr/ndr_lsa.h"
+#ifndef __CLI_LSARPC__
+#define __CLI_LSARPC__
+NTSTATUS rpccli_lsa_Close(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle);
+NTSTATUS rpccli_lsa_Delete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle);
+NTSTATUS rpccli_lsa_EnumPrivs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, uint32_t max_count, struct lsa_PrivArray *privs);
+NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t sec_info, struct sec_desc_buf *sdbuf);
+NTSTATUS rpccli_lsa_SetSecObj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_ChangePassword(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_OpenPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, struct lsa_ObjectAttribute *attr, uint32_t access_mask, struct policy_handle *handle);
+NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint16_t level, union lsa_PolicyInformation *info);
+NTSTATUS rpccli_lsa_SetInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_ClearAuditLog(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_CreateAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, struct policy_handle *acct_handle);
+NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, uint32_t num_entries, struct lsa_SidArray *sids);
+NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_DomainInfo *info, uint32_t access_mask, struct policy_handle *trustdom_handle);
+NTSTATUS rpccli_lsa_EnumTrustDom(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, uint32_t max_size, struct lsa_DomainList *domains);
+NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray *sids, uint16_t level, uint32_t *count);
+NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_SidArray *sids, struct lsa_RefDomainList *domains, struct lsa_TransNameArray *names, uint16_t level, uint32_t *count);
+NTSTATUS rpccli_lsa_CreateSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String name, uint32_t access_mask, struct policy_handle *sec_handle);
+NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, struct policy_handle *acct_handle);
+NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_PrivilegeSet *privs);
+NTSTATUS rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_PrivilegeSet *privs);
+NTSTATUS rpccli_lsa_RemovePrivilegesFromAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t remove_all, struct lsa_PrivilegeSet *privs);
+NTSTATUS rpccli_lsa_GetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_OpenTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t access_mask, struct policy_handle *trustdom_handle);
+NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *trustdom_handle, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info);
+NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_OpenSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String name, uint32_t access_mask, struct policy_handle *sec_handle);
+NTSTATUS rpccli_lsa_SetSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *sec_handle, struct lsa_DATA_BUF *new_val, struct lsa_DATA_BUF *old_val);
+NTSTATUS rpccli_lsa_QuerySecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *sec_handle, struct lsa_DATA_BUF_PTR *new_val, NTTIME *new_mtime, struct lsa_DATA_BUF_PTR *old_val, NTTIME *old_mtime);
+NTSTATUS rpccli_lsa_LookupPrivValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String *name, struct lsa_LUID *luid);
+NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_LUID *luid, struct lsa_StringLarge *name);
+NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String *name, struct lsa_StringLarge *disp_name, uint16_t *language_id, uint16_t unknown);
+NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String *name, struct lsa_SidArray *sids);
+NTSTATUS rpccli_lsa_EnumAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, struct lsa_RightSet *rights);
+NTSTATUS rpccli_lsa_AddAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, struct lsa_RightSet *rights);
+NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *sid, uint32_t unknown, struct lsa_RightSet *rights);
+NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *dom_sid, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info);
+NTSTATUS rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct dom_sid2 *dom_sid);
+NTSTATUS rpccli_lsa_StorePrivateData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_OpenPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name, struct lsa_ObjectAttribute *attr, uint32_t access_mask, struct policy_handle *handle);
+NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name, struct lsa_String *account_name, struct lsa_StringPointer *authority_name);
+NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint16_t level, union lsa_PolicyInformation *info);
+NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String trusted_domain, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info);
+NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String trusted_domain, enum lsa_TrustDomInfoEnum level, union lsa_TrustedDomainInfo *info);
+NTSTATUS rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *resume_handle, struct lsa_DomainListEx *domains, uint32_t max_size);
+NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_CloseTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle);
+NTSTATUS rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint16_t level, union lsa_DomainInformationPolicy *info);
+NTSTATUS rpccli_lsa_SetDomainInformationPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint16_t level, union lsa_DomainInformationPolicy *info);
+NTSTATUS rpccli_lsa_OpenTrustedDomainByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_String name, uint32_t access_mask, struct policy_handle *trustdom_handle);
+NTSTATUS rpccli_lsa_TestCall(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct lsa_SidArray *sids, struct lsa_RefDomainList *domains, struct lsa_TransNameArray2 *names, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2);
+NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray2 *sids, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2);
+NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_CREDRWRITE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_CREDRREAD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_CREDRENUMERATE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_CREDRREADDOMAINCREDENTIALS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_CREDRDELETE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_CREDRGETTARGETINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_CREDRPROFILELOADED(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t num_names, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray3 *sids, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2);
+NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_LSARGENAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_SidArray *sids, struct lsa_RefDomainList *domains, struct lsa_TransNameArray2 *names, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2);
+NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_names, struct lsa_String *names, struct lsa_RefDomainList *domains, struct lsa_TransSidArray3 *sids, uint16_t level, uint32_t *count, uint32_t unknown1, uint32_t unknown2);
+NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+NTSTATUS rpccli_lsa_LSARADTREPORTSECURITYEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx);
+#endif /* __CLI_LSARPC__ */
diff --git a/source/librpc/gen_ndr/lsa.h b/source/librpc/gen_ndr/lsa.h
new file mode 100644 (file)
index 0000000..50fb1fa
--- /dev/null
@@ -0,0 +1,1409 @@
+/* header auto-generated by pidl */
+
+#ifndef _HEADER_lsarpc
+#define _HEADER_lsarpc
+
+#include "librpc/gen_ndr/security.h"
+#define LSA_ENUM_TRUST_DOMAIN_MULTIPLIER       ( 60 )
+#define LSA_REF_DOMAIN_LIST_MULTIPLIER ( 32 )
+#define LSA_ENUM_TRUST_DOMAIN_EX_MULTIPLIER    ( 82 )
+struct lsa_String {
+       uint16_t length;/* [keepref,value(2*strlen_m(string))] */
+       uint16_t size;/* [keepref,value(2*strlen_m(string))] */
+       const char *string;/* [unique,keepref,charset(UTF16),length_is(length/2),size_is(size/2)] */
+}/* [public,noejs] */;
+
+struct lsa_StringLarge {
+       uint16_t length;/* [keepref,value(2*strlen_m(string))] */
+       uint16_t size;/* [keepref,value(2*(strlen_m(string)+1))] */
+       const char *string;/* [unique,keepref,charset(UTF16),length_is(length/2),size_is(size/2)] */
+}/* [public] */;
+
+struct lsa_Strings {
+       uint32_t count;/* [keepref] */
+       struct lsa_String *names;/* [unique,keepref,size_is(count)] */
+}/* [public] */;
+
+struct lsa_AsciiString {
+       uint16_t length;/* [keepref,value(strlen_m(string))] */
+       uint16_t size;/* [keepref,value(strlen_m(string))] */
+       const char * string;/* [unique,keepref,flag(LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4)] */
+}/* [public] */;
+
+struct lsa_LUID {
+       uint32_t low;/* [keepref] */
+       uint32_t high;/* [keepref] */
+};
+
+struct lsa_PrivEntry {
+       struct lsa_StringLarge name;/* [keepref] */
+       struct lsa_LUID luid;/* [keepref] */
+};
+
+struct lsa_PrivArray {
+       uint32_t count;/* [keepref] */
+       struct lsa_PrivEntry *privs;/* [unique,keepref,size_is(count)] */
+};
+
+struct lsa_QosInfo {
+       uint32_t len;/* [keepref] */
+       uint16_t impersonation_level;/* [keepref] */
+       uint8_t context_mode;/* [keepref] */
+       uint8_t effective_only;/* [keepref] */
+};
+
+struct lsa_ObjectAttribute {
+       uint32_t len;/* [keepref] */
+       uint8_t *root_dir;/* [unique,keepref] */
+       const char *object_name;/* [unique,keepref,charset(UTF16)] */
+       uint32_t attributes;/* [keepref] */
+       struct security_descriptor *sec_desc;/* [unique,keepref] */
+       struct lsa_QosInfo *sec_qos;/* [unique,keepref] */
+};
+
+struct lsa_AuditLogInfo {
+       uint32_t percent_full;/* [keepref] */
+       uint32_t log_size;/* [keepref] */
+       NTTIME retention_time;/* [keepref] */
+       uint8_t shutdown_in_progress;/* [keepref] */
+       NTTIME time_to_shutdown;/* [keepref] */
+       uint32_t next_audit_record;/* [keepref] */
+       uint32_t unknown;/* [keepref] */
+};
+
+struct lsa_AuditEventsInfo {
+       uint32_t auditing_mode;/* [keepref] */
+       uint32_t *settings;/* [unique,keepref,size_is(count)] */
+       uint32_t count;/* [keepref] */
+};
+
+struct lsa_DomainInfo {
+       struct lsa_StringLarge name;/* [keepref] */
+       struct dom_sid2 *sid;/* [unique,keepref] */
+};
+
+struct lsa_PDAccountInfo {
+       struct lsa_String name;/* [keepref] */
+};
+
+struct lsa_ServerRole {
+       uint16_t unknown;/* [keepref] */
+       uint16_t role;/* [keepref] */
+};
+
+struct lsa_ReplicaSourceInfo {
+       struct lsa_String source;/* [keepref] */
+       struct lsa_String account;/* [keepref] */
+};
+
+struct lsa_DefaultQuotaInfo {
+       uint32_t paged_pool;/* [keepref] */
+       uint32_t non_paged_pool;/* [keepref] */
+       uint32_t min_wss;/* [keepref] */
+       uint32_t max_wss;/* [keepref] */
+       uint32_t pagefile;/* [keepref] */
+       uint64_t unknown;/* [keepref] */
+};
+
+struct lsa_ModificationInfo {
+       uint64_t modified_id;/* [keepref] */
+       NTTIME db_create_time;/* [keepref] */
+};
+
+struct lsa_AuditFullSetInfo {
+       uint8_t shutdown_on_full;/* [keepref] */
+};
+
+struct lsa_AuditFullQueryInfo {
+       uint16_t unknown;/* [keepref] */
+       uint8_t shutdown_on_full;/* [keepref] */
+       uint8_t log_is_full;/* [keepref] */
+};
+
+struct lsa_DnsDomainInfo {
+       struct lsa_StringLarge name;/* [keepref] */
+       struct lsa_StringLarge dns_domain;/* [keepref] */
+       struct lsa_StringLarge dns_forest;/* [keepref] */
+       struct GUID domain_guid;/* [keepref] */
+       struct dom_sid2 *sid;/* [unique,keepref] */
+};
+
+enum lsaPolicyInfo {
+       LSA_POLICY_INFO_AUDIT_LOG=1,
+       LSA_POLICY_INFO_AUDIT_EVENTS=2,
+       LSA_POLICY_INFO_DOMAIN=3,
+       LSA_POLICY_INFO_PD=4,
+       LSA_POLICY_INFO_ACCOUNT_DOMAIN=5,
+       LSA_POLICY_INFO_ROLE=6,
+       LSA_POLICY_INFO_REPLICA=7,
+       LSA_POLICY_INFO_QUOTA=8,
+       LSA_POLICY_INFO_DB=9,
+       LSA_POLICY_INFO_AUDIT_FULL_SET=10,
+       LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
+       LSA_POLICY_INFO_DNS=12
+};
+
+union lsa_PolicyInformation {
+       struct lsa_AuditLogInfo audit_log;/* [keepref,case(LSA_POLICY_INFO_AUDIT_LOG)] */
+       struct lsa_AuditEventsInfo audit_events;/* [keepref,case(LSA_POLICY_INFO_AUDIT_EVENTS)] */
+       struct lsa_DomainInfo domain;/* [keepref,case(LSA_POLICY_INFO_DOMAIN)] */
+       struct lsa_PDAccountInfo pd;/* [keepref,case(LSA_POLICY_INFO_PD)] */
+       struct lsa_DomainInfo account_domain;/* [keepref,case(LSA_POLICY_INFO_ACCOUNT_DOMAIN)] */
+       struct lsa_ServerRole role;/* [keepref,case(LSA_POLICY_INFO_ROLE)] */
+       struct lsa_ReplicaSourceInfo replica;/* [keepref,case(LSA_POLICY_INFO_REPLICA)] */
+       struct lsa_DefaultQuotaInfo quota;/* [keepref,case(LSA_POLICY_INFO_QUOTA)] */
+       struct lsa_ModificationInfo db;/* [keepref,case(LSA_POLICY_INFO_DB)] */
+       struct lsa_AuditFullSetInfo auditfullset;/* [keepref,case(LSA_POLICY_INFO_AUDIT_FULL_SET)] */
+       struct lsa_AuditFullQueryInfo auditfullquery;/* [keepref,case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] */
+       struct lsa_DnsDomainInfo dns;/* [keepref,case(LSA_POLICY_INFO_DNS)] */
+}/* [switch_type(uint16)] */;
+
+struct lsa_SidPtr {
+       struct dom_sid2 *sid;/* [unique,keepref] */
+};
+
+struct lsa_SidArray {
+       uint32_t num_sids;/* [keepref,range(0 1000)] */
+       struct lsa_SidPtr *sids;/* [unique,keepref,size_is(num_sids)] */
+}/* [public] */;
+
+struct lsa_DomainList {
+       uint32_t count;/* [keepref] */
+       struct lsa_DomainInfo *domains;/* [unique,keepref,size_is(count)] */
+};
+
+enum lsa_SidType {
+       SID_NAME_USE_NONE=0,
+       SID_NAME_USER=1,
+       SID_NAME_DOM_GRP=2,
+       SID_NAME_DOMAIN=3,
+       SID_NAME_ALIAS=4,
+       SID_NAME_WKN_GRP=5,
+       SID_NAME_DELETED=6,
+       SID_NAME_INVALID=7,
+       SID_NAME_UNKNOWN=8,
+       SID_NAME_COMPUTER=9
+};
+
+struct lsa_TranslatedSid {
+       enum lsa_SidType sid_type;/* [keepref] */
+       uint32_t rid;/* [keepref] */
+       uint32_t sid_index;/* [keepref] */
+};
+
+struct lsa_TransSidArray {
+       uint32_t count;/* [keepref,range(0 1000)] */
+       struct lsa_TranslatedSid *sids;/* [unique,keepref,size_is(count)] */
+};
+
+struct lsa_RefDomainList {
+       uint32_t count;/* [keepref,range(0 1000)] */
+       struct lsa_DomainInfo *domains;/* [unique,keepref,size_is(count)] */
+       uint32_t max_size;/* [keepref] */
+};
+
+struct lsa_TranslatedName {
+       enum lsa_SidType sid_type;/* [keepref] */
+       struct lsa_String name;/* [keepref] */
+       uint32_t sid_index;/* [keepref] */
+};
+
+struct lsa_TransNameArray {
+       uint32_t count;/* [keepref,range(0 1000)] */
+       struct lsa_TranslatedName *names;/* [unique,keepref,size_is(count)] */
+};
+
+struct lsa_LUIDAttribute {
+       struct lsa_LUID luid;/* [keepref] */
+       uint32_t attribute;/* [keepref] */
+};
+
+struct lsa_PrivilegeSet {
+       uint32_t count;/* [keepref,range(0 1000)] */
+       uint32_t unknown;/* [keepref] */
+       struct lsa_LUIDAttribute *set;/* [keepref,size_is(count)] */
+};
+
+struct lsa_DATA_BUF {
+       uint32_t length;/* [keepref] */
+       uint32_t size;/* [keepref] */
+       uint8_t *data;/* [unique,keepref,length_is(length),size_is(size)] */
+}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+struct lsa_DATA_BUF2 {
+       uint32_t size;/* [keepref,range(0 65536)] */
+       uint8_t *data;/* [unique,keepref,size_is(size)] */
+}/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */;
+
+enum lsa_TrustDomInfoEnum {
+       LSA_TRUSTED_DOMAIN_INFO_NAME=1,
+       LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO=2,
+       LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET=3,
+       LSA_TRUSTED_DOMAIN_INFO_PASSWORD=4,
+       LSA_TRUSTED_DOMAIN_INFO_BASIC=5,
+       LSA_TRUSTED_DOMAIN_INFO_INFO_EX=6,
+       LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO=7,
+       LSA_TRUSTED_DOMAIN_INFO_FULL_INFO=8,
+       LSA_TRUSTED_DOMAIN_INFO_11=11,
+       LSA_TRUSTED_DOMAIN_INFO_INFO_ALL=12
+};
+
+struct lsa_TrustDomainInfoName {
+       struct lsa_StringLarge netbios_name;/* [keepref] */
+};
+
+struct lsa_TrustDomainInfoPosixOffset {
+       uint32_t posix_offset;/* [keepref] */
+};
+
+struct lsa_TrustDomainInfoPassword {
+       struct lsa_DATA_BUF *password;/* [unique,keepref] */
+       struct lsa_DATA_BUF *old_password;/* [unique,keepref] */
+};
+
+struct lsa_TrustDomainInfoBasic {
+       struct lsa_String netbios_name;/* [keepref] */
+       struct dom_sid2 *sid;/* [unique,keepref] */
+};
+
+struct lsa_TrustDomainInfoInfoEx {
+       struct lsa_StringLarge domain_name;/* [keepref] */
+       struct lsa_StringLarge netbios_name;/* [keepref] */
+       struct dom_sid2 *sid;/* [unique,keepref] */
+       uint32_t trust_direction;/* [keepref] */
+       uint32_t trust_type;/* [keepref] */
+       uint32_t trust_attributes;/* [keepref] */
+};
+
+struct lsa_TrustDomainInfoBuffer {
+       NTTIME last_update_time;/* [keepref] */
+       uint32_t secret_type;/* [keepref] */
+       struct lsa_DATA_BUF2 data;/* [keepref] */
+};
+
+struct lsa_TrustDomainInfoAuthInfo {
+       uint32_t incoming_count;/* [keepref] */
+       struct lsa_TrustDomainInfoBuffer *incoming_current_auth_info;/* [unique,keepref] */
+       struct lsa_TrustDomainInfoBuffer *incoming_previous_auth_info;/* [unique,keepref] */
+       uint32_t outgoing_count;/* [keepref] */
+       struct lsa_TrustDomainInfoBuffer *outgoing_current_auth_info;/* [unique,keepref] */
+       struct lsa_TrustDomainInfoBuffer *outgoing_previous_auth_info;/* [unique,keepref] */
+};
+
+struct lsa_TrustDomainInfoFullInfo {
+       struct lsa_TrustDomainInfoInfoEx info_ex;/* [keepref] */
+       struct lsa_TrustDomainInfoPosixOffset posix_offset;/* [keepref] */
+       struct lsa_TrustDomainInfoAuthInfo auth_info;/* [keepref] */
+};
+
+struct lsa_TrustDomainInfo11 {
+       struct lsa_TrustDomainInfoInfoEx info_ex;/* [keepref] */
+       struct lsa_DATA_BUF2 data1;/* [keepref] */
+};
+
+struct lsa_TrustDomainInfoInfoAll {
+       struct lsa_TrustDomainInfoInfoEx info_ex;/* [keepref] */
+       struct lsa_DATA_BUF2 data1;/* [keepref] */
+       struct lsa_TrustDomainInfoPosixOffset posix_offset;/* [keepref] */
+       struct lsa_TrustDomainInfoAuthInfo auth_info;/* [keepref] */
+};
+
+union lsa_TrustedDomainInfo {
+       struct lsa_TrustDomainInfoName name;/* [keepref,case(LSA_TRUSTED_DOMAIN_INFO_NAME)] */
+       struct lsa_TrustDomainInfoPosixOffset posix_offset;/* [keepref,case(LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET)] */
+       struct lsa_TrustDomainInfoPassword password;/* [keepref,case(LSA_TRUSTED_DOMAIN_INFO_PASSWORD)] */
+       struct lsa_TrustDomainInfoBasic info_basic;/* [keepref,case(LSA_TRUSTED_DOMAIN_INFO_BASIC)] */
+       struct lsa_TrustDomainInfoInfoEx info_ex;/* [keepref,case(LSA_TRUSTED_DOMAIN_INFO_INFO_EX)] */
+       struct lsa_TrustDomainInfoAuthInfo auth_info;/* [keepref,case(LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO)] */
+       struct lsa_TrustDomainInfoFullInfo full_info;/* [keepref,case(LSA_TRUSTED_DOMAIN_INFO_FULL_INFO)] */
+       struct lsa_TrustDomainInfo11 info11;/* [keepref,case(LSA_TRUSTED_DOMAIN_INFO_11)] */
+       struct lsa_TrustDomainInfoInfoAll info_all;/* [keepref,case(LSA_TRUSTED_DOMAIN_INFO_INFO_ALL)] */
+}/* [switch_type(lsa_TrustDomInfoEnum)] */;
+
+struct lsa_DATA_BUF_PTR {
+       struct lsa_DATA_BUF *buf;/* [unique,keepref] */
+};
+
+struct lsa_RightAttribute {
+       const char *name;/* [unique,keepref,charset(UTF16)] */
+};
+
+struct lsa_RightSet {
+       uint32_t count;/* [keepref] */
+       struct lsa_StringLarge *names;/* [unique,keepref,size_is(count)] */
+};
+
+struct lsa_StringPointer {
+       struct lsa_String *string;/* [unique,keepref] */
+};
+
+struct lsa_DomainListEx {
+       uint32_t count;/* [keepref] */
+       struct lsa_TrustDomainInfoInfoEx *domains;/* [unique,keepref,size_is(count)] */
+};
+
+struct lsa_DomainInfoKerberos {
+       uint32_t enforce_restrictions;/* [keepref] */
+       uint64_t service_tkt_lifetime;/* [keepref] */
+       uint64_t user_tkt_lifetime;/* [keepref] */
+       uint64_t user_tkt_renewaltime;/* [keepref] */
+       uint64_t clock_skew;/* [keepref] */
+       uint64_t unknown6;/* [keepref] */
+};
+
+struct lsa_DomainInfoEfs {
+       uint32_t blob_size;/* [keepref] */
+       uint8_t *efs_blob;/* [unique,keepref,size_is(blob_size)] */
+};
+
+enum lsa_DomainInfoEnum {
+       LSA_DOMAIN_INFO_POLICY_EFS=2,
+       LSA_DOMAIN_INFO_POLICY_KERBEROS=3
+};
+
+union lsa_DomainInformationPolicy {
+       struct lsa_DomainInfoEfs efs_info;/* [keepref,case(LSA_DOMAIN_INFO_POLICY_EFS)] */
+       struct lsa_DomainInfoKerberos kerberos_info;/* [keepref,case(LSA_DOMAIN_INFO_POLICY_KERBEROS)] */
+}/* [switch_type(uint16)] */;
+
+struct lsa_TranslatedName2 {
+       enum lsa_SidType sid_type;/* [keepref] */
+       struct lsa_String name;/* [keepref] */
+       uint32_t sid_index;/* [keepref] */
+       uint32_t unknown;/* [keepref] */
+};
+
+struct lsa_TransNameArray2 {
+       uint32_t count;/* [keepref,range(0 1000)] */
+       struct lsa_TranslatedName2 *names;/* [unique,keepref,size_is(count)] */
+};
+
+struct lsa_TranslatedSid2 {
+       enum lsa_SidType sid_type;/* [keepref] */
+       uint32_t rid;/* [keepref] */
+       uint32_t sid_index;/* [keepref] */
+       uint32_t unknown;/* [keepref] */
+};
+
+struct lsa_TransSidArray2 {
+       uint32_t count;/* [keepref,range(0 1000)] */
+       struct lsa_TranslatedSid2 *sids;/* [unique,keepref,size_is(count)] */
+};
+
+struct lsa_TranslatedSid3 {
+       enum lsa_SidType sid_type;/* [keepref] */
+       struct dom_sid2 *sid;/* [unique,keepref] */
+       uint32_t sid_index;/* [keepref] */
+       uint32_t unknown;/* [keepref] */
+};
+
+struct lsa_TransSidArray3 {
+       uint32_t count;/* [keepref,range(0 1000)] */
+       struct lsa_TranslatedSid3 *sids;/* [unique,keepref,size_is(count)] */
+};
+
+
+struct lsa_Close {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+       } in;
+
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_Delete {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+       } in;
+
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_EnumPrivs {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint32_t *resume_handle;/* [keepref,ref] */
+               uint32_t max_count;/* [keepref] */
+       } in;
+
+       struct {
+               uint32_t *resume_handle;/* [keepref,ref] */
+               struct lsa_PrivArray *privs;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_QuerySecurity {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint32_t sec_info;/* [keepref] */
+       } in;
+
+       struct {
+               struct sec_desc_buf *sdbuf;/* [unique,keepref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_SetSecObj {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_ChangePassword {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_OpenPolicy {
+       struct {
+               uint16_t *system_name;/* [unique,keepref] */
+               struct lsa_ObjectAttribute *attr;/* [keepref,ref] */
+               uint32_t access_mask;/* [keepref] */
+       } in;
+
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_QueryInfoPolicy {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint16_t level;/* [keepref] */
+       } in;
+
+       struct {
+               union lsa_PolicyInformation *info;/* [unique,keepref,switch_is(level)] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_SetInfoPolicy {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_ClearAuditLog {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CreateAccount {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct dom_sid2 *sid;/* [keepref,ref] */
+               uint32_t access_mask;/* [keepref] */
+       } in;
+
+       struct {
+               struct policy_handle *acct_handle;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_EnumAccounts {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint32_t *resume_handle;/* [keepref,ref] */
+               uint32_t num_entries;/* [keepref,range(0 8192)] */
+       } in;
+
+       struct {
+               uint32_t *resume_handle;/* [keepref,ref] */
+               struct lsa_SidArray *sids;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CreateTrustedDomain {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_DomainInfo *info;/* [keepref,ref] */
+               uint32_t access_mask;/* [keepref] */
+       } in;
+
+       struct {
+               struct policy_handle *trustdom_handle;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_EnumTrustDom {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint32_t *resume_handle;/* [keepref,ref] */
+               uint32_t max_size;/* [keepref,range(0 1000)] */
+       } in;
+
+       struct {
+               uint32_t *resume_handle;/* [keepref,ref] */
+               struct lsa_DomainList *domains;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LookupNames {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint32_t num_names;/* [keepref,range(0 1000)] */
+               struct lsa_String *names;/* [keepref,size_is(num_names)] */
+               struct lsa_TransSidArray *sids;/* [keepref,ref] */
+               uint16_t level;/* [keepref] */
+               uint32_t *count;/* [keepref,ref] */
+       } in;
+
+       struct {
+               struct lsa_RefDomainList *domains;/* [unique,keepref] */
+               struct lsa_TransSidArray *sids;/* [keepref,ref] */
+               uint32_t *count;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LookupSids {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_SidArray *sids;/* [keepref,ref] */
+               struct lsa_TransNameArray *names;/* [keepref,ref] */
+               uint16_t level;/* [keepref] */
+               uint32_t *count;/* [keepref,ref] */
+       } in;
+
+       struct {
+               struct lsa_RefDomainList *domains;/* [unique,keepref] */
+               struct lsa_TransNameArray *names;/* [keepref,ref] */
+               uint32_t *count;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CreateSecret {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_String name;/* [keepref] */
+               uint32_t access_mask;/* [keepref] */
+       } in;
+
+       struct {
+               struct policy_handle *sec_handle;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_OpenAccount {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct dom_sid2 *sid;/* [keepref,ref] */
+               uint32_t access_mask;/* [keepref] */
+       } in;
+
+       struct {
+               struct policy_handle *acct_handle;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_EnumPrivsAccount {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+       } in;
+
+       struct {
+               struct lsa_PrivilegeSet *privs;/* [unique,keepref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_AddPrivilegesToAccount {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_PrivilegeSet *privs;/* [keepref,ref] */
+       } in;
+
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_RemovePrivilegesFromAccount {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint8_t remove_all;/* [keepref] */
+               struct lsa_PrivilegeSet *privs;/* [unique,keepref] */
+       } in;
+
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_GetQuotasForAccount {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_SetQuotasForAccount {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_GetSystemAccessAccount {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_SetSystemAccessAccount {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_OpenTrustedDomain {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct dom_sid2 *sid;/* [keepref,ref] */
+               uint32_t access_mask;/* [keepref] */
+       } in;
+
+       struct {
+               struct policy_handle *trustdom_handle;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_QueryTrustedDomainInfo {
+       struct {
+               struct policy_handle *trustdom_handle;/* [keepref,ref] */
+               enum lsa_TrustDomInfoEnum level;/* [keepref] */
+       } in;
+
+       struct {
+               union lsa_TrustedDomainInfo *info;/* [unique,keepref,switch_is(level)] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_SetInformationTrustedDomain {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_OpenSecret {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_String name;/* [keepref] */
+               uint32_t access_mask;/* [keepref] */
+       } in;
+
+       struct {
+               struct policy_handle *sec_handle;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_SetSecret {
+       struct {
+               struct policy_handle *sec_handle;/* [keepref,ref] */
+               struct lsa_DATA_BUF *new_val;/* [unique,keepref] */
+               struct lsa_DATA_BUF *old_val;/* [unique,keepref] */
+       } in;
+
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_QuerySecret {
+       struct {
+               struct policy_handle *sec_handle;/* [keepref,ref] */
+               struct lsa_DATA_BUF_PTR *new_val;/* [unique,keepref] */
+               NTTIME *new_mtime;/* [unique,keepref] */
+               struct lsa_DATA_BUF_PTR *old_val;/* [unique,keepref] */
+               NTTIME *old_mtime;/* [unique,keepref] */
+       } in;
+
+       struct {
+               struct lsa_DATA_BUF_PTR *new_val;/* [unique,keepref] */
+               NTTIME *new_mtime;/* [unique,keepref] */
+               struct lsa_DATA_BUF_PTR *old_val;/* [unique,keepref] */
+               NTTIME *old_mtime;/* [unique,keepref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LookupPrivValue {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_String *name;/* [keepref,ref] */
+       } in;
+
+       struct {
+               struct lsa_LUID *luid;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LookupPrivName {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_LUID *luid;/* [keepref,ref] */
+       } in;
+
+       struct {
+               struct lsa_StringLarge *name;/* [unique,keepref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LookupPrivDisplayName {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_String *name;/* [keepref,ref] */
+               uint16_t *language_id;/* [keepref,ref] */
+               uint16_t unknown;/* [keepref] */
+       } in;
+
+       struct {
+               struct lsa_StringLarge *disp_name;/* [unique,keepref] */
+               uint16_t *language_id;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_DeleteObject {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_EnumAccountsWithUserRight {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_String *name;/* [unique,keepref] */
+       } in;
+
+       struct {
+               struct lsa_SidArray *sids;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_EnumAccountRights {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct dom_sid2 *sid;/* [keepref,ref] */
+       } in;
+
+       struct {
+               struct lsa_RightSet *rights;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_AddAccountRights {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct dom_sid2 *sid;/* [keepref,ref] */
+               struct lsa_RightSet *rights;/* [keepref,ref] */
+       } in;
+
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_RemoveAccountRights {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct dom_sid2 *sid;/* [keepref,ref] */
+               uint32_t unknown;/* [keepref] */
+               struct lsa_RightSet *rights;/* [keepref,ref] */
+       } in;
+
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_QueryTrustedDomainInfoBySid {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct dom_sid2 *dom_sid;/* [keepref,ref] */
+               enum lsa_TrustDomInfoEnum level;/* [keepref] */
+       } in;
+
+       struct {
+               union lsa_TrustedDomainInfo *info;/* [unique,keepref,switch_is(level)] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_SetTrustedDomainInfo {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_DeleteTrustedDomain {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct dom_sid2 *dom_sid;/* [keepref,ref] */
+       } in;
+
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_StorePrivateData {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_RetrievePrivateData {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_OpenPolicy2 {
+       struct {
+               const char *system_name;/* [unique,keepref,charset(UTF16)] */
+               struct lsa_ObjectAttribute *attr;/* [keepref,ref] */
+               uint32_t access_mask;/* [keepref] */
+       } in;
+
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_GetUserName {
+       struct {
+               const char *system_name;/* [unique,keepref,charset(UTF16)] */
+               struct lsa_String *account_name;/* [unique,keepref] */
+               struct lsa_StringPointer *authority_name;/* [unique,keepref] */
+       } in;
+
+       struct {
+               struct lsa_String *account_name;/* [unique,keepref] */
+               struct lsa_StringPointer *authority_name;/* [unique,keepref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_QueryInfoPolicy2 {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint16_t level;/* [keepref] */
+       } in;
+
+       struct {
+               union lsa_PolicyInformation *info;/* [unique,keepref,switch_is(level)] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_SetInfoPolicy2 {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_QueryTrustedDomainInfoByName {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_String trusted_domain;/* [keepref] */
+               enum lsa_TrustDomInfoEnum level;/* [keepref] */
+       } in;
+
+       struct {
+               union lsa_TrustedDomainInfo *info;/* [unique,keepref,switch_is(level)] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_SetTrustedDomainInfoByName {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_String trusted_domain;/* [keepref] */
+               enum lsa_TrustDomInfoEnum level;/* [keepref] */
+               union lsa_TrustedDomainInfo *info;/* [unique,keepref,switch_is(level)] */
+       } in;
+
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_EnumTrustedDomainsEx {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint32_t *resume_handle;/* [keepref,ref] */
+               uint32_t max_size;/* [keepref] */
+       } in;
+
+       struct {
+               uint32_t *resume_handle;/* [keepref,ref] */
+               struct lsa_DomainListEx *domains;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CreateTrustedDomainEx {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CloseTrustedDomainEx {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+       } in;
+
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_QueryDomainInformationPolicy {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint16_t level;/* [keepref] */
+       } in;
+
+       struct {
+               union lsa_DomainInformationPolicy *info;/* [unique,keepref,switch_is(level)] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_SetDomainInformationPolicy {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint16_t level;/* [keepref] */
+               union lsa_DomainInformationPolicy *info;/* [unique,keepref,switch_is(level)] */
+       } in;
+
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_OpenTrustedDomainByName {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_String name;/* [keepref] */
+               uint32_t access_mask;/* [keepref] */
+       } in;
+
+       struct {
+               struct policy_handle *trustdom_handle;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_TestCall {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LookupSids2 {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               struct lsa_SidArray *sids;/* [keepref,ref] */
+               struct lsa_TransNameArray2 *names;/* [keepref,ref] */
+               uint16_t level;/* [keepref] */
+               uint32_t *count;/* [keepref,ref] */
+               uint32_t unknown1;/* [keepref] */
+               uint32_t unknown2;/* [keepref] */
+       } in;
+
+       struct {
+               struct lsa_RefDomainList *domains;/* [unique,keepref] */
+               struct lsa_TransNameArray2 *names;/* [keepref,ref] */
+               uint32_t *count;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LookupNames2 {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint32_t num_names;/* [keepref,range(0 1000)] */
+               struct lsa_String *names;/* [keepref,size_is(num_names)] */
+               struct lsa_TransSidArray2 *sids;/* [keepref,ref] */
+               uint16_t level;/* [keepref] */
+               uint32_t *count;/* [keepref,ref] */
+               uint32_t unknown1;/* [keepref] */
+               uint32_t unknown2;/* [keepref] */
+       } in;
+
+       struct {
+               struct lsa_RefDomainList *domains;/* [unique,keepref] */
+               struct lsa_TransSidArray2 *sids;/* [keepref,ref] */
+               uint32_t *count;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CreateTrustedDomainEx2 {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CREDRWRITE {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CREDRREAD {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CREDRENUMERATE {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CREDRWRITEDOMAINCREDENTIALS {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CREDRREADDOMAINCREDENTIALS {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CREDRDELETE {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CREDRGETTARGETINFO {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CREDRPROFILELOADED {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LookupNames3 {
+       struct {
+               struct policy_handle *handle;/* [keepref,ref] */
+               uint32_t num_names;/* [keepref,range(0 1000)] */
+               struct lsa_String *names;/* [keepref,size_is(num_names)] */
+               struct lsa_TransSidArray3 *sids;/* [keepref,ref] */
+               uint16_t level;/* [keepref] */
+               uint32_t *count;/* [keepref,ref] */
+               uint32_t unknown1;/* [keepref] */
+               uint32_t unknown2;/* [keepref] */
+       } in;
+
+       struct {
+               struct lsa_RefDomainList *domains;/* [unique,keepref] */
+               struct lsa_TransSidArray3 *sids;/* [keepref,ref] */
+               uint32_t *count;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CREDRGETSESSIONTYPES {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LSARREGISTERAUDITEVENT {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LSARGENAUDITEVENT {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LSARUNREGISTERAUDITEVENT {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LSARQUERYFORESTTRUSTINFORMATION {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LSARSETFORESTTRUSTINFORMATION {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_CREDRRENAME {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LookupSids3 {
+       struct {
+               struct lsa_SidArray *sids;/* [keepref,ref] */
+               struct lsa_TransNameArray2 *names;/* [keepref,ref] */
+               uint16_t level;/* [keepref] */
+               uint32_t *count;/* [keepref,ref] */
+               uint32_t unknown1;/* [keepref] */
+               uint32_t unknown2;/* [keepref] */
+       } in;
+
+       struct {
+               struct lsa_RefDomainList *domains;/* [unique,keepref] */
+               struct lsa_TransNameArray2 *names;/* [keepref,ref] */
+               uint32_t *count;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LookupNames4 {
+       struct {
+               uint32_t num_names;/* [keepref,range(0 1000)] */
+               struct lsa_String *names;/* [keepref,size_is(num_names)] */
+               struct lsa_TransSidArray3 *sids;/* [keepref,ref] */
+               uint16_t level;/* [keepref] */
+               uint32_t *count;/* [keepref,ref] */
+               uint32_t unknown1;/* [keepref] */
+               uint32_t unknown2;/* [keepref] */
+       } in;
+
+       struct {
+               struct lsa_RefDomainList *domains;/* [unique,keepref] */
+               struct lsa_TransSidArray3 *sids;/* [keepref,ref] */
+               uint32_t *count;/* [keepref,ref] */
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LSAROPENPOLICYSCE {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+
+struct lsa_LSARADTREPORTSECURITYEVENT {
+       struct {
+               NTSTATUS result;
+       } out;
+
+};
+
+#endif /* _HEADER_lsarpc */
diff --git a/source/librpc/gen_ndr/ndr_lsa.c b/source/librpc/gen_ndr/ndr_lsa.c
new file mode 100644 (file)
index 0000000..f780b67
--- /dev/null
@@ -0,0 +1,11074 @@
+/* parser auto-generated by pidl */
+
+#include "includes.h"
+#include "librpc/gen_ndr/ndr_lsa.h"
+
+#include "librpc/gen_ndr/ndr_security.h"
+_PUBLIC_ NTSTATUS ndr_push_lsa_String(struct ndr_push *ndr, int ndr_flags, const struct lsa_String *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2*strlen_m(r->string)));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2*strlen_m(r->string)));
+               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, 2*strlen_m(r->string)/2));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2*strlen_m(r->string)/2));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2*strlen_m(r->string)/2, sizeof(uint16_t), CH_UTF16));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_lsa_String(struct ndr_pull *ndr, int ndr_flags, struct lsa_String *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->length));
+               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_array_length(ndr, &r->string));
+                       if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
+                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
+                       }
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(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/2));
+               }
+               if (r->string) {
+                       NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length/2));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_String(struct ndr_print *ndr, const char *name, const struct lsa_String *r)
+{
+       ndr_print_struct(ndr, name, "lsa_String");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2*strlen_m(r->string):r->length);
+       ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2*strlen_m(r->string):r->size);
+       ndr_print_ptr(ndr, "string", r->string);
+       ndr->depth++;
+       if (r->string) {
+               ndr_print_string(ndr, "string", r->string);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+_PUBLIC_ NTSTATUS ndr_push_lsa_StringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringLarge *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2*strlen_m(r->string)));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 2*(strlen_m(r->string)+1)));
+               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, 2*(strlen_m(r->string)+1)/2));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2*strlen_m(r->string)/2));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, 2*strlen_m(r->string)/2, sizeof(uint16_t), CH_UTF16));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_lsa_StringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringLarge *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->length));
+               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_array_length(ndr, &r->string));
+                       if (ndr_get_array_length(ndr, &r->string) > ndr_get_array_size(ndr, &r->string)) {
+                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->string), ndr_get_array_length(ndr, &r->string));
+                       }
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_length(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/2));
+               }
+               if (r->string) {
+                       NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->string, r->length/2));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_StringLarge(struct ndr_print *ndr, const char *name, const struct lsa_StringLarge *r)
+{
+       ndr_print_struct(ndr, name, "lsa_StringLarge");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2*strlen_m(r->string):r->length);
+       ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2*(strlen_m(r->string)+1):r->size);
+       ndr_print_ptr(ndr, "string", r->string);
+       ndr->depth++;
+       if (r->string) {
+               ndr_print_string(ndr, "string", r->string);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+_PUBLIC_ NTSTATUS ndr_push_lsa_Strings(struct ndr_push *ndr, int ndr_flags, const struct lsa_Strings *r)
+{
+       uint32_t cntr_names_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->names) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
+                       }
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_lsa_Strings(struct ndr_pull *ndr, int ndr_flags, struct lsa_Strings *r)
+{
+       uint32_t _ptr_names;
+       uint32_t cntr_names_1;
+       TALLOC_CTX *_mem_save_names_0;
+       TALLOC_CTX *_mem_save_names_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
+               if (_ptr_names) {
+                       NDR_PULL_ALLOC(ndr, r->names);
+               } else {
+                       r->names = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->names) {
+                       _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
+                       NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
+                       _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
+                       }
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
+               }
+               if (r->names) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, const struct lsa_Strings *r)
+{
+       uint32_t cntr_names_1;
+       ndr_print_struct(ndr, name, "lsa_Strings");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr_print_ptr(ndr, "names", r->names);
+       ndr->depth++;
+       if (r->names) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "names", r->count);
+               ndr->depth++;
+               for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_names_1);
+                       if (idx_1) {
+                               ndr_print_lsa_String(ndr, "names", &r->names[cntr_names_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+_PUBLIC_ NTSTATUS ndr_push_lsa_AsciiString(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiString *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->string)));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4);
+                       NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4);
+                       if (r->string) {
+                               NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->string));
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiString *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->length));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4);
+                       NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
+                       if (_ptr_string) {
+                               NDR_PULL_ALLOC(ndr, r->string);
+                       } else {
+                               r->string = NULL;
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               {
+                       uint32_t _flags_save_string = ndr->flags;
+                       ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_LEN4);
+                       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_string(ndr, NDR_SCALARS, &r->string));
+                               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
+                       }
+                       ndr->flags = _flags_save_string;
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name, const struct lsa_AsciiString *r)
+{
+       ndr_print_struct(ndr, name, "lsa_AsciiString");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->length);
+       ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->string):r->size);
+       ndr_print_ptr(ndr, "string", r->string);
+       ndr->depth++;
+       if (r->string) {
+               ndr_print_string(ndr, "string", r->string);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LUID(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUID *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->low));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->high));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LUID(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUID *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->low));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->high));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, const struct lsa_LUID *r)
+{
+       ndr_print_struct(ndr, name, "lsa_LUID");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "low", r->low);
+       ndr_print_uint32(ndr, "high", r->high);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_PrivEntry(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivEntry *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
+               NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_PrivEntry(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivEntry *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
+               NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, const struct lsa_PrivEntry *r)
+{
+       ndr_print_struct(ndr, name, "lsa_PrivEntry");
+       ndr->depth++;
+       ndr_print_lsa_StringLarge(ndr, "name", &r->name);
+       ndr_print_lsa_LUID(ndr, "luid", &r->luid);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_PrivArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivArray *r)
+{
+       uint32_t cntr_privs_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->privs));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->privs) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+                       for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
+                               NDR_CHECK(ndr_push_lsa_PrivEntry(ndr, NDR_SCALARS, &r->privs[cntr_privs_1]));
+                       }
+                       for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
+                               NDR_CHECK(ndr_push_lsa_PrivEntry(ndr, NDR_BUFFERS, &r->privs[cntr_privs_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_PrivArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivArray *r)
+{
+       uint32_t _ptr_privs;
+       uint32_t cntr_privs_1;
+       TALLOC_CTX *_mem_save_privs_0;
+       TALLOC_CTX *_mem_save_privs_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
+               if (_ptr_privs) {
+                       NDR_PULL_ALLOC(ndr, r->privs);
+               } else {
+                       r->privs = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->privs) {
+                       _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->privs, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->privs));
+                       NDR_PULL_ALLOC_N(ndr, r->privs, ndr_get_array_size(ndr, &r->privs));
+                       _mem_save_privs_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->privs, 0);
+                       for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
+                               NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr, NDR_SCALARS, &r->privs[cntr_privs_1]));
+                       }
+                       for (cntr_privs_1 = 0; cntr_privs_1 < r->count; cntr_privs_1++) {
+                               NDR_CHECK(ndr_pull_lsa_PrivEntry(ndr, NDR_BUFFERS, &r->privs[cntr_privs_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
+               }
+               if (r->privs) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->privs, r->count));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const struct lsa_PrivArray *r)
+{
+       uint32_t cntr_privs_1;
+       ndr_print_struct(ndr, name, "lsa_PrivArray");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr_print_ptr(ndr, "privs", r->privs);
+       ndr->depth++;
+       if (r->privs) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "privs", r->count);
+               ndr->depth++;
+               for (cntr_privs_1=0;cntr_privs_1<r->count;cntr_privs_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_privs_1);
+                       if (idx_1) {
+                               ndr_print_lsa_PrivEntry(ndr, "privs", &r->privs[cntr_privs_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_QosInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->impersonation_level));
+               NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->context_mode));
+               NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->effective_only));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_QosInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_QosInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->impersonation_level));
+               NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->context_mode));
+               NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->effective_only));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, const struct lsa_QosInfo *r)
+{
+       ndr_print_struct(ndr, name, "lsa_QosInfo");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "len", r->len);
+       ndr_print_uint16(ndr, "impersonation_level", r->impersonation_level);
+       ndr_print_uint8(ndr, "context_mode", r->context_mode);
+       ndr_print_uint8(ndr, "effective_only", r->effective_only);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_ObjectAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_ObjectAttribute *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->root_dir));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->object_name));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attributes));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sec_desc));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sec_qos));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->root_dir) {
+                       NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->root_dir));
+               }
+               if (r->object_name) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->object_name, CH_UTF16)));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->object_name, CH_UTF16)));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->object_name, ndr_charset_length(r->object_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+               }
+               if (r->sec_desc) {
+                       NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_desc));
+               }
+               if (r->sec_qos) {
+                       NDR_CHECK(ndr_push_lsa_QosInfo(ndr, NDR_SCALARS, r->sec_qos));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_ObjectAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_ObjectAttribute *r)
+{
+       uint32_t _ptr_root_dir;
+       TALLOC_CTX *_mem_save_root_dir_0;
+       uint32_t _ptr_object_name;
+       TALLOC_CTX *_mem_save_object_name_0;
+       uint32_t _ptr_sec_desc;
+       TALLOC_CTX *_mem_save_sec_desc_0;
+       uint32_t _ptr_sec_qos;
+       TALLOC_CTX *_mem_save_sec_qos_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_root_dir));
+               if (_ptr_root_dir) {
+                       NDR_PULL_ALLOC(ndr, r->root_dir);
+               } else {
+                       r->root_dir = NULL;
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_object_name));
+               if (_ptr_object_name) {
+                       NDR_PULL_ALLOC(ndr, r->object_name);
+               } else {
+                       r->object_name = NULL;
+               }
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attributes));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_desc));
+               if (_ptr_sec_desc) {
+                       NDR_PULL_ALLOC(ndr, r->sec_desc);
+               } else {
+                       r->sec_desc = NULL;
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_qos));
+               if (_ptr_sec_qos) {
+                       NDR_PULL_ALLOC(ndr, r->sec_qos);
+               } else {
+                       r->sec_qos = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->root_dir) {
+                       _mem_save_root_dir_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->root_dir, 0);
+                       NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->root_dir));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_root_dir_0, 0);
+               }
+               if (r->object_name) {
+                       _mem_save_object_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->object_name, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->object_name));
+                       NDR_CHECK(ndr_pull_array_length(ndr, &r->object_name));
+                       if (ndr_get_array_length(ndr, &r->object_name) > ndr_get_array_size(ndr, &r->object_name)) {
+                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->object_name), ndr_get_array_length(ndr, &r->object_name));
+                       }
+                       NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->object_name), sizeof(uint16_t)));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->object_name, ndr_get_array_length(ndr, &r->object_name), sizeof(uint16_t), CH_UTF16));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_object_name_0, 0);
+               }
+               if (r->sec_desc) {
+                       _mem_save_sec_desc_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sec_desc, 0);
+                       NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->sec_desc));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_desc_0, 0);
+               }
+               if (r->sec_qos) {
+                       _mem_save_sec_qos_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sec_qos, 0);
+                       NDR_CHECK(ndr_pull_lsa_QosInfo(ndr, NDR_SCALARS, r->sec_qos));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_qos_0, 0);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, const struct lsa_ObjectAttribute *r)
+{
+       ndr_print_struct(ndr, name, "lsa_ObjectAttribute");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "len", r->len);
+       ndr_print_ptr(ndr, "root_dir", r->root_dir);
+       ndr->depth++;
+       if (r->root_dir) {
+               ndr_print_uint8(ndr, "root_dir", *r->root_dir);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "object_name", r->object_name);
+       ndr->depth++;
+       if (r->object_name) {
+               ndr_print_string(ndr, "object_name", r->object_name);
+       }
+       ndr->depth--;
+       ndr_print_uint32(ndr, "attributes", r->attributes);
+       ndr_print_ptr(ndr, "sec_desc", r->sec_desc);
+       ndr->depth++;
+       if (r->sec_desc) {
+               ndr_print_security_descriptor(ndr, "sec_desc", r->sec_desc);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "sec_qos", r->sec_qos);
+       ndr->depth++;
+       if (r->sec_qos) {
+               ndr_print_lsa_QosInfo(ndr, "sec_qos", r->sec_qos);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditLogInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->percent_full));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->log_size));
+               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->retention_time));
+               NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_in_progress));
+               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->time_to_shutdown));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->next_audit_record));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_AuditLogInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditLogInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->percent_full));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->log_size));
+               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->retention_time));
+               NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_in_progress));
+               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->time_to_shutdown));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->next_audit_record));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r)
+{
+       ndr_print_struct(ndr, name, "lsa_AuditLogInfo");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "percent_full", r->percent_full);
+       ndr_print_uint32(ndr, "log_size", r->log_size);
+       ndr_print_NTTIME(ndr, "retention_time", r->retention_time);
+       ndr_print_uint8(ndr, "shutdown_in_progress", r->shutdown_in_progress);
+       ndr_print_NTTIME(ndr, "time_to_shutdown", r->time_to_shutdown);
+       ndr_print_uint32(ndr, "next_audit_record", r->next_audit_record);
+       ndr_print_uint32(ndr, "unknown", r->unknown);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_AuditEventsInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditEventsInfo *r)
+{
+       uint32_t cntr_settings_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditing_mode));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->settings));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->settings) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+                       for (cntr_settings_1 = 0; cntr_settings_1 < r->count; cntr_settings_1++) {
+                               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->settings[cntr_settings_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_AuditEventsInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditEventsInfo *r)
+{
+       uint32_t _ptr_settings;
+       uint32_t cntr_settings_1;
+       TALLOC_CTX *_mem_save_settings_0;
+       TALLOC_CTX *_mem_save_settings_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditing_mode));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_settings));
+               if (_ptr_settings) {
+                       NDR_PULL_ALLOC(ndr, r->settings);
+               } else {
+                       r->settings = NULL;
+               }
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->settings) {
+                       _mem_save_settings_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->settings));
+                       NDR_PULL_ALLOC_N(ndr, r->settings, ndr_get_array_size(ndr, &r->settings));
+                       _mem_save_settings_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->settings, 0);
+                       for (cntr_settings_1 = 0; cntr_settings_1 < r->count; cntr_settings_1++) {
+                               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->settings[cntr_settings_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_settings_0, 0);
+               }
+               if (r->settings) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->settings, r->count));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r)
+{
+       uint32_t cntr_settings_1;
+       ndr_print_struct(ndr, name, "lsa_AuditEventsInfo");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "auditing_mode", r->auditing_mode);
+       ndr_print_ptr(ndr, "settings", r->settings);
+       ndr->depth++;
+       if (r->settings) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "settings", r->count);
+               ndr->depth++;
+               for (cntr_settings_1=0;cntr_settings_1<r->count;cntr_settings_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_settings_1);
+                       if (idx_1) {
+                               ndr_print_uint32(ndr, "settings", r->settings[cntr_settings_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_DomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
+               if (r->sid) {
+                       NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfo *r)
+{
+       uint32_t _ptr_sid;
+       TALLOC_CTX *_mem_save_sid_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+               if (_ptr_sid) {
+                       NDR_PULL_ALLOC(ndr, r->sid);
+               } else {
+                       r->sid = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
+               if (r->sid) {
+                       _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
+                       NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfo *r)
+{
+       ndr_print_struct(ndr, name, "lsa_DomainInfo");
+       ndr->depth++;
+       ndr_print_lsa_StringLarge(ndr, "name", &r->name);
+       ndr_print_ptr(ndr, "sid", r->sid);
+       ndr->depth++;
+       if (r->sid) {
+               ndr_print_dom_sid2(ndr, "sid", r->sid);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_PDAccountInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_PDAccountInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_PDAccountInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_PDAccountInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *name, const struct lsa_PDAccountInfo *r)
+{
+       ndr_print_struct(ndr, name, "lsa_PDAccountInfo");
+       ndr->depth++;
+       ndr_print_lsa_String(ndr, "name", &r->name);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_ServerRole(struct ndr_push *ndr, int ndr_flags, const struct lsa_ServerRole *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 2));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->role));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_flags, struct lsa_ServerRole *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 2));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->role));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, const struct lsa_ServerRole *r)
+{
+       ndr_print_struct(ndr, name, "lsa_ServerRole");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "unknown", r->unknown);
+       ndr_print_uint16(ndr, "role", r->role);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_ReplicaSourceInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ReplicaSourceInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->source));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->account));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->source));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->account));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ReplicaSourceInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->source));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->account));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->source));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->account));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, const struct lsa_ReplicaSourceInfo *r)
+{
+       ndr_print_struct(ndr, name, "lsa_ReplicaSourceInfo");
+       ndr->depth++;
+       ndr_print_lsa_String(ndr, "source", &r->source);
+       ndr_print_lsa_String(ndr, "account", &r->account);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_DefaultQuotaInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DefaultQuotaInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 8));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->paged_pool));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->non_paged_pool));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->min_wss));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_wss));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pagefile));
+               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DefaultQuotaInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 8));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->paged_pool));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->non_paged_pool));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->min_wss));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_wss));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pagefile));
+               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, const struct lsa_DefaultQuotaInfo *r)
+{
+       ndr_print_struct(ndr, name, "lsa_DefaultQuotaInfo");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "paged_pool", r->paged_pool);
+       ndr_print_uint32(ndr, "non_paged_pool", r->non_paged_pool);
+       ndr_print_uint32(ndr, "min_wss", r->min_wss);
+       ndr_print_uint32(ndr, "max_wss", r->max_wss);
+       ndr_print_uint32(ndr, "pagefile", r->pagefile);
+       ndr_print_hyper(ndr, "unknown", r->unknown);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_ModificationInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_ModificationInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 8));
+               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->modified_id));
+               NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->db_create_time));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ModificationInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 8));
+               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->modified_id));
+               NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->db_create_time));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, const struct lsa_ModificationInfo *r)
+{
+       ndr_print_struct(ndr, name, "lsa_ModificationInfo");
+       ndr->depth++;
+       ndr_print_hyper(ndr, "modified_id", r->modified_id);
+       ndr_print_NTTIME(ndr, "db_create_time", r->db_create_time);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_AuditFullSetInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullSetInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 1));
+               NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullSetInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 1));
+               NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullSetInfo *r)
+{
+       ndr_print_struct(ndr, name, "lsa_AuditFullSetInfo");
+       ndr->depth++;
+       ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_AuditFullQueryInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 2));
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown));
+               NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full));
+               NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->log_is_full));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullQueryInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 2));
+               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown));
+               NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
+               NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->log_is_full));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullQueryInfo *r)
+{
+       ndr_print_struct(ndr, name, "lsa_AuditFullQueryInfo");
+       ndr->depth++;
+       ndr_print_uint16(ndr, "unknown", r->unknown);
+       ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
+       ndr_print_uint8(ndr, "log_is_full", r->log_is_full);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_DnsDomainInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_DnsDomainInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain));
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest));
+               NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->domain_guid));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain));
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest));
+               NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->domain_guid));
+               if (r->sid) {
+                       NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DnsDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DnsDomainInfo *r)
+{
+       uint32_t _ptr_sid;
+       TALLOC_CTX *_mem_save_sid_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->name));
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_domain));
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->dns_forest));
+               NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+               if (_ptr_sid) {
+                       NDR_PULL_ALLOC(ndr, r->sid);
+               } else {
+                       r->sid = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->name));
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_domain));
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->dns_forest));
+               NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->domain_guid));
+               if (r->sid) {
+                       _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
+                       NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DnsDomainInfo *r)
+{
+       ndr_print_struct(ndr, name, "lsa_DnsDomainInfo");
+       ndr->depth++;
+       ndr_print_lsa_StringLarge(ndr, "name", &r->name);
+       ndr_print_lsa_StringLarge(ndr, "dns_domain", &r->dns_domain);
+       ndr_print_lsa_StringLarge(ndr, "dns_forest", &r->dns_forest);
+       ndr_print_GUID(ndr, "domain_guid", &r->domain_guid);
+       ndr_print_ptr(ndr, "sid", r->sid);
+       ndr->depth++;
+       if (r->sid) {
+               ndr_print_dom_sid2(ndr, "sid", r->sid);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, int ndr_flags, const union lsa_PolicyInformation *r)
+{
+       int level;
+       level = ndr_push_get_switch_value(ndr, r);
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
+               switch (level) {
+                       case LSA_POLICY_INFO_AUDIT_LOG:
+                               NDR_CHECK(ndr_push_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log));
+                       break;
+
+                       case LSA_POLICY_INFO_AUDIT_EVENTS:
+                               NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events));
+                       break;
+
+                       case LSA_POLICY_INFO_DOMAIN:
+                               NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
+                       break;
+
+                       case LSA_POLICY_INFO_PD:
+                               NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
+                       break;
+
+                       case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
+                               NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
+                       break;
+
+                       case LSA_POLICY_INFO_ROLE:
+                               NDR_CHECK(ndr_push_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
+                       break;
+
+                       case LSA_POLICY_INFO_REPLICA:
+                               NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
+                       break;
+
+                       case LSA_POLICY_INFO_QUOTA:
+                               NDR_CHECK(ndr_push_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
+                       break;
+
+                       case LSA_POLICY_INFO_DB:
+                               NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->db));
+                       break;
+
+                       case LSA_POLICY_INFO_AUDIT_FULL_SET:
+                               NDR_CHECK(ndr_push_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
+                       break;
+
+                       case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
+                               NDR_CHECK(ndr_push_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
+                       break;
+
+                       case LSA_POLICY_INFO_DNS:
+                               NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case LSA_POLICY_INFO_AUDIT_LOG:
+                       break;
+
+                       case LSA_POLICY_INFO_AUDIT_EVENTS:
+                               NDR_CHECK(ndr_push_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events));
+                       break;
+
+                       case LSA_POLICY_INFO_DOMAIN:
+                               NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
+                       break;
+
+                       case LSA_POLICY_INFO_PD:
+                               NDR_CHECK(ndr_push_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
+                       break;
+
+                       case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
+                               NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
+                       break;
+
+                       case LSA_POLICY_INFO_ROLE:
+                       break;
+
+                       case LSA_POLICY_INFO_REPLICA:
+                               NDR_CHECK(ndr_push_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
+                       break;
+
+                       case LSA_POLICY_INFO_QUOTA:
+                       break;
+
+                       case LSA_POLICY_INFO_DB:
+                       break;
+
+                       case LSA_POLICY_INFO_AUDIT_FULL_SET:
+                       break;
+
+                       case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
+                       break;
+
+                       case LSA_POLICY_INFO_DNS:
+                               NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, int ndr_flags, union lsa_PolicyInformation *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 lsa_PolicyInformation", _level);
+               }
+               switch (level) {
+                       case LSA_POLICY_INFO_AUDIT_LOG: {
+                               NDR_CHECK(ndr_pull_lsa_AuditLogInfo(ndr, NDR_SCALARS, &r->audit_log));
+                       break; }
+
+                       case LSA_POLICY_INFO_AUDIT_EVENTS: {
+                               NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_SCALARS, &r->audit_events));
+                       break; }
+
+                       case LSA_POLICY_INFO_DOMAIN: {
+                               NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
+                       break; }
+
+                       case LSA_POLICY_INFO_PD: {
+                               NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
+                       break; }
+
+                       case LSA_POLICY_INFO_ACCOUNT_DOMAIN: {
+                               NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
+                       break; }
+
+                       case LSA_POLICY_INFO_ROLE: {
+                               NDR_CHECK(ndr_pull_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
+                       break; }
+
+                       case LSA_POLICY_INFO_REPLICA: {
+                               NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
+                       break; }
+
+                       case LSA_POLICY_INFO_QUOTA: {
+                               NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
+                       break; }
+
+                       case LSA_POLICY_INFO_DB: {
+                               NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->db));
+                       break; }
+
+                       case LSA_POLICY_INFO_AUDIT_FULL_SET: {
+                               NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
+                       break; }
+
+                       case LSA_POLICY_INFO_AUDIT_FULL_QUERY: {
+                               NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
+                       break; }
+
+                       case LSA_POLICY_INFO_DNS: {
+                               NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
+                       break; }
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case LSA_POLICY_INFO_AUDIT_LOG:
+                       break;
+
+                       case LSA_POLICY_INFO_AUDIT_EVENTS:
+                               NDR_CHECK(ndr_pull_lsa_AuditEventsInfo(ndr, NDR_BUFFERS, &r->audit_events));
+                       break;
+
+                       case LSA_POLICY_INFO_DOMAIN:
+                               NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
+                       break;
+
+                       case LSA_POLICY_INFO_PD:
+                               NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
+                       break;
+
+                       case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
+                               NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
+                       break;
+
+                       case LSA_POLICY_INFO_ROLE:
+                       break;
+
+                       case LSA_POLICY_INFO_REPLICA:
+                               NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
+                       break;
+
+                       case LSA_POLICY_INFO_QUOTA:
+                       break;
+
+                       case LSA_POLICY_INFO_DB:
+                       break;
+
+                       case LSA_POLICY_INFO_AUDIT_FULL_SET:
+                       break;
+
+                       case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
+                       break;
+
+                       case LSA_POLICY_INFO_DNS:
+                               NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
+                       break;
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, const union lsa_PolicyInformation *r)
+{
+       int level;
+       level = ndr_print_get_switch_value(ndr, r);
+       ndr_print_union(ndr, name, level, "lsa_PolicyInformation");
+       switch (level) {
+               case LSA_POLICY_INFO_AUDIT_LOG:
+                       ndr_print_lsa_AuditLogInfo(ndr, "audit_log", &r->audit_log);
+               break;
+
+               case LSA_POLICY_INFO_AUDIT_EVENTS:
+                       ndr_print_lsa_AuditEventsInfo(ndr, "audit_events", &r->audit_events);
+               break;
+
+               case LSA_POLICY_INFO_DOMAIN:
+                       ndr_print_lsa_DomainInfo(ndr, "domain", &r->domain);
+               break;
+
+               case LSA_POLICY_INFO_PD:
+                       ndr_print_lsa_PDAccountInfo(ndr, "pd", &r->pd);
+               break;
+
+               case LSA_POLICY_INFO_ACCOUNT_DOMAIN:
+                       ndr_print_lsa_DomainInfo(ndr, "account_domain", &r->account_domain);
+               break;
+
+               case LSA_POLICY_INFO_ROLE:
+                       ndr_print_lsa_ServerRole(ndr, "role", &r->role);
+               break;
+
+               case LSA_POLICY_INFO_REPLICA:
+                       ndr_print_lsa_ReplicaSourceInfo(ndr, "replica", &r->replica);
+               break;
+
+               case LSA_POLICY_INFO_QUOTA:
+                       ndr_print_lsa_DefaultQuotaInfo(ndr, "quota", &r->quota);
+               break;
+
+               case LSA_POLICY_INFO_DB:
+                       ndr_print_lsa_ModificationInfo(ndr, "db", &r->db);
+               break;
+
+               case LSA_POLICY_INFO_AUDIT_FULL_SET:
+                       ndr_print_lsa_AuditFullSetInfo(ndr, "auditfullset", &r->auditfullset);
+               break;
+
+               case LSA_POLICY_INFO_AUDIT_FULL_QUERY:
+                       ndr_print_lsa_AuditFullQueryInfo(ndr, "auditfullquery", &r->auditfullquery);
+               break;
+
+               case LSA_POLICY_INFO_DNS:
+                       ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
+               break;
+
+               default:
+                       ndr_print_bad_level(ndr, name, level);
+       }
+}
+
+NTSTATUS ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidPtr *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->sid) {
+                       NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_SidPtr(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidPtr *r)
+{
+       uint32_t _ptr_sid;
+       TALLOC_CTX *_mem_save_sid_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+               if (_ptr_sid) {
+                       NDR_PULL_ALLOC(ndr, r->sid);
+               } else {
+                       r->sid = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->sid) {
+                       _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
+                       NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SidPtr(struct ndr_print *ndr, const char *name, const struct lsa_SidPtr *r)
+{
+       ndr_print_struct(ndr, name, "lsa_SidPtr");
+       ndr->depth++;
+       ndr_print_ptr(ndr, "sid", r->sid);
+       ndr->depth++;
+       if (r->sid) {
+               ndr_print_dom_sid2(ndr, "sid", r->sid);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+_PUBLIC_ NTSTATUS ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidArray *r)
+{
+       uint32_t cntr_sids_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->sids) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_sids));
+                       for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
+                               NDR_CHECK(ndr_push_lsa_SidPtr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
+                       }
+                       for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
+                               NDR_CHECK(ndr_push_lsa_SidPtr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ NTSTATUS ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r)
+{
+       uint32_t _ptr_sids;
+       uint32_t cntr_sids_1;
+       TALLOC_CTX *_mem_save_sids_0;
+       TALLOC_CTX *_mem_save_sids_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_sids));
+               if (r->num_sids < 0 || r->num_sids > 1000) {
+                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
+               if (_ptr_sids) {
+                       NDR_PULL_ALLOC(ndr, r->sids);
+               } else {
+                       r->sids = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->sids) {
+                       _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
+                       NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
+                       _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
+                       for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
+                               NDR_CHECK(ndr_pull_lsa_SidPtr(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
+                       }
+                       for (cntr_sids_1 = 0; cntr_sids_1 < r->num_sids; cntr_sids_1++) {
+                               NDR_CHECK(ndr_pull_lsa_SidPtr(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
+               }
+               if (r->sids) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->num_sids));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, const struct lsa_SidArray *r)
+{
+       uint32_t cntr_sids_1;
+       ndr_print_struct(ndr, name, "lsa_SidArray");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "num_sids", r->num_sids);
+       ndr_print_ptr(ndr, "sids", r->sids);
+       ndr->depth++;
+       if (r->sids) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "sids", r->num_sids);
+               ndr->depth++;
+               for (cntr_sids_1=0;cntr_sids_1<r->num_sids;cntr_sids_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_sids_1);
+                       if (idx_1) {
+                               ndr_print_lsa_SidPtr(ndr, "sids", &r->sids[cntr_sids_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_DomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainList *r)
+{
+       uint32_t cntr_domains_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->domains) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+                       for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
+                               NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
+                       }
+                       for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
+                               NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainList *r)
+{
+       uint32_t _ptr_domains;
+       uint32_t cntr_domains_1;
+       TALLOC_CTX *_mem_save_domains_0;
+       TALLOC_CTX *_mem_save_domains_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
+               if (_ptr_domains) {
+                       NDR_PULL_ALLOC(ndr, r->domains);
+               } else {
+                       r->domains = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->domains) {
+                       _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
+                       NDR_PULL_ALLOC_N(ndr, r->domains, ndr_get_array_size(ndr, &r->domains));
+                       _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
+                       for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
+                               NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
+                       }
+                       for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
+                               NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+               }
+               if (r->domains) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, const struct lsa_DomainList *r)
+{
+       uint32_t cntr_domains_1;
+       ndr_print_struct(ndr, name, "lsa_DomainList");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr_print_ptr(ndr, "domains", r->domains);
+       ndr->depth++;
+       if (r->domains) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "domains", r->count);
+               ndr->depth++;
+               for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_domains_1);
+                       if (idx_1) {
+                               ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r)
+{
+       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r)
+{
+       uint16_t v;
+       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enum lsa_SidType r)
+{
+       const char *val = NULL;
+
+       switch (r) {
+               case SID_NAME_USE_NONE: val = "SID_NAME_USE_NONE"; break;
+               case SID_NAME_USER: val = "SID_NAME_USER"; break;
+               case SID_NAME_DOM_GRP: val = "SID_NAME_DOM_GRP"; break;
+               case SID_NAME_DOMAIN: val = "SID_NAME_DOMAIN"; break;
+               case SID_NAME_ALIAS: val = "SID_NAME_ALIAS"; break;
+               case SID_NAME_WKN_GRP: val = "SID_NAME_WKN_GRP"; break;
+               case SID_NAME_DELETED: val = "SID_NAME_DELETED"; break;
+               case SID_NAME_INVALID: val = "SID_NAME_INVALID"; break;
+               case SID_NAME_UNKNOWN: val = "SID_NAME_UNKNOWN"; break;
+               case SID_NAME_COMPUTER: val = "SID_NAME_COMPUTER"; break;
+       }
+       ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+NTSTATUS ndr_push_lsa_TranslatedSid(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TranslatedSid(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TranslatedSid");
+       ndr->depth++;
+       ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
+       ndr_print_uint32(ndr, "rid", r->rid);
+       ndr_print_uint32(ndr, "sid_index", r->sid_index);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TransSidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray *r)
+{
+       uint32_t cntr_sids_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->sids) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+                       for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
+                               NDR_CHECK(ndr_push_lsa_TranslatedSid(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TransSidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray *r)
+{
+       uint32_t _ptr_sids;
+       uint32_t cntr_sids_1;
+       TALLOC_CTX *_mem_save_sids_0;
+       TALLOC_CTX *_mem_save_sids_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               if (r->count < 0 || r->count > 1000) {
+                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
+               if (_ptr_sids) {
+                       NDR_PULL_ALLOC(ndr, r->sids);
+               } else {
+                       r->sids = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->sids) {
+                       _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
+                       NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
+                       _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
+                       for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
+                               NDR_CHECK(ndr_pull_lsa_TranslatedSid(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
+               }
+               if (r->sids) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray *r)
+{
+       uint32_t cntr_sids_1;
+       ndr_print_struct(ndr, name, "lsa_TransSidArray");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr_print_ptr(ndr, "sids", r->sids);
+       ndr->depth++;
+       if (r->sids) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "sids", r->count);
+               ndr->depth++;
+               for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_sids_1);
+                       if (idx_1) {
+                               ndr_print_lsa_TranslatedSid(ndr, "sids", &r->sids[cntr_sids_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_RefDomainList(struct ndr_push *ndr, int ndr_flags, const struct lsa_RefDomainList *r)
+{
+       uint32_t cntr_domains_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_size));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->domains) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+                       for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
+                               NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
+                       }
+                       for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
+                               NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_RefDomainList(struct ndr_pull *ndr, int ndr_flags, struct lsa_RefDomainList *r)
+{
+       uint32_t _ptr_domains;
+       uint32_t cntr_domains_1;
+       TALLOC_CTX *_mem_save_domains_0;
+       TALLOC_CTX *_mem_save_domains_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               if (r->count < 0 || r->count > 1000) {
+                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
+               if (_ptr_domains) {
+                       NDR_PULL_ALLOC(ndr, r->domains);
+               } else {
+                       r->domains = NULL;
+               }
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_size));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->domains) {
+                       _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
+                       NDR_PULL_ALLOC_N(ndr, r->domains, ndr_get_array_size(ndr, &r->domains));
+                       _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
+                       for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
+                               NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
+                       }
+                       for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
+                               NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+               }
+               if (r->domains) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *name, const struct lsa_RefDomainList *r)
+{
+       uint32_t cntr_domains_1;
+       ndr_print_struct(ndr, name, "lsa_RefDomainList");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr_print_ptr(ndr, "domains", r->domains);
+       ndr->depth++;
+       if (r->domains) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "domains", r->count);
+               ndr->depth++;
+               for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_domains_1);
+                       if (idx_1) {
+                               ndr_print_lsa_DomainInfo(ndr, "domains", &r->domains[cntr_domains_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr_print_uint32(ndr, "max_size", r->max_size);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TranslatedName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TranslatedName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TranslatedName");
+       ndr->depth++;
+       ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
+       ndr_print_lsa_String(ndr, "name", &r->name);
+       ndr_print_uint32(ndr, "sid_index", r->sid_index);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TransNameArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray *r)
+{
+       uint32_t cntr_names_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->names) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_push_lsa_TranslatedName(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
+                       }
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_push_lsa_TranslatedName(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TransNameArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray *r)
+{
+       uint32_t _ptr_names;
+       uint32_t cntr_names_1;
+       TALLOC_CTX *_mem_save_names_0;
+       TALLOC_CTX *_mem_save_names_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               if (r->count < 0 || r->count > 1000) {
+                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
+               if (_ptr_names) {
+                       NDR_PULL_ALLOC(ndr, r->names);
+               } else {
+                       r->names = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->names) {
+                       _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
+                       NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
+                       _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
+                       }
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_pull_lsa_TranslatedName(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
+               }
+               if (r->names) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray *r)
+{
+       uint32_t cntr_names_1;
+       ndr_print_struct(ndr, name, "lsa_TransNameArray");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr_print_ptr(ndr, "names", r->names);
+       ndr->depth++;
+       if (r->names) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "names", r->count);
+               ndr->depth++;
+               for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_names_1);
+                       if (idx_1) {
+                               ndr_print_lsa_TranslatedName(ndr, "names", &r->names[cntr_names_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LUIDAttribute(struct ndr_push *ndr, int ndr_flags, const struct lsa_LUIDAttribute *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->attribute));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LUIDAttribute(struct ndr_pull *ndr, int ndr_flags, struct lsa_LUIDAttribute *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, &r->luid));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->attribute));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *name, const struct lsa_LUIDAttribute *r)
+{
+       ndr_print_struct(ndr, name, "lsa_LUIDAttribute");
+       ndr->depth++;
+       ndr_print_lsa_LUID(ndr, "luid", &r->luid);
+       ndr_print_uint32(ndr, "attribute", r->attribute);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_PrivilegeSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_PrivilegeSet *r)
+{
+       uint32_t cntr_set_0;
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
+               for (cntr_set_0 = 0; cntr_set_0 < r->count; cntr_set_0++) {
+                       NDR_CHECK(ndr_push_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0]));
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_PrivilegeSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrivilegeSet *r)
+{
+       uint32_t cntr_set_0;
+       TALLOC_CTX *_mem_save_set_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_array_size(ndr, &r->set));
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               if (r->count < 0 || r->count > 1000) {
+                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+               }
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
+               NDR_PULL_ALLOC_N(ndr, r->set, ndr_get_array_size(ndr, &r->set));
+               _mem_save_set_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->set, 0);
+               for (cntr_set_0 = 0; cntr_set_0 < r->count; cntr_set_0++) {
+                       NDR_CHECK(ndr_pull_lsa_LUIDAttribute(ndr, NDR_SCALARS, &r->set[cntr_set_0]));
+               }
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_set_0, 0);
+               if (r->set) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->set, r->count));
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, const struct lsa_PrivilegeSet *r)
+{
+       uint32_t cntr_set_0;
+       ndr_print_struct(ndr, name, "lsa_PrivilegeSet");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr_print_uint32(ndr, "unknown", r->unknown);
+       ndr->print(ndr, "%s: ARRAY(%d)", "set", r->count);
+       ndr->depth++;
+       for (cntr_set_0=0;cntr_set_0<r->count;cntr_set_0++) {
+               char *idx_0=NULL;
+               asprintf(&idx_0, "[%d]", cntr_set_0);
+               if (idx_0) {
+                       ndr_print_lsa_LUIDAttribute(ndr, "set", &r->set[cntr_set_0]);
+                       free(idx_0);
+               }
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_DATA_BUF(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF *r)
+{
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+               if (ndr_flags & NDR_SCALARS) {
+                       NDR_CHECK(ndr_push_align(ndr, 4));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
+                       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->size));
+                               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
+                               NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->length));
+                       }
+               }
+               ndr->flags = _flags_save_STRUCT;
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DATA_BUF(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF *r)
+{
+       uint32_t _ptr_data;
+       TALLOC_CTX *_mem_save_data_0;
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+               if (ndr_flags & NDR_SCALARS) {
+                       NDR_CHECK(ndr_pull_align(ndr, 4));
+                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
+                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+                       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_CHECK(ndr_pull_array_length(ndr, &r->data));
+                               if (ndr_get_array_length(ndr, &r->data) > ndr_get_array_size(ndr, &r->data)) {
+                                       return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data), ndr_get_array_length(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_length(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->size));
+                       }
+                       if (r->data) {
+                               NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->data, r->length));
+                       }
+               }
+               ndr->flags = _flags_save_STRUCT;
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r)
+{
+       ndr_print_struct(ndr, name, "lsa_DATA_BUF");
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "length", r->length);
+               ndr_print_uint32(ndr, "size", r->size);
+               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--;
+               ndr->flags = _flags_save_STRUCT;
+       }
+}
+
+NTSTATUS ndr_push_lsa_DATA_BUF2(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF2 *r)
+{
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+               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_unique_ptr(ndr, r->data));
+               }
+               if (ndr_flags & NDR_BUFFERS) {
+                       if (r->data) {
+                               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
+                               NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->size));
+                       }
+               }
+               ndr->flags = _flags_save_STRUCT;
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DATA_BUF2(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF2 *r)
+{
+       uint32_t _ptr_data;
+       TALLOC_CTX *_mem_save_data_0;
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+               if (ndr_flags & NDR_SCALARS) {
+                       NDR_CHECK(ndr_pull_align(ndr, 4));
+                       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
+                       if (r->size < 0 || r->size > 65536) {
+                               return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+                       }
+                       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->size));
+                       }
+               }
+               ndr->flags = _flags_save_STRUCT;
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r)
+{
+       ndr_print_struct(ndr, name, "lsa_DATA_BUF2");
+       {
+               uint32_t _flags_save_STRUCT = ndr->flags;
+               ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "size", r->size);
+               ndr_print_ptr(ndr, "data", r->data);
+               ndr->depth++;
+               if (r->data) {
+                       ndr_print_array_uint8(ndr, "data", r->data, r->size);
+               }
+               ndr->depth--;
+               ndr->depth--;
+               ndr->flags = _flags_save_STRUCT;
+       }
+}
+
+NTSTATUS ndr_push_lsa_TrustDomInfoEnum(struct ndr_push *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum r)
+{
+       NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TrustDomInfoEnum(struct ndr_pull *ndr, int ndr_flags, enum lsa_TrustDomInfoEnum *r)
+{
+       uint16_t v;
+       NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r)
+{
+       const char *val = NULL;
+
+       switch (r) {
+               case LSA_TRUSTED_DOMAIN_INFO_NAME: val = "LSA_TRUSTED_DOMAIN_INFO_NAME"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_CONTROLLERS_INFO"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: val = "LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: val = "LSA_TRUSTED_DOMAIN_INFO_PASSWORD"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_BASIC: val = "LSA_TRUSTED_DOMAIN_INFO_BASIC"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_EX"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: val = "LSA_TRUSTED_DOMAIN_INFO_FULL_INFO"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_11: val = "LSA_TRUSTED_DOMAIN_INFO_11"; break;
+               case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: val = "LSA_TRUSTED_DOMAIN_INFO_INFO_ALL"; break;
+       }
+       ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+NTSTATUS ndr_push_lsa_TrustDomainInfoName(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoName *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TrustDomainInfoName(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoName *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoName");
+       ndr->depth++;
+       ndr_print_lsa_StringLarge(ndr, "netbios_name", &r->netbios_name);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TrustDomainInfoPosixOffset(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPosixOffset *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->posix_offset));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TrustDomainInfoPosixOffset(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPosixOffset *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->posix_offset));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoPosixOffset");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "posix_offset", r->posix_offset);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TrustDomainInfoPassword(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoPassword *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->old_password));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->password) {
+                       NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
+               }
+               if (r->old_password) {
+                       NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->old_password));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TrustDomainInfoPassword(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoPassword *r)
+{
+       uint32_t _ptr_password;
+       TALLOC_CTX *_mem_save_password_0;
+       uint32_t _ptr_old_password;
+       TALLOC_CTX *_mem_save_old_password_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
+               if (_ptr_password) {
+                       NDR_PULL_ALLOC(ndr, r->password);
+               } else {
+                       r->password = NULL;
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_password));
+               if (_ptr_old_password) {
+                       NDR_PULL_ALLOC(ndr, r->old_password);
+               } else {
+                       r->old_password = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->password) {
+                       _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
+                       NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->password));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
+               }
+               if (r->old_password) {
+                       _mem_save_old_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->old_password, 0);
+                       NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->old_password));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_password_0, 0);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoPassword");
+       ndr->depth++;
+       ndr_print_ptr(ndr, "password", r->password);
+       ndr->depth++;
+       if (r->password) {
+               ndr_print_lsa_DATA_BUF(ndr, "password", r->password);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "old_password", r->old_password);
+       ndr->depth++;
+       if (r->old_password) {
+               ndr_print_lsa_DATA_BUF(ndr, "old_password", r->old_password);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TrustDomainInfoBasic(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBasic *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->netbios_name));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name));
+               if (r->sid) {
+                       NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TrustDomainInfoBasic(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBasic *r)
+{
+       uint32_t _ptr_sid;
+       TALLOC_CTX *_mem_save_sid_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->netbios_name));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+               if (_ptr_sid) {
+                       NDR_PULL_ALLOC(ndr, r->sid);
+               } else {
+                       r->sid = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->netbios_name));
+               if (r->sid) {
+                       _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
+                       NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBasic");
+       ndr->depth++;
+       ndr_print_lsa_String(ndr, "netbios_name", &r->netbios_name);
+       ndr_print_ptr(ndr, "sid", r->sid);
+       ndr->depth++;
+       if (r->sid) {
+               ndr_print_dom_sid2(ndr, "sid", r->sid);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TrustDomainInfoInfoEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoEx *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_direction));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_type));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->trust_attributes));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
+               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
+               if (r->sid) {
+                       NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TrustDomainInfoInfoEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoEx *r)
+{
+       uint32_t _ptr_sid;
+       TALLOC_CTX *_mem_save_sid_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->domain_name));
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->netbios_name));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+               if (_ptr_sid) {
+                       NDR_PULL_ALLOC(ndr, r->sid);
+               } else {
+                       r->sid = NULL;
+               }
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_direction));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_type));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->trust_attributes));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->domain_name));
+               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->netbios_name));
+               if (r->sid) {
+                       _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
+                       NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoEx");
+       ndr->depth++;
+       ndr_print_lsa_StringLarge(ndr, "domain_name", &r->domain_name);
+       ndr_print_lsa_StringLarge(ndr, "netbios_name", &r->netbios_name);
+       ndr_print_ptr(ndr, "sid", r->sid);
+       ndr->depth++;
+       if (r->sid) {
+               ndr_print_dom_sid2(ndr, "sid", r->sid);
+       }
+       ndr->depth--;
+       ndr_print_uint32(ndr, "trust_direction", r->trust_direction);
+       ndr_print_uint32(ndr, "trust_type", r->trust_type);
+       ndr_print_uint32(ndr, "trust_attributes", r->trust_attributes);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TrustDomainInfoBuffer(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoBuffer *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 8));
+               NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, r->last_update_time));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->secret_type));
+               NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TrustDomainInfoBuffer(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoBuffer *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 8));
+               NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, &r->last_update_time));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secret_type));
+               NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoBuffer");
+       ndr->depth++;
+       ndr_print_NTTIME_hyper(ndr, "last_update_time", r->last_update_time);
+       ndr_print_uint32(ndr, "secret_type", r->secret_type);
+       ndr_print_lsa_DATA_BUF2(ndr, "data", &r->data);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TrustDomainInfoAuthInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoAuthInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->incoming_count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->incoming_current_auth_info));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->incoming_previous_auth_info));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->outgoing_count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_current_auth_info));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->outgoing_previous_auth_info));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->incoming_current_auth_info) {
+                       NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_current_auth_info));
+               }
+               if (r->incoming_previous_auth_info) {
+                       NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_previous_auth_info));
+               }
+               if (r->outgoing_current_auth_info) {
+                       NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_current_auth_info));
+               }
+               if (r->outgoing_previous_auth_info) {
+                       NDR_CHECK(ndr_push_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_previous_auth_info));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TrustDomainInfoAuthInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoAuthInfo *r)
+{
+       uint32_t _ptr_incoming_current_auth_info;
+       TALLOC_CTX *_mem_save_incoming_current_auth_info_0;
+       uint32_t _ptr_incoming_previous_auth_info;
+       TALLOC_CTX *_mem_save_incoming_previous_auth_info_0;
+       uint32_t _ptr_outgoing_current_auth_info;
+       TALLOC_CTX *_mem_save_outgoing_current_auth_info_0;
+       uint32_t _ptr_outgoing_previous_auth_info;
+       TALLOC_CTX *_mem_save_outgoing_previous_auth_info_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->incoming_count));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_incoming_current_auth_info));
+               if (_ptr_incoming_current_auth_info) {
+                       NDR_PULL_ALLOC(ndr, r->incoming_current_auth_info);
+               } else {
+                       r->incoming_current_auth_info = NULL;
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_incoming_previous_auth_info));
+               if (_ptr_incoming_previous_auth_info) {
+                       NDR_PULL_ALLOC(ndr, r->incoming_previous_auth_info);
+               } else {
+                       r->incoming_previous_auth_info = NULL;
+               }
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->outgoing_count));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_outgoing_current_auth_info));
+               if (_ptr_outgoing_current_auth_info) {
+                       NDR_PULL_ALLOC(ndr, r->outgoing_current_auth_info);
+               } else {
+                       r->outgoing_current_auth_info = NULL;
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_outgoing_previous_auth_info));
+               if (_ptr_outgoing_previous_auth_info) {
+                       NDR_PULL_ALLOC(ndr, r->outgoing_previous_auth_info);
+               } else {
+                       r->outgoing_previous_auth_info = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->incoming_current_auth_info) {
+                       _mem_save_incoming_current_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->incoming_current_auth_info, 0);
+                       NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_current_auth_info));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_incoming_current_auth_info_0, 0);
+               }
+               if (r->incoming_previous_auth_info) {
+                       _mem_save_incoming_previous_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->incoming_previous_auth_info, 0);
+                       NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->incoming_previous_auth_info));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_incoming_previous_auth_info_0, 0);
+               }
+               if (r->outgoing_current_auth_info) {
+                       _mem_save_outgoing_current_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->outgoing_current_auth_info, 0);
+                       NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_current_auth_info));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_outgoing_current_auth_info_0, 0);
+               }
+               if (r->outgoing_previous_auth_info) {
+                       _mem_save_outgoing_previous_auth_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->outgoing_previous_auth_info, 0);
+                       NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBuffer(ndr, NDR_SCALARS|NDR_BUFFERS, r->outgoing_previous_auth_info));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_outgoing_previous_auth_info_0, 0);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoAuthInfo");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "incoming_count", r->incoming_count);
+       ndr_print_ptr(ndr, "incoming_current_auth_info", r->incoming_current_auth_info);
+       ndr->depth++;
+       if (r->incoming_current_auth_info) {
+               ndr_print_lsa_TrustDomainInfoBuffer(ndr, "incoming_current_auth_info", r->incoming_current_auth_info);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "incoming_previous_auth_info", r->incoming_previous_auth_info);
+       ndr->depth++;
+       if (r->incoming_previous_auth_info) {
+               ndr_print_lsa_TrustDomainInfoBuffer(ndr, "incoming_previous_auth_info", r->incoming_previous_auth_info);
+       }
+       ndr->depth--;
+       ndr_print_uint32(ndr, "outgoing_count", r->outgoing_count);
+       ndr_print_ptr(ndr, "outgoing_current_auth_info", r->outgoing_current_auth_info);
+       ndr->depth++;
+       if (r->outgoing_current_auth_info) {
+               ndr_print_lsa_TrustDomainInfoBuffer(ndr, "outgoing_current_auth_info", r->outgoing_current_auth_info);
+       }
+       ndr->depth--;
+       ndr_print_ptr(ndr, "outgoing_previous_auth_info", r->outgoing_previous_auth_info);
+       ndr->depth++;
+       if (r->outgoing_previous_auth_info) {
+               ndr_print_lsa_TrustDomainInfoBuffer(ndr, "outgoing_previous_auth_info", r->outgoing_previous_auth_info);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TrustDomainInfoFullInfo(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoFullInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TrustDomainInfoFullInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoFullInfo *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoFullInfo");
+       ndr->depth++;
+       ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
+       ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
+       ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TrustDomainInfo11(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfo11 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
+               NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data1));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
+               NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data1));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TrustDomainInfo11(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfo11 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
+               NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data1));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
+               NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data1));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfo11(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfo11 *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfo11");
+       ndr->depth++;
+       ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
+       ndr_print_lsa_DATA_BUF2(ndr, "data1", &r->data1);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TrustDomainInfoInfoAll(struct ndr_push *ndr, int ndr_flags, const struct lsa_TrustDomainInfoInfoAll *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
+               NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data1));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
+               NDR_CHECK(ndr_push_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data1));
+               NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TrustDomainInfoInfoAll(struct ndr_pull *ndr, int ndr_flags, struct lsa_TrustDomainInfoInfoAll *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
+               NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_SCALARS, &r->data1));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
+               NDR_CHECK(ndr_pull_lsa_DATA_BUF2(ndr, NDR_BUFFERS, &r->data1));
+               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustDomainInfoInfoAll(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoAll *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TrustDomainInfoInfoAll");
+       ndr->depth++;
+       ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
+       ndr_print_lsa_DATA_BUF2(ndr, "data1", &r->data1);
+       ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
+       ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TrustedDomainInfo(struct ndr_push *ndr, int ndr_flags, const union lsa_TrustedDomainInfo *r)
+{
+       int level;
+       level = ndr_push_get_switch_value(ndr, r);
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, level));
+               switch (level) {
+                       case LSA_TRUSTED_DOMAIN_INFO_NAME:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_BASIC:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_11:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfo11(ndr, NDR_SCALARS, &r->info11));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoAll(ndr, NDR_SCALARS, &r->info_all));
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case LSA_TRUSTED_DOMAIN_INFO_NAME:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoPassword(ndr, NDR_BUFFERS, &r->password));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_BASIC:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoBasic(ndr, NDR_BUFFERS, &r->info_basic));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_11:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfo11(ndr, NDR_BUFFERS, &r->info11));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL:
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoAll(ndr, NDR_BUFFERS, &r->info_all));
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TrustedDomainInfo(struct ndr_pull *ndr, int ndr_flags, union lsa_TrustedDomainInfo *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 lsa_TrustedDomainInfo", _level);
+               }
+               switch (level) {
+                       case LSA_TRUSTED_DOMAIN_INFO_NAME: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_SCALARS, &r->name));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPosixOffset(ndr, NDR_SCALARS, &r->posix_offset));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr, NDR_SCALARS, &r->password));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_INFO_BASIC: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr, NDR_SCALARS, &r->info_basic));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_INFO_INFO_EX: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->info_ex));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_SCALARS, &r->auth_info));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_SCALARS, &r->full_info));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_INFO_11: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfo11(ndr, NDR_SCALARS, &r->info11));
+                       break; }
+
+                       case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL: {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoAll(ndr, NDR_SCALARS, &r->info_all));
+                       break; }
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case LSA_TRUSTED_DOMAIN_INFO_NAME:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoName(ndr, NDR_BUFFERS, &r->name));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoPassword(ndr, NDR_BUFFERS, &r->password));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_BASIC:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoBasic(ndr, NDR_BUFFERS, &r->info_basic));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->info_ex));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoAuthInfo(ndr, NDR_BUFFERS, &r->auth_info));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoFullInfo(ndr, NDR_BUFFERS, &r->full_info));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_11:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfo11(ndr, NDR_BUFFERS, &r->info11));
+                       break;
+
+                       case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL:
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoAll(ndr, NDR_BUFFERS, &r->info_all));
+                       break;
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r)
+{
+       int level;
+       level = ndr_print_get_switch_value(ndr, r);
+       ndr_print_union(ndr, name, level, "lsa_TrustedDomainInfo");
+       switch (level) {
+               case LSA_TRUSTED_DOMAIN_INFO_NAME:
+                       ndr_print_lsa_TrustDomainInfoName(ndr, "name", &r->name);
+               break;
+
+               case LSA_TRUSTED_DOMAIN_INFO_POSIX_OFFSET:
+                       ndr_print_lsa_TrustDomainInfoPosixOffset(ndr, "posix_offset", &r->posix_offset);
+               break;
+
+               case LSA_TRUSTED_DOMAIN_INFO_PASSWORD:
+                       ndr_print_lsa_TrustDomainInfoPassword(ndr, "password", &r->password);
+               break;
+
+               case LSA_TRUSTED_DOMAIN_INFO_BASIC:
+                       ndr_print_lsa_TrustDomainInfoBasic(ndr, "info_basic", &r->info_basic);
+               break;
+
+               case LSA_TRUSTED_DOMAIN_INFO_INFO_EX:
+                       ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "info_ex", &r->info_ex);
+               break;
+
+               case LSA_TRUSTED_DOMAIN_INFO_AUTH_INFO:
+                       ndr_print_lsa_TrustDomainInfoAuthInfo(ndr, "auth_info", &r->auth_info);
+               break;
+
+               case LSA_TRUSTED_DOMAIN_INFO_FULL_INFO:
+                       ndr_print_lsa_TrustDomainInfoFullInfo(ndr, "full_info", &r->full_info);
+               break;
+
+               case LSA_TRUSTED_DOMAIN_INFO_11:
+                       ndr_print_lsa_TrustDomainInfo11(ndr, "info11", &r->info11);
+               break;
+
+               case LSA_TRUSTED_DOMAIN_INFO_INFO_ALL:
+                       ndr_print_lsa_TrustDomainInfoInfoAll(ndr, "info_all", &r->info_all);
+               break;
+
+               default:
+                       ndr_print_bad_level(ndr, name, level);
+       }
+}
+
+NTSTATUS ndr_push_lsa_DATA_BUF_PTR(struct ndr_push *ndr, int ndr_flags, const struct lsa_DATA_BUF_PTR *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->buf));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->buf) {
+                       NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->buf));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DATA_BUF_PTR(struct ndr_pull *ndr, int ndr_flags, struct lsa_DATA_BUF_PTR *r)
+{
+       uint32_t _ptr_buf;
+       TALLOC_CTX *_mem_save_buf_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buf));
+               if (_ptr_buf) {
+                       NDR_PULL_ALLOC(ndr, r->buf);
+               } else {
+                       r->buf = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->buf) {
+                       _mem_save_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->buf, 0);
+                       NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->buf));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buf_0, 0);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r)
+{
+       ndr_print_struct(ndr, name, "lsa_DATA_BUF_PTR");
+       ndr->depth++;
+       ndr_print_ptr(ndr, "buf", r->buf);
+       ndr->depth++;
+       if (r->buf) {
+               ndr_print_lsa_DATA_BUF(ndr, "buf", r->buf);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_RightSet(struct ndr_push *ndr, int ndr_flags, const struct lsa_RightSet *r)
+{
+       uint32_t cntr_names_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->names) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
+                       }
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_RightSet(struct ndr_pull *ndr, int ndr_flags, struct lsa_RightSet *r)
+{
+       uint32_t _ptr_names;
+       uint32_t cntr_names_1;
+       TALLOC_CTX *_mem_save_names_0;
+       TALLOC_CTX *_mem_save_names_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
+               if (_ptr_names) {
+                       NDR_PULL_ALLOC(ndr, r->names);
+               } else {
+                       r->names = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->names) {
+                       _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
+                       NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
+                       _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
+                       }
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
+               }
+               if (r->names) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r)
+{
+       uint32_t cntr_names_1;
+       ndr_print_struct(ndr, name, "lsa_RightSet");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr_print_ptr(ndr, "names", r->names);
+       ndr->depth++;
+       if (r->names) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "names", r->count);
+               ndr->depth++;
+               for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_names_1);
+                       if (idx_1) {
+                               ndr_print_lsa_StringLarge(ndr, "names", &r->names[cntr_names_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_StringPointer(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringPointer *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->string) {
+                       NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->string));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_StringPointer(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringPointer *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_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_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->string));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_StringPointer(struct ndr_print *ndr, const char *name, const struct lsa_StringPointer *r)
+{
+       ndr_print_struct(ndr, name, "lsa_StringPointer");
+       ndr->depth++;
+       ndr_print_ptr(ndr, "string", r->string);
+       ndr->depth++;
+       if (r->string) {
+               ndr_print_lsa_String(ndr, "string", r->string);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_DomainListEx(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainListEx *r)
+{
+       uint32_t cntr_domains_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->domains));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->domains) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+                       for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
+                       }
+                       for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
+                               NDR_CHECK(ndr_push_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DomainListEx(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainListEx *r)
+{
+       uint32_t _ptr_domains;
+       uint32_t cntr_domains_1;
+       TALLOC_CTX *_mem_save_domains_0;
+       TALLOC_CTX *_mem_save_domains_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
+               if (_ptr_domains) {
+                       NDR_PULL_ALLOC(ndr, r->domains);
+               } else {
+                       r->domains = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->domains) {
+                       _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->domains));
+                       NDR_PULL_ALLOC_N(ndr, r->domains, ndr_get_array_size(ndr, &r->domains));
+                       _mem_save_domains_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->domains, 0);
+                       for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_SCALARS, &r->domains[cntr_domains_1]));
+                       }
+                       for (cntr_domains_1 = 0; cntr_domains_1 < r->count; cntr_domains_1++) {
+                               NDR_CHECK(ndr_pull_lsa_TrustDomainInfoInfoEx(ndr, NDR_BUFFERS, &r->domains[cntr_domains_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+               }
+               if (r->domains) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->domains, r->count));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name, const struct lsa_DomainListEx *r)
+{
+       uint32_t cntr_domains_1;
+       ndr_print_struct(ndr, name, "lsa_DomainListEx");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr_print_ptr(ndr, "domains", r->domains);
+       ndr->depth++;
+       if (r->domains) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "domains", r->count);
+               ndr->depth++;
+               for (cntr_domains_1=0;cntr_domains_1<r->count;cntr_domains_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_domains_1);
+                       if (idx_1) {
+                               ndr_print_lsa_TrustDomainInfoInfoEx(ndr, "domains", &r->domains[cntr_domains_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_DomainInfoKerberos(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoKerberos *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 8));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enforce_restrictions));
+               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->service_tkt_lifetime));
+               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_lifetime));
+               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->user_tkt_renewaltime));
+               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->clock_skew));
+               NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->unknown6));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DomainInfoKerberos(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoKerberos *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 8));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enforce_restrictions));
+               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->service_tkt_lifetime));
+               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_lifetime));
+               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->user_tkt_renewaltime));
+               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->clock_skew));
+               NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->unknown6));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_DomainInfoKerberos(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoKerberos *r)
+{
+       ndr_print_struct(ndr, name, "lsa_DomainInfoKerberos");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "enforce_restrictions", r->enforce_restrictions);
+       ndr_print_hyper(ndr, "service_tkt_lifetime", r->service_tkt_lifetime);
+       ndr_print_hyper(ndr, "user_tkt_lifetime", r->user_tkt_lifetime);
+       ndr_print_hyper(ndr, "user_tkt_renewaltime", r->user_tkt_renewaltime);
+       ndr_print_hyper(ndr, "clock_skew", r->clock_skew);
+       ndr_print_hyper(ndr, "unknown6", r->unknown6);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_DomainInfoEfs(struct ndr_push *ndr, int ndr_flags, const struct lsa_DomainInfoEfs *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->blob_size));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->efs_blob));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->efs_blob) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->blob_size));
+                       NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->efs_blob, r->blob_size));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DomainInfoEfs(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfoEfs *r)
+{
+       uint32_t _ptr_efs_blob;
+       TALLOC_CTX *_mem_save_efs_blob_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->blob_size));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_efs_blob));
+               if (_ptr_efs_blob) {
+                       NDR_PULL_ALLOC(ndr, r->efs_blob);
+               } else {
+                       r->efs_blob = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->efs_blob) {
+                       _mem_save_efs_blob_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->efs_blob, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->efs_blob));
+                       NDR_PULL_ALLOC_N(ndr, r->efs_blob, ndr_get_array_size(ndr, &r->efs_blob));
+                       NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->efs_blob, ndr_get_array_size(ndr, &r->efs_blob)));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_efs_blob_0, 0);
+               }
+               if (r->efs_blob) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->efs_blob, r->blob_size));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoEfs *r)
+{
+       ndr_print_struct(ndr, name, "lsa_DomainInfoEfs");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "blob_size", r->blob_size);
+       ndr_print_ptr(ndr, "efs_blob", r->efs_blob);
+       ndr->depth++;
+       if (r->efs_blob) {
+               ndr_print_array_uint8(ndr, "efs_blob", r->efs_blob, r->blob_size);
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_DomainInformationPolicy(struct ndr_push *ndr, int ndr_flags, const union lsa_DomainInformationPolicy *r)
+{
+       int level;
+       level = ndr_push_get_switch_value(ndr, r);
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, level));
+               switch (level) {
+                       case LSA_DOMAIN_INFO_POLICY_EFS:
+                               NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info));
+                       break;
+
+                       case LSA_DOMAIN_INFO_POLICY_KERBEROS:
+                               NDR_CHECK(ndr_push_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info));
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case LSA_DOMAIN_INFO_POLICY_EFS:
+                               NDR_CHECK(ndr_push_lsa_DomainInfoEfs(ndr, NDR_BUFFERS, &r->efs_info));
+                       break;
+
+                       case LSA_DOMAIN_INFO_POLICY_KERBEROS:
+                       break;
+
+                       default:
+                               return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DomainInformationPolicy(struct ndr_pull *ndr, int ndr_flags, union lsa_DomainInformationPolicy *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 lsa_DomainInformationPolicy", _level);
+               }
+               switch (level) {
+                       case LSA_DOMAIN_INFO_POLICY_EFS: {
+                               NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_SCALARS, &r->efs_info));
+                       break; }
+
+                       case LSA_DOMAIN_INFO_POLICY_KERBEROS: {
+                               NDR_CHECK(ndr_pull_lsa_DomainInfoKerberos(ndr, NDR_SCALARS, &r->kerberos_info));
+                       break; }
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               switch (level) {
+                       case LSA_DOMAIN_INFO_POLICY_EFS:
+                               NDR_CHECK(ndr_pull_lsa_DomainInfoEfs(ndr, NDR_BUFFERS, &r->efs_info));
+                       break;
+
+                       case LSA_DOMAIN_INFO_POLICY_KERBEROS:
+                       break;
+
+                       default:
+                               return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_DomainInformationPolicy(struct ndr_print *ndr, const char *name, const union lsa_DomainInformationPolicy *r)
+{
+       int level;
+       level = ndr_print_get_switch_value(ndr, r);
+       ndr_print_union(ndr, name, level, "lsa_DomainInformationPolicy");
+       switch (level) {
+               case LSA_DOMAIN_INFO_POLICY_EFS:
+                       ndr_print_lsa_DomainInfoEfs(ndr, "efs_info", &r->efs_info);
+               break;
+
+               case LSA_DOMAIN_INFO_POLICY_KERBEROS:
+                       ndr_print_lsa_DomainInfoKerberos(ndr, "kerberos_info", &r->kerberos_info);
+               break;
+
+               default:
+                       ndr_print_bad_level(ndr, name, level);
+       }
+}
+
+NTSTATUS ndr_push_lsa_TranslatedName2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedName2 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->name));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->name));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TranslatedName2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedName2 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->name));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->name));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TranslatedName2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName2 *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TranslatedName2");
+       ndr->depth++;
+       ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
+       ndr_print_lsa_String(ndr, "name", &r->name);
+       ndr_print_uint32(ndr, "sid_index", r->sid_index);
+       ndr_print_uint32(ndr, "unknown", r->unknown);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TransNameArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransNameArray2 *r)
+{
+       uint32_t cntr_names_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->names));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->names) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
+                       }
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_push_lsa_TranslatedName2(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TransNameArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransNameArray2 *r)
+{
+       uint32_t _ptr_names;
+       uint32_t cntr_names_1;
+       TALLOC_CTX *_mem_save_names_0;
+       TALLOC_CTX *_mem_save_names_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               if (r->count < 0 || r->count > 1000) {
+                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_names));
+               if (_ptr_names) {
+                       NDR_PULL_ALLOC(ndr, r->names);
+               } else {
+                       r->names = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->names) {
+                       _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->names));
+                       NDR_PULL_ALLOC_N(ndr, r->names, ndr_get_array_size(ndr, &r->names));
+                       _mem_save_names_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->names, 0);
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr, NDR_SCALARS, &r->names[cntr_names_1]));
+                       }
+                       for (cntr_names_1 = 0; cntr_names_1 < r->count; cntr_names_1++) {
+                               NDR_CHECK(ndr_pull_lsa_TranslatedName2(ndr, NDR_BUFFERS, &r->names[cntr_names_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
+               }
+               if (r->names) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->names, r->count));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray2 *r)
+{
+       uint32_t cntr_names_1;
+       ndr_print_struct(ndr, name, "lsa_TransNameArray2");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr_print_ptr(ndr, "names", r->names);
+       ndr->depth++;
+       if (r->names) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "names", r->count);
+               ndr->depth++;
+               for (cntr_names_1=0;cntr_names_1<r->count;cntr_names_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_names_1);
+                       if (idx_1) {
+                               ndr_print_lsa_TranslatedName2(ndr, "names", &r->names[cntr_names_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TranslatedSid2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid2 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rid));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TranslatedSid2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid2 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rid));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid2 *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TranslatedSid2");
+       ndr->depth++;
+       ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
+       ndr_print_uint32(ndr, "rid", r->rid);
+       ndr_print_uint32(ndr, "sid_index", r->sid_index);
+       ndr_print_uint32(ndr, "unknown", r->unknown);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TransSidArray2(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray2 *r)
+{
+       uint32_t cntr_sids_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->sids) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+                       for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
+                               NDR_CHECK(ndr_push_lsa_TranslatedSid2(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TransSidArray2(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray2 *r)
+{
+       uint32_t _ptr_sids;
+       uint32_t cntr_sids_1;
+       TALLOC_CTX *_mem_save_sids_0;
+       TALLOC_CTX *_mem_save_sids_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               if (r->count < 0 || r->count > 1000) {
+                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
+               if (_ptr_sids) {
+                       NDR_PULL_ALLOC(ndr, r->sids);
+               } else {
+                       r->sids = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->sids) {
+                       _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
+                       NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
+                       _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
+                       for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
+                               NDR_CHECK(ndr_pull_lsa_TranslatedSid2(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
+               }
+               if (r->sids) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray2 *r)
+{
+       uint32_t cntr_sids_1;
+       ndr_print_struct(ndr, name, "lsa_TransSidArray2");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr_print_ptr(ndr, "sids", r->sids);
+       ndr->depth++;
+       if (r->sids) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "sids", r->count);
+               ndr->depth++;
+               for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_sids_1);
+                       if (idx_1) {
+                               ndr_print_lsa_TranslatedSid2(ndr, "sids", &r->sids[cntr_sids_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TranslatedSid3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TranslatedSid3 *r)
+{
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->sid_type));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sid));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_index));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->sid) {
+                       NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TranslatedSid3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TranslatedSid3 *r)
+{
+       uint32_t _ptr_sid;
+       TALLOC_CTX *_mem_save_sid_0;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->sid_type));
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sid));
+               if (_ptr_sid) {
+                       NDR_PULL_ALLOC(ndr, r->sid);
+               } else {
+                       r->sid = NULL;
+               }
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_index));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->sid) {
+                       _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sid, 0);
+                       NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->sid));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, 0);
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid3 *r)
+{
+       ndr_print_struct(ndr, name, "lsa_TranslatedSid3");
+       ndr->depth++;
+       ndr_print_lsa_SidType(ndr, "sid_type", r->sid_type);
+       ndr_print_ptr(ndr, "sid", r->sid);
+       ndr->depth++;
+       if (r->sid) {
+               ndr_print_dom_sid2(ndr, "sid", r->sid);
+       }
+       ndr->depth--;
+       ndr_print_uint32(ndr, "sid_index", r->sid_index);
+       ndr_print_uint32(ndr, "unknown", r->unknown);
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TransSidArray3(struct ndr_push *ndr, int ndr_flags, const struct lsa_TransSidArray3 *r)
+{
+       uint32_t cntr_sids_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_push_align(ndr, 4));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->sids));
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->sids) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
+                       for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
+                               NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
+                       }
+                       for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
+                               NDR_CHECK(ndr_push_lsa_TranslatedSid3(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
+                       }
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TransSidArray3(struct ndr_pull *ndr, int ndr_flags, struct lsa_TransSidArray3 *r)
+{
+       uint32_t _ptr_sids;
+       uint32_t cntr_sids_1;
+       TALLOC_CTX *_mem_save_sids_0;
+       TALLOC_CTX *_mem_save_sids_1;
+       if (ndr_flags & NDR_SCALARS) {
+               NDR_CHECK(ndr_pull_align(ndr, 4));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
+               if (r->count < 0 || r->count > 1000) {
+                       return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+               }
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sids));
+               if (_ptr_sids) {
+                       NDR_PULL_ALLOC(ndr, r->sids);
+               } else {
+                       r->sids = NULL;
+               }
+       }
+       if (ndr_flags & NDR_BUFFERS) {
+               if (r->sids) {
+                       _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->sids));
+                       NDR_PULL_ALLOC_N(ndr, r->sids, ndr_get_array_size(ndr, &r->sids));
+                       _mem_save_sids_1 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->sids, 0);
+                       for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
+                               NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr, NDR_SCALARS, &r->sids[cntr_sids_1]));
+                       }
+                       for (cntr_sids_1 = 0; cntr_sids_1 < r->count; cntr_sids_1++) {
+                               NDR_CHECK(ndr_pull_lsa_TranslatedSid3(ndr, NDR_BUFFERS, &r->sids[cntr_sids_1]));
+                       }
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_1, 0);
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, 0);
+               }
+               if (r->sids) {
+                       NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->sids, r->count));
+               }
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray3 *r)
+{
+       uint32_t cntr_sids_1;
+       ndr_print_struct(ndr, name, "lsa_TransSidArray3");
+       ndr->depth++;
+       ndr_print_uint32(ndr, "count", r->count);
+       ndr_print_ptr(ndr, "sids", r->sids);
+       ndr->depth++;
+       if (r->sids) {
+               ndr->print(ndr, "%s: ARRAY(%d)", "sids", r->count);
+               ndr->depth++;
+               for (cntr_sids_1=0;cntr_sids_1<r->count;cntr_sids_1++) {
+                       char *idx_1=NULL;
+                       asprintf(&idx_1, "[%d]", cntr_sids_1);
+                       if (idx_1) {
+                               ndr_print_lsa_TranslatedSid3(ndr, "sids", &r->sids[cntr_sids_1]);
+                               free(idx_1);
+                       }
+               }
+               ndr->depth--;
+       }
+       ndr->depth--;
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_Close(struct ndr_push *ndr, int flags, const struct lsa_Close *r)
+{
+       if (flags & NDR_IN) {
+               if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+       }
+       if (flags & NDR_OUT) {
+               if (r->out.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
+               NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_Close(struct ndr_pull *ndr, int flags, struct lsa_Close *r)
+{
+       TALLOC_CTX *_mem_save_handle_0;
+       if (flags & NDR_IN) {
+               ZERO_STRUCT(r->out);
+
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.handle);
+               }
+               _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_PULL_ALLOC(ndr, r->out.handle);
+               *r->out.handle = *r->in.handle;
+       }
+       if (flags & NDR_OUT) {
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.handle);
+               }
+               _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Close *r)
+{
+       ndr_print_struct(ndr, name, "lsa_Close");
+       ndr->depth++;
+       if (flags & NDR_SET_VALUES) {
+               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+       }
+       if (flags & NDR_IN) {
+               ndr_print_struct(ndr, "in", "lsa_Close");
+               ndr->depth++;
+               ndr_print_ptr(ndr, "handle", r->in.handle);
+               ndr->depth++;
+               ndr_print_policy_handle(ndr, "handle", r->in.handle);
+               ndr->depth--;
+               ndr->depth--;
+       }
+       if (flags & NDR_OUT) {
+               ndr_print_struct(ndr, "out", "lsa_Close");
+               ndr->depth++;
+               ndr_print_ptr(ndr, "handle", r->out.handle);
+               ndr->depth++;
+               ndr_print_policy_handle(ndr, "handle", r->out.handle);
+               ndr->depth--;
+               ndr_print_NTSTATUS(ndr, "result", r->out.result);
+               ndr->depth--;
+       }
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_Delete(struct ndr_push *ndr, int flags, const struct lsa_Delete *r)
+{
+       if (flags & NDR_IN) {
+               if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+       }
+       if (flags & NDR_OUT) {
+               NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_Delete(struct ndr_pull *ndr, int flags, struct lsa_Delete *r)
+{
+       TALLOC_CTX *_mem_save_handle_0;
+       if (flags & NDR_IN) {
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.handle);
+               }
+               _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+       }
+       if (flags & NDR_OUT) {
+               NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Delete *r)
+{
+       ndr_print_struct(ndr, name, "lsa_Delete");
+       ndr->depth++;
+       if (flags & NDR_SET_VALUES) {
+               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+       }
+       if (flags & NDR_IN) {
+               ndr_print_struct(ndr, "in", "lsa_Delete");
+               ndr->depth++;
+               ndr_print_ptr(ndr, "handle", r->in.handle);
+               ndr->depth++;
+               ndr_print_policy_handle(ndr, "handle", r->in.handle);
+               ndr->depth--;
+               ndr->depth--;
+       }
+       if (flags & NDR_OUT) {
+               ndr_print_struct(ndr, "out", "lsa_Delete");
+               ndr->depth++;
+               ndr_print_NTSTATUS(ndr, "result", r->out.result);
+               ndr->depth--;
+       }
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_EnumPrivs(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivs *r)
+{
+       if (flags & NDR_IN) {
+               if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+               if (r->in.resume_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_count));
+       }
+       if (flags & NDR_OUT) {
+               if (r->out.resume_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
+               if (r->out.privs == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+               NDR_CHECK(ndr_push_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
+               NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_EnumPrivs(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivs *r)
+{
+       TALLOC_CTX *_mem_save_handle_0;
+       TALLOC_CTX *_mem_save_resume_handle_0;
+       TALLOC_CTX *_mem_save_privs_0;
+       if (flags & NDR_IN) {
+               ZERO_STRUCT(r->out);
+
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.handle);
+               }
+               _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.resume_handle);
+               }
+               _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_count));
+               NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+               *r->out.resume_handle = *r->in.resume_handle;
+               NDR_PULL_ALLOC(ndr, r->out.privs);
+               ZERO_STRUCTP(r->out.privs);
+       }
+       if (flags & NDR_OUT) {
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+               }
+               _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, LIBNDR_FLAG_REF_ALLOC);
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->out.privs);
+               }
+               _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_lsa_PrivArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.privs));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivs *r)
+{
+       ndr_print_struct(ndr, name, "lsa_EnumPrivs");
+       ndr->depth++;
+       if (flags & NDR_SET_VALUES) {
+               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+       }
+       if (flags & NDR_IN) {
+               ndr_print_struct(ndr, "in", "lsa_EnumPrivs");
+               ndr->depth++;
+               ndr_print_ptr(ndr, "handle", r->in.handle);
+               ndr->depth++;
+               ndr_print_policy_handle(ndr, "handle", r->in.handle);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
+               ndr->depth--;
+               ndr_print_uint32(ndr, "max_count", r->in.max_count);
+               ndr->depth--;
+       }
+       if (flags & NDR_OUT) {
+               ndr_print_struct(ndr, "out", "lsa_EnumPrivs");
+               ndr->depth++;
+               ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
+               ndr->depth++;
+               ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
+               ndr->depth--;
+               ndr_print_ptr(ndr, "privs", r->out.privs);
+               ndr->depth++;
+               ndr_print_lsa_PrivArray(ndr, "privs", r->out.privs);
+               ndr->depth--;
+               ndr_print_NTSTATUS(ndr, "result", r->out.result);
+               ndr->depth--;
+       }
+       ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_QuerySecurity(struct ndr_push *ndr, int flags, const struct lsa_QuerySecurity *r)
+{
+       if (flags & NDR_IN) {
+               if (r->in.handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+               NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+               NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
+       }
+       if (flags & NDR_OUT) {
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.sdbuf));
+               if (r->out.sdbuf) {
+                       NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sdbuf));
+               }
+               NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+       }
+       return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_QuerySecurity(struct ndr_pull *ndr, int flags, struct lsa_QuerySecurity *r)
+{
+       uint32_t _ptr_sdbuf;
+       TALLOC_CTX *_mem_save_handle_0;
+       TALLOC_CTX *_mem_save_sdbuf_0;
+       if (flags & NDR_IN) {
+               ZERO_STRUCT(r->out);
+
+               if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+                       NDR_PULL_ALLOC(ndr, r->in.handle);
+               }
+               _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+               NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+               NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+               NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
+       }
+       if (flags & NDR_OUT) {
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sdbuf));
+               if (_ptr_sdbuf) {
+                       NDR_PULL_ALLOC(ndr, r->out.sdbuf);
+               } else {
+                       r->out.sdbuf = NULL;
+               }
+               if (r->out.sdbuf) {
+                       _mem_save_sdbuf_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->out.sdbuf, 0);
+                       NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sdbuf));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sdbuf_0, 0);
+               }
+               NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+       }
+       return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecurity *r)
+{
+       ndr_print_struct(ndr, name, "lsa_QuerySecurity");
+       ndr->depth++;
+       if (flags & NDR_SET_VALUES) {
+               ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+       }
+       if (flags & NDR_IN) {
+               ndr_print_struct(ndr, "in", "lsa_Q