summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in8
-rw-r--r--source3/auth/auth_util.c4
-rw-r--r--source3/groupdb/mapping.c14
-rw-r--r--source3/include/charset.h8
-rw-r--r--source3/include/includes.h33
-rw-r--r--source3/include/mapping.h2
-rw-r--r--source3/include/passdb.h10
-rw-r--r--source3/include/smb.h22
-rw-r--r--source3/lib/util_sid.c4
-rw-r--r--source3/libads/ads_utils.c2
-rw-r--r--source3/libmsrpc/cac_lsarpc.c16
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.c1612
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.h86
-rw-r--r--source3/librpc/gen_ndr/lsa.h1409
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.c11074
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.h331
-rw-r--r--source3/librpc/gen_ndr/ndr_unixinfo.c1
-rw-r--r--source3/librpc/ndr/ndr_misc.c68
-rw-r--r--source3/librpc/ndr/ndr_sec_helper.c832
-rw-r--r--source3/librpc/ndr/sid.c160
-rw-r--r--source3/libsmb/libsmbclient.c4
-rw-r--r--source3/modules/vfs_afsacl.c6
-rw-r--r--source3/nsswitch/wb_client.c14
-rw-r--r--source3/nsswitch/wbinfo.c2
-rw-r--r--source3/nsswitch/winbindd.h8
-rw-r--r--source3/nsswitch/winbindd_async.c30
-rw-r--r--source3/nsswitch/winbindd_cache.c28
-rw-r--r--source3/nsswitch/winbindd_creds.c2
-rw-r--r--source3/nsswitch/winbindd_group.c14
-rw-r--r--source3/nsswitch/winbindd_pam.c2
-rw-r--r--source3/nsswitch/winbindd_passdb.c8
-rw-r--r--source3/nsswitch/winbindd_reconnect.c6
-rw-r--r--source3/nsswitch/winbindd_rpc.c12
-rw-r--r--source3/nsswitch/winbindd_sid.c20
-rw-r--r--source3/nsswitch/winbindd_user.c4
-rw-r--r--source3/nsswitch/winbindd_util.c4
-rw-r--r--source3/passdb/lookup_sid.c30
-rw-r--r--source3/passdb/passdb.c2
-rw-r--r--source3/passdb/pdb_get_set.c2
-rw-r--r--source3/passdb/pdb_interface.c22
-rw-r--r--source3/passdb/pdb_ldap.c22
-rw-r--r--source3/python/py_lsa.c2
-rw-r--r--source3/rpc_client/cli_lsarpc.c12
-rw-r--r--source3/rpc_parse/parse_samr.c2
-rw-r--r--source3/rpc_server/srv_lsa_nt.c4
-rw-r--r--source3/rpc_server/srv_samr_nt.c12
-rw-r--r--source3/rpcclient/cmd_lsarpc.c6
-rw-r--r--source3/smbd/lanman.c2
-rw-r--r--source3/smbd/service.c2
-rw-r--r--source3/smbd/share_access.c2
-rw-r--r--source3/utils/net_groupmap.c4
-rw-r--r--source3/utils/net_lookup.c4
-rw-r--r--source3/utils/net_rpc.c18
-rw-r--r--source3/utils/net_rpc_rights.c4
-rw-r--r--source3/utils/net_sam.c18
-rw-r--r--source3/utils/net_util.c4
-rw-r--r--source3/utils/netlookup.c4
-rw-r--r--source3/utils/smbcacls.c4
-rw-r--r--source3/utils/smbcquotas.c4
59 files changed, 15763 insertions, 283 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 231583469f..f4acd086b4 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -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) \
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 1ab9d2a49e..fd857a2806 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -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;
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index b1c5275bc1..3d7b9f3f91 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -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;
diff --git a/source3/include/charset.h b/source3/include/charset.h
index c5d03a62e8..1edf12309a 100644
--- a/source3/include/charset.h
+++ b/source3/include/charset.h
@@ -20,7 +20,13 @@
*/
/* 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
diff --git a/source3/include/includes.h b/source3/include/includes.h
index ab85c0e75e..635cf3807f 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -66,6 +66,36 @@
#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.
diff --git a/source3/include/mapping.h b/source3/include/mapping.h
index fdaa2b0453..8ba784e98c 100644
--- a/source3/include/mapping.h
+++ b/source3/include/mapping.h
@@ -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;
diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 35bb93aa31..9dc6d60eb0 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -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);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 6bc8680f86..eb8ec93f7e 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -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;
};
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index 4d31080ec9..b6952fca81 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -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)
diff --git a/source3/libads/ads_utils.c b/source3/libads/ads_utils.c
index 0cbf235989..5b450e02dd 100644
--- a/source3/libads/ads_utils.c
+++ b/source3/libads/ads_utils.c
@@ -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:
diff --git a/source3/libmsrpc/cac_lsarpc.c b/source3/libmsrpc/cac_lsarpc.c
index 72c429e724..5ff49b58d1 100644
--- a/source3/libmsrpc/cac_lsarpc.c
+++ b/source3/libmsrpc/cac_lsarpc.c
@@ -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/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c
new file mode 100644
index 0000000000..49ba425c28
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_lsa.c
@@ -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/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h
new file mode 100644
index 0000000000..a44105ea9c
--- /dev/null
+++ b/source3/librpc/gen_ndr/cli_lsa.h
@@ -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/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h
new file mode 100644
index 0000000000..50fb1faa97
--- /dev/null
+++ b/source3/librpc/gen_ndr/lsa.h
@@ -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/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c
new file mode 100644
index 0000000000..f780b676e0
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_lsa.c
@@ -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_QuerySecurity");
+ 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_security_secinfo(ndr, "sec_info", r->in.sec_info);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_QuerySecurity");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf);
+ ndr->depth++;
+ if (r->out.sdbuf) {
+ ndr_print_sec_desc_buf(ndr, "sdbuf", r->out.sdbuf);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_SetSecObj(struct ndr_push *ndr, int flags, const struct lsa_SetSecObj *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_SetSecObj(struct ndr_pull *ndr, int flags, struct lsa_SetSecObj *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecObj *r)
+{
+ ndr_print_struct(ndr, name, "lsa_SetSecObj");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_SetSecObj");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_SetSecObj");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_ChangePassword(struct ndr_push *ndr, int flags, const struct lsa_ChangePassword *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_ChangePassword(struct ndr_pull *ndr, int flags, struct lsa_ChangePassword *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ChangePassword *r)
+{
+ ndr_print_struct(ndr, name, "lsa_ChangePassword");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_ChangePassword");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_ChangePassword");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
+ if (r->in.system_name) {
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
+ }
+ if (r->in.attr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ 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_OpenPolicy(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy *r)
+{
+ uint32_t _ptr_system_name;
+ TALLOC_CTX *_mem_save_system_name_0;
+ TALLOC_CTX *_mem_save_attr_0;
+ TALLOC_CTX *_mem_save_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
+ if (_ptr_system_name) {
+ NDR_PULL_ALLOC(ndr, r->in.system_name);
+ } else {
+ r->in.system_name = NULL;
+ }
+ if (r->in.system_name) {
+ _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.attr);
+ }
+ _mem_save_attr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ ZERO_STRUCTP(r->out.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_OpenPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy *r)
+{
+ ndr_print_struct(ndr, name, "lsa_OpenPolicy");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_OpenPolicy");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "system_name", r->in.system_name);
+ ndr->depth++;
+ if (r->in.system_name) {
+ ndr_print_uint16(ndr, "system_name", *r->in.system_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "attr", r->in.attr);
+ ndr->depth++;
+ ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_OpenPolicy");
+ 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_QueryInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy *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_uint16(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_QueryInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_info_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_uint16(ndr, NDR_SCALARS, &r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy *r)
+{
+ ndr_print_struct(ndr, name, "lsa_QueryInfoPolicy");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_QueryInfoPolicy");
+ 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_uint16(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_QueryInfoPolicy");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_lsa_PolicyInformation(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_SetInfoPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_SetInfoPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy *r)
+{
+ ndr_print_struct(ndr, name, "lsa_SetInfoPolicy");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_SetInfoPolicy");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_SetInfoPolicy");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_ClearAuditLog(struct ndr_push *ndr, int flags, const struct lsa_ClearAuditLog *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_ClearAuditLog(struct ndr_pull *ndr, int flags, struct lsa_ClearAuditLog *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ClearAuditLog *r)
+{
+ ndr_print_struct(ndr, name, "lsa_ClearAuditLog");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_ClearAuditLog");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_ClearAuditLog");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int flags, const struct lsa_CreateAccount *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.sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.acct_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_sid_0;
+ TALLOC_CTX *_mem_save_acct_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);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sid);
+ }
+ _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_PULL_ALLOC(ndr, r->out.acct_handle);
+ ZERO_STRUCTP(r->out.acct_handle);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.acct_handle);
+ }
+ _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_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_CreateAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateAccount *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CreateAccount");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CreateAccount");
+ 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, "sid", r->in.sid);
+ ndr->depth++;
+ ndr_print_dom_sid2(ndr, "sid", r->in.sid);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CreateAccount");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_EnumAccounts(struct ndr_push *ndr, int flags, const struct lsa_EnumAccounts *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.num_entries));
+ }
+ 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.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_EnumAccounts(struct ndr_pull *ndr, int flags, struct lsa_EnumAccounts *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ TALLOC_CTX *_mem_save_sids_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.num_entries));
+ if (r->in.num_entries < 0 || r->in.num_entries > 8192) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ *r->out.resume_handle = *r->in.resume_handle;
+ NDR_PULL_ALLOC(ndr, r->out.sids);
+ ZERO_STRUCTP(r->out.sids);
+ }
+ 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.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_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_EnumAccounts(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccounts *r)
+{
+ ndr_print_struct(ndr, name, "lsa_EnumAccounts");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_EnumAccounts");
+ 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, "num_entries", r->in.num_entries);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_EnumAccounts");
+ 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, "sids", r->out.sids);
+ ndr->depth++;
+ ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *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.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.trustdom_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trustdom_handle));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_info_0;
+ TALLOC_CTX *_mem_save_trustdom_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);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.info);
+ }
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
+ ZERO_STRUCTP(r->out.trustdom_handle);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
+ }
+ _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trustdom_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_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_CreateTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomain *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CreateTrustedDomain");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomain");
+ 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, "info", r->in.info);
+ ndr->depth++;
+ ndr_print_lsa_DomainInfo(ndr, "info", r->in.info);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomain");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_EnumTrustDom(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustDom *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_size));
+ }
+ 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.domains == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_EnumTrustDom(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustDom *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ TALLOC_CTX *_mem_save_domains_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_size));
+ if (r->in.max_size < 0 || r->in.max_size > 1000) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ *r->out.resume_handle = *r->in.resume_handle;
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
+ }
+ 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.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_DomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_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_EnumTrustDom(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustDom *r)
+{
+ ndr_print_struct(ndr, name, "lsa_EnumTrustDom");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_EnumTrustDom");
+ 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_size", r->in.max_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_EnumTrustDom");
+ 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, "domains", r->out.domains);
+ ndr->depth++;
+ ndr_print_lsa_DomainList(ndr, "domains", r->out.domains);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LookupNames(struct ndr_push *ndr, int flags, const struct lsa_LookupNames *r)
+{
+ uint32_t cntr_names_0;
+ 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_uint32(ndr, NDR_SCALARS, r->in.num_names));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
+ }
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
+ }
+ if (r->in.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
+ if (r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ }
+ if (r->out.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
+ if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LookupNames(struct ndr_pull *ndr, int flags, struct lsa_LookupNames *r)
+{
+ uint32_t cntr_names_0;
+ uint32_t _ptr_domains;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_names_0;
+ TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_sids_0;
+ TALLOC_CTX *_mem_save_count_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_uint32(ndr, NDR_SCALARS, &r->in.num_names));
+ if (r->in.num_names < 0 || r->in.num_names > 1000) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
+ NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
+ _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
+ }
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.sids);
+ *r->out.sids = *r->in.sids;
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ *r->out.count = *r->in.count;
+ if (r->in.names) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
+ if (_ptr_domains) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ } else {
+ r->out.domains = NULL;
+ }
+ if (r->out.domains) {
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransSidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_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_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames *r)
+{
+ uint32_t cntr_names_0;
+ ndr_print_struct(ndr, name, "lsa_LookupNames");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LookupNames");
+ 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_uint32(ndr, "num_names", r->in.num_names);
+ ndr->print(ndr, "%s: ARRAY(%d)", "names", r->in.num_names);
+ ndr->depth++;
+ for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_names_0);
+ if (idx_0) {
+ ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "sids", r->in.sids);
+ ndr->depth++;
+ ndr_print_lsa_TransSidArray(ndr, "sids", r->in.sids);
+ ndr->depth--;
+ ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "count", r->in.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->in.count);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LookupNames");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "domains", r->out.domains);
+ ndr->depth++;
+ if (r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "sids", r->out.sids);
+ ndr->depth++;
+ ndr_print_lsa_TransSidArray(ndr, "sids", r->out.sids);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "count", r->out.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->out.count);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LookupSids(struct ndr_push *ndr, int flags, const struct lsa_LookupSids *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.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ if (r->in.names == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
+ if (r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ }
+ if (r->out.names == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
+ if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LookupSids(struct ndr_pull *ndr, int flags, struct lsa_LookupSids *r)
+{
+ uint32_t _ptr_domains;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_sids_0;
+ TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_names_0;
+ TALLOC_CTX *_mem_save_count_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.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.names);
+ }
+ _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.names);
+ *r->out.names = *r->in.names;
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ *r->out.count = *r->in.count;
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
+ if (_ptr_domains) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ } else {
+ r->out.domains = NULL;
+ }
+ if (r->out.domains) {
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.names);
+ }
+ _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransNameArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_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_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LookupSids");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LookupSids");
+ 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, "sids", r->in.sids);
+ ndr->depth++;
+ ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "names", r->in.names);
+ ndr->depth++;
+ ndr_print_lsa_TransNameArray(ndr, "names", r->in.names);
+ ndr->depth--;
+ ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "count", r->in.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->in.count);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LookupSids");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "domains", r->out.domains);
+ ndr->depth++;
+ if (r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "names", r->out.names);
+ ndr->depth++;
+ ndr_print_lsa_TransNameArray(ndr, "names", r->out.names);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "count", r->out.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->out.count);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CreateSecret(struct ndr_push *ndr, int flags, const struct lsa_CreateSecret *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_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.sec_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sec_handle));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CreateSecret(struct ndr_pull *ndr, int flags, struct lsa_CreateSecret *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_sec_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_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_PULL_ALLOC(ndr, r->out.sec_handle);
+ ZERO_STRUCTP(r->out.sec_handle);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sec_handle);
+ }
+ _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sec_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_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_CreateSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateSecret *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CreateSecret");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CreateSecret");
+ 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_lsa_String(ndr, "name", &r->in.name);
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CreateSecret");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "sec_handle", r->out.sec_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "sec_handle", r->out.sec_handle);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flags, const struct lsa_OpenAccount *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.sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.acct_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flags, struct lsa_OpenAccount *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_sid_0;
+ TALLOC_CTX *_mem_save_acct_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);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sid);
+ }
+ _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_PULL_ALLOC(ndr, r->out.acct_handle);
+ ZERO_STRUCTP(r->out.acct_handle);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.acct_handle);
+ }
+ _mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_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_OpenAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenAccount *r)
+{
+ ndr_print_struct(ndr, name, "lsa_OpenAccount");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_OpenAccount");
+ 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, "sid", r->in.sid);
+ ndr->depth++;
+ ndr_print_dom_sid2(ndr, "sid", r->in.sid);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_OpenAccount");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_EnumPrivsAccount(struct ndr_push *ndr, int flags, const struct lsa_EnumPrivsAccount *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_unique_ptr(ndr, r->out.privs));
+ if (r->out.privs) {
+ NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->out.privs));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_EnumPrivsAccount(struct ndr_pull *ndr, int flags, struct lsa_EnumPrivsAccount *r)
+{
+ uint32_t _ptr_privs;
+ TALLOC_CTX *_mem_save_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 (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
+ if (_ptr_privs) {
+ NDR_PULL_ALLOC(ndr, r->out.privs);
+ } else {
+ r->out.privs = NULL;
+ }
+ if (r->out.privs) {
+ _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.privs, 0);
+ NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->out.privs));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivsAccount *r)
+{
+ ndr_print_struct(ndr, name, "lsa_EnumPrivsAccount");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_EnumPrivsAccount");
+ 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_EnumPrivsAccount");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "privs", r->out.privs);
+ ndr->depth++;
+ if (r->out.privs) {
+ ndr_print_lsa_PrivilegeSet(ndr, "privs", r->out.privs);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_AddPrivilegesToAccount(struct ndr_push *ndr, int flags, const struct lsa_AddPrivilegesToAccount *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.privs == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_AddPrivilegesToAccount(struct ndr_pull *ndr, int flags, struct lsa_AddPrivilegesToAccount *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_privs_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 (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.privs);
+ }
+ _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.privs, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_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_AddPrivilegesToAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddPrivilegesToAccount *r)
+{
+ ndr_print_struct(ndr, name, "lsa_AddPrivilegesToAccount");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_AddPrivilegesToAccount");
+ 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, "privs", r->in.privs);
+ ndr->depth++;
+ ndr_print_lsa_PrivilegeSet(ndr, "privs", r->in.privs);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_AddPrivilegesToAccount");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_RemovePrivilegesFromAccount(struct ndr_push *ndr, int flags, const struct lsa_RemovePrivilegesFromAccount *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_uint8(ndr, NDR_SCALARS, r->in.remove_all));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.privs));
+ if (r->in.privs) {
+ NDR_CHECK(ndr_push_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_RemovePrivilegesFromAccount(struct ndr_pull *ndr, int flags, struct lsa_RemovePrivilegesFromAccount *r)
+{
+ uint32_t _ptr_privs;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_privs_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);
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.remove_all));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_privs));
+ if (_ptr_privs) {
+ NDR_PULL_ALLOC(ndr, r->in.privs);
+ } else {
+ r->in.privs = NULL;
+ }
+ if (r->in.privs) {
+ _mem_save_privs_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.privs, 0);
+ NDR_CHECK(ndr_pull_lsa_PrivilegeSet(ndr, NDR_SCALARS, r->in.privs));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_privs_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemovePrivilegesFromAccount *r)
+{
+ ndr_print_struct(ndr, name, "lsa_RemovePrivilegesFromAccount");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_RemovePrivilegesFromAccount");
+ 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_uint8(ndr, "remove_all", r->in.remove_all);
+ ndr_print_ptr(ndr, "privs", r->in.privs);
+ ndr->depth++;
+ if (r->in.privs) {
+ ndr_print_lsa_PrivilegeSet(ndr, "privs", r->in.privs);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_RemovePrivilegesFromAccount");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_GetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_GetQuotasForAccount *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_GetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_GetQuotasForAccount *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_GetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetQuotasForAccount *r)
+{
+ ndr_print_struct(ndr, name, "lsa_GetQuotasForAccount");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_GetQuotasForAccount");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_GetQuotasForAccount");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_SetQuotasForAccount(struct ndr_push *ndr, int flags, const struct lsa_SetQuotasForAccount *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_SetQuotasForAccount(struct ndr_pull *ndr, int flags, struct lsa_SetQuotasForAccount *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetQuotasForAccount *r)
+{
+ ndr_print_struct(ndr, name, "lsa_SetQuotasForAccount");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_SetQuotasForAccount");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_SetQuotasForAccount");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_GetSystemAccessAccount *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_GetSystemAccessAccount *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetSystemAccessAccount *r)
+{
+ ndr_print_struct(ndr, name, "lsa_GetSystemAccessAccount");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_GetSystemAccessAccount");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_GetSystemAccessAccount");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_SetSystemAccessAccount *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_SetSystemAccessAccount *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSystemAccessAccount *r)
+{
+ ndr_print_struct(ndr, name, "lsa_SetSystemAccessAccount");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_SetSystemAccessAccount");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_SetSystemAccessAccount");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_OpenTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomain *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.sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.trustdom_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trustdom_handle));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_OpenTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomain *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_sid_0;
+ TALLOC_CTX *_mem_save_trustdom_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);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sid);
+ }
+ _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
+ ZERO_STRUCTP(r->out.trustdom_handle);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
+ }
+ _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trustdom_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_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_OpenTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomain *r)
+{
+ ndr_print_struct(ndr, name, "lsa_OpenTrustedDomain");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_OpenTrustedDomain");
+ 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, "sid", r->in.sid);
+ ndr->depth++;
+ ndr_print_dom_sid2(ndr, "sid", r->in.sid);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_OpenTrustedDomain");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_QueryTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfo *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.trustdom_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trustdom_handle));
+ NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_QueryTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfo *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_trustdom_handle_0;
+ TALLOC_CTX *_mem_save_info_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.trustdom_handle);
+ }
+ _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trustdom_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfo *r)
+{
+ ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "trustdom_handle", r->in.trustdom_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "trustdom_handle", r->in.trustdom_handle);
+ ndr->depth--;
+ ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfo");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_SetInformationTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_SetInformationTrustedDomain *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_SetInformationTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_SetInformationTrustedDomain *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInformationTrustedDomain *r)
+{
+ ndr_print_struct(ndr, name, "lsa_SetInformationTrustedDomain");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_SetInformationTrustedDomain");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_SetInformationTrustedDomain");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_OpenSecret(struct ndr_push *ndr, int flags, const struct lsa_OpenSecret *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_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.sec_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sec_handle));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_OpenSecret(struct ndr_pull *ndr, int flags, struct lsa_OpenSecret *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_sec_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_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_PULL_ALLOC(ndr, r->out.sec_handle);
+ ZERO_STRUCTP(r->out.sec_handle);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sec_handle);
+ }
+ _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sec_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sec_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_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_OpenSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenSecret *r)
+{
+ ndr_print_struct(ndr, name, "lsa_OpenSecret");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_OpenSecret");
+ 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_lsa_String(ndr, "name", &r->in.name);
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_OpenSecret");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "sec_handle", r->out.sec_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "sec_handle", r->out.sec_handle);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_SetSecret(struct ndr_push *ndr, int flags, const struct lsa_SetSecret *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.sec_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sec_handle));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_val));
+ if (r->in.new_val) {
+ NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_val));
+ if (r->in.old_val) {
+ NDR_CHECK(ndr_push_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_SetSecret(struct ndr_pull *ndr, int flags, struct lsa_SetSecret *r)
+{
+ uint32_t _ptr_new_val;
+ uint32_t _ptr_old_val;
+ TALLOC_CTX *_mem_save_sec_handle_0;
+ TALLOC_CTX *_mem_save_new_val_0;
+ TALLOC_CTX *_mem_save_old_val_0;
+ if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sec_handle);
+ }
+ _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sec_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
+ if (_ptr_new_val) {
+ NDR_PULL_ALLOC(ndr, r->in.new_val);
+ } else {
+ r->in.new_val = NULL;
+ }
+ if (r->in.new_val) {
+ _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.new_val, 0);
+ NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
+ if (_ptr_old_val) {
+ NDR_PULL_ALLOC(ndr, r->in.old_val);
+ } else {
+ r->in.old_val = NULL;
+ }
+ if (r->in.old_val) {
+ _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.old_val, 0);
+ NDR_CHECK(ndr_pull_lsa_DATA_BUF(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SetSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecret *r)
+{
+ ndr_print_struct(ndr, name, "lsa_SetSecret");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_SetSecret");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "sec_handle", r->in.sec_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "sec_handle", r->in.sec_handle);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "new_val", r->in.new_val);
+ ndr->depth++;
+ if (r->in.new_val) {
+ ndr_print_lsa_DATA_BUF(ndr, "new_val", r->in.new_val);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "old_val", r->in.old_val);
+ ndr->depth++;
+ if (r->in.old_val) {
+ ndr_print_lsa_DATA_BUF(ndr, "old_val", r->in.old_val);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_SetSecret");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_QuerySecret(struct ndr_push *ndr, int flags, const struct lsa_QuerySecret *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.sec_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sec_handle));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_val));
+ if (r->in.new_val) {
+ NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.new_mtime));
+ if (r->in.new_mtime) {
+ NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->in.new_mtime));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_val));
+ if (r->in.old_val) {
+ NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.old_mtime));
+ if (r->in.old_mtime) {
+ NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->in.old_mtime));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.new_val));
+ if (r->out.new_val) {
+ NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_val));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.new_mtime));
+ if (r->out.new_mtime) {
+ NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->out.new_mtime));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.old_val));
+ if (r->out.old_val) {
+ NDR_CHECK(ndr_push_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.old_val));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.old_mtime));
+ if (r->out.old_mtime) {
+ NDR_CHECK(ndr_push_NTTIME_hyper(ndr, NDR_SCALARS, *r->out.old_mtime));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_QuerySecret(struct ndr_pull *ndr, int flags, struct lsa_QuerySecret *r)
+{
+ uint32_t _ptr_new_val;
+ uint32_t _ptr_new_mtime;
+ uint32_t _ptr_old_val;
+ uint32_t _ptr_old_mtime;
+ TALLOC_CTX *_mem_save_sec_handle_0;
+ TALLOC_CTX *_mem_save_new_val_0;
+ TALLOC_CTX *_mem_save_new_mtime_0;
+ TALLOC_CTX *_mem_save_old_val_0;
+ TALLOC_CTX *_mem_save_old_mtime_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sec_handle);
+ }
+ _mem_save_sec_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sec_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
+ if (_ptr_new_val) {
+ NDR_PULL_ALLOC(ndr, r->in.new_val);
+ } else {
+ r->in.new_val = NULL;
+ }
+ if (r->in.new_val) {
+ _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.new_val, 0);
+ NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_val));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_mtime));
+ if (_ptr_new_mtime) {
+ NDR_PULL_ALLOC(ndr, r->in.new_mtime);
+ } else {
+ r->in.new_mtime = NULL;
+ }
+ if (r->in.new_mtime) {
+ _mem_save_new_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.new_mtime, 0);
+ NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->in.new_mtime));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_mtime_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
+ if (_ptr_old_val) {
+ NDR_PULL_ALLOC(ndr, r->in.old_val);
+ } else {
+ r->in.old_val = NULL;
+ }
+ if (r->in.old_val) {
+ _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.old_val, 0);
+ NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_val));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_mtime));
+ if (_ptr_old_mtime) {
+ NDR_PULL_ALLOC(ndr, r->in.old_mtime);
+ } else {
+ r->in.old_mtime = NULL;
+ }
+ if (r->in.old_mtime) {
+ _mem_save_old_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.old_mtime, 0);
+ NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->in.old_mtime));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_mtime_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_val));
+ if (_ptr_new_val) {
+ NDR_PULL_ALLOC(ndr, r->out.new_val);
+ } else {
+ r->out.new_val = NULL;
+ }
+ if (r->out.new_val) {
+ _mem_save_new_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.new_val, 0);
+ NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_val));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_val_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_new_mtime));
+ if (_ptr_new_mtime) {
+ NDR_PULL_ALLOC(ndr, r->out.new_mtime);
+ } else {
+ r->out.new_mtime = NULL;
+ }
+ if (r->out.new_mtime) {
+ _mem_save_new_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.new_mtime, 0);
+ NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->out.new_mtime));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_mtime_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_val));
+ if (_ptr_old_val) {
+ NDR_PULL_ALLOC(ndr, r->out.old_val);
+ } else {
+ r->out.old_val = NULL;
+ }
+ if (r->out.old_val) {
+ _mem_save_old_val_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.old_val, 0);
+ NDR_CHECK(ndr_pull_lsa_DATA_BUF_PTR(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.old_val));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_val_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_old_mtime));
+ if (_ptr_old_mtime) {
+ NDR_PULL_ALLOC(ndr, r->out.old_mtime);
+ } else {
+ r->out.old_mtime = NULL;
+ }
+ if (r->out.old_mtime) {
+ _mem_save_old_mtime_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.old_mtime, 0);
+ NDR_CHECK(ndr_pull_NTTIME_hyper(ndr, NDR_SCALARS, r->out.old_mtime));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_mtime_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_QuerySecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecret *r)
+{
+ ndr_print_struct(ndr, name, "lsa_QuerySecret");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_QuerySecret");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "sec_handle", r->in.sec_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "sec_handle", r->in.sec_handle);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "new_val", r->in.new_val);
+ ndr->depth++;
+ if (r->in.new_val) {
+ ndr_print_lsa_DATA_BUF_PTR(ndr, "new_val", r->in.new_val);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "new_mtime", r->in.new_mtime);
+ ndr->depth++;
+ if (r->in.new_mtime) {
+ ndr_print_NTTIME_hyper(ndr, "new_mtime", *r->in.new_mtime);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "old_val", r->in.old_val);
+ ndr->depth++;
+ if (r->in.old_val) {
+ ndr_print_lsa_DATA_BUF_PTR(ndr, "old_val", r->in.old_val);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "old_mtime", r->in.old_mtime);
+ ndr->depth++;
+ if (r->in.old_mtime) {
+ ndr_print_NTTIME_hyper(ndr, "old_mtime", *r->in.old_mtime);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_QuerySecret");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "new_val", r->out.new_val);
+ ndr->depth++;
+ if (r->out.new_val) {
+ ndr_print_lsa_DATA_BUF_PTR(ndr, "new_val", r->out.new_val);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "new_mtime", r->out.new_mtime);
+ ndr->depth++;
+ if (r->out.new_mtime) {
+ ndr_print_NTTIME_hyper(ndr, "new_mtime", *r->out.new_mtime);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "old_val", r->out.old_val);
+ ndr->depth++;
+ if (r->out.old_val) {
+ ndr_print_lsa_DATA_BUF_PTR(ndr, "old_val", r->out.old_val);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "old_mtime", r->out.old_mtime);
+ ndr->depth++;
+ if (r->out.old_mtime) {
+ ndr_print_NTTIME_hyper(ndr, "old_mtime", *r->out.old_mtime);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LookupPrivValue(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivValue *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.name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.luid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, r->out.luid));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LookupPrivValue(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivValue *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_name_0;
+ TALLOC_CTX *_mem_save_luid_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.name);
+ }
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.luid);
+ ZERO_STRUCTP(r->out.luid);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.luid);
+ }
+ _mem_save_luid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.luid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, r->out.luid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_luid_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_LookupPrivValue(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivValue *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LookupPrivValue");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LookupPrivValue");
+ 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, "name", r->in.name);
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "name", r->in.name);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LookupPrivValue");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "luid", r->out.luid);
+ ndr->depth++;
+ ndr_print_lsa_LUID(ndr, "luid", r->out.luid);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LookupPrivName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivName *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.luid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_LUID(ndr, NDR_SCALARS, r->in.luid));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.name));
+ if (r->out.name) {
+ NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LookupPrivName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivName *r)
+{
+ uint32_t _ptr_name;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_luid_0;
+ TALLOC_CTX *_mem_save_name_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.luid);
+ }
+ _mem_save_luid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.luid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_LUID(ndr, NDR_SCALARS, r->in.luid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_luid_0, LIBNDR_FLAG_REF_ALLOC);
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->out.name);
+ } else {
+ r->out.name = NULL;
+ }
+ if (r->out.name) {
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.name, 0);
+ NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivName *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LookupPrivName");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LookupPrivName");
+ 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, "luid", r->in.luid);
+ ndr->depth++;
+ ndr_print_lsa_LUID(ndr, "luid", r->in.luid);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LookupPrivName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "name", r->out.name);
+ ndr->depth++;
+ if (r->out.name) {
+ ndr_print_lsa_StringLarge(ndr, "name", r->out.name);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LookupPrivDisplayName(struct ndr_push *ndr, int flags, const struct lsa_LookupPrivDisplayName *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.name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
+ if (r->in.language_id == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.language_id));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.unknown));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.disp_name));
+ if (r->out.disp_name) {
+ NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.disp_name));
+ }
+ if (r->out.language_id == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->out.language_id));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LookupPrivDisplayName(struct ndr_pull *ndr, int flags, struct lsa_LookupPrivDisplayName *r)
+{
+ uint32_t _ptr_disp_name;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_name_0;
+ TALLOC_CTX *_mem_save_disp_name_0;
+ TALLOC_CTX *_mem_save_language_id_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.name);
+ }
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.language_id);
+ }
+ _mem_save_language_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.language_id, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.language_id));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_language_id_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.unknown));
+ NDR_PULL_ALLOC(ndr, r->out.language_id);
+ *r->out.language_id = *r->in.language_id;
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_disp_name));
+ if (_ptr_disp_name) {
+ NDR_PULL_ALLOC(ndr, r->out.disp_name);
+ } else {
+ r->out.disp_name = NULL;
+ }
+ if (r->out.disp_name) {
+ _mem_save_disp_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.disp_name, 0);
+ NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.disp_name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disp_name_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.language_id);
+ }
+ _mem_save_language_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.language_id, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->out.language_id));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_language_id_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_LookupPrivDisplayName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivDisplayName *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LookupPrivDisplayName");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LookupPrivDisplayName");
+ 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, "name", r->in.name);
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "name", r->in.name);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "language_id", r->in.language_id);
+ ndr->depth++;
+ ndr_print_uint16(ndr, "language_id", *r->in.language_id);
+ ndr->depth--;
+ ndr_print_uint16(ndr, "unknown", r->in.unknown);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LookupPrivDisplayName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "disp_name", r->out.disp_name);
+ ndr->depth++;
+ if (r->out.disp_name) {
+ ndr_print_lsa_StringLarge(ndr, "disp_name", r->out.disp_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "language_id", r->out.language_id);
+ ndr->depth++;
+ ndr_print_uint16(ndr, "language_id", *r->out.language_id);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int flags, const struct lsa_DeleteObject *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int flags, struct lsa_DeleteObject *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteObject *r)
+{
+ ndr_print_struct(ndr, name, "lsa_DeleteObject");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_DeleteObject");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_DeleteObject");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_EnumAccountsWithUserRight(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountsWithUserRight *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_unique_ptr(ndr, r->in.name));
+ if (r->in.name) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
+ }
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_EnumAccountsWithUserRight(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountsWithUserRight *r)
+{
+ uint32_t _ptr_name;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_name_0;
+ TALLOC_CTX *_mem_save_sids_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_generic_ptr(ndr, &_ptr_name));
+ if (_ptr_name) {
+ NDR_PULL_ALLOC(ndr, r->in.name);
+ } else {
+ r->in.name = NULL;
+ }
+ if (r->in.name) {
+ _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.name, 0);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
+ }
+ NDR_PULL_ALLOC(ndr, r->out.sids);
+ ZERO_STRUCTP(r->out.sids);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_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_EnumAccountsWithUserRight(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountsWithUserRight *r)
+{
+ ndr_print_struct(ndr, name, "lsa_EnumAccountsWithUserRight");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_EnumAccountsWithUserRight");
+ 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, "name", r->in.name);
+ ndr->depth++;
+ if (r->in.name) {
+ ndr_print_lsa_String(ndr, "name", r->in.name);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_EnumAccountsWithUserRight");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "sids", r->out.sids);
+ ndr->depth++;
+ ndr_print_lsa_SidArray(ndr, "sids", r->out.sids);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_EnumAccountRights(struct ndr_push *ndr, int flags, const struct lsa_EnumAccountRights *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.sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.rights == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rights));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_EnumAccountRights(struct ndr_pull *ndr, int flags, struct lsa_EnumAccountRights *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_sid_0;
+ TALLOC_CTX *_mem_save_rights_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.sid);
+ }
+ _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.rights);
+ ZERO_STRUCTP(r->out.rights);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.rights);
+ }
+ _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.rights, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rights));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_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_EnumAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountRights *r)
+{
+ ndr_print_struct(ndr, name, "lsa_EnumAccountRights");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_EnumAccountRights");
+ 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, "sid", r->in.sid);
+ ndr->depth++;
+ ndr_print_dom_sid2(ndr, "sid", r->in.sid);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_EnumAccountRights");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "rights", r->out.rights);
+ ndr->depth++;
+ ndr_print_lsa_RightSet(ndr, "rights", r->out.rights);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_AddAccountRights(struct ndr_push *ndr, int flags, const struct lsa_AddAccountRights *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.sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
+ if (r->in.rights == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_AddAccountRights(struct ndr_pull *ndr, int flags, struct lsa_AddAccountRights *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_sid_0;
+ TALLOC_CTX *_mem_save_rights_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 (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sid);
+ }
+ _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.rights);
+ }
+ _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.rights, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_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_AddAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddAccountRights *r)
+{
+ ndr_print_struct(ndr, name, "lsa_AddAccountRights");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_AddAccountRights");
+ 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, "sid", r->in.sid);
+ ndr->depth++;
+ ndr_print_dom_sid2(ndr, "sid", r->in.sid);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "rights", r->in.rights);
+ ndr->depth++;
+ ndr_print_lsa_RightSet(ndr, "rights", r->in.rights);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_AddAccountRights");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_RemoveAccountRights(struct ndr_push *ndr, int flags, const struct lsa_RemoveAccountRights *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.sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
+ if (r->in.rights == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_RemoveAccountRights(struct ndr_pull *ndr, int flags, struct lsa_RemoveAccountRights *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_sid_0;
+ TALLOC_CTX *_mem_save_rights_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 (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sid);
+ }
+ _mem_save_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.rights);
+ }
+ _mem_save_rights_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.rights, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_RightSet(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rights));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rights_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_RemoveAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemoveAccountRights *r)
+{
+ ndr_print_struct(ndr, name, "lsa_RemoveAccountRights");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_RemoveAccountRights");
+ 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, "sid", r->in.sid);
+ ndr->depth++;
+ ndr_print_dom_sid2(ndr, "sid", r->in.sid);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown", r->in.unknown);
+ ndr_print_ptr(ndr, "rights", r->in.rights);
+ ndr->depth++;
+ ndr_print_lsa_RightSet(ndr, "rights", r->in.rights);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_RemoveAccountRights");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_QueryTrustedDomainInfoBySid(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoBySid *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.dom_sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
+ NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_QueryTrustedDomainInfoBySid(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoBySid *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_dom_sid_0;
+ TALLOC_CTX *_mem_save_info_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.dom_sid);
+ }
+ _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r)
+{
+ ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfoBySid");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfoBySid");
+ 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, "dom_sid", r->in.dom_sid);
+ ndr->depth++;
+ ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
+ ndr->depth--;
+ ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfoBySid");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_SetTrustedDomainInfo(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfo *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_SetTrustedDomainInfo(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfo *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfo *r)
+{
+ ndr_print_struct(ndr, name, "lsa_SetTrustedDomainInfo");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_SetTrustedDomainInfo");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_SetTrustedDomainInfo");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_DeleteTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_DeleteTrustedDomain *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.dom_sid == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_DeleteTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_DeleteTrustedDomain *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_dom_sid_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 (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.dom_sid);
+ }
+ _mem_save_dom_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.dom_sid, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.dom_sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_sid_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_DeleteTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteTrustedDomain *r)
+{
+ ndr_print_struct(ndr, name, "lsa_DeleteTrustedDomain");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_DeleteTrustedDomain");
+ 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, "dom_sid", r->in.dom_sid);
+ ndr->depth++;
+ ndr_print_dom_sid2(ndr, "dom_sid", r->in.dom_sid);
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_DeleteTrustedDomain");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_StorePrivateData(struct ndr_push *ndr, int flags, const struct lsa_StorePrivateData *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_StorePrivateData(struct ndr_pull *ndr, int flags, struct lsa_StorePrivateData *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_StorePrivateData *r)
+{
+ ndr_print_struct(ndr, name, "lsa_StorePrivateData");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_StorePrivateData");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_StorePrivateData");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_RetrievePrivateData(struct ndr_push *ndr, int flags, const struct lsa_RetrievePrivateData *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_RetrievePrivateData(struct ndr_pull *ndr, int flags, struct lsa_RetrievePrivateData *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RetrievePrivateData *r)
+{
+ ndr_print_struct(ndr, name, "lsa_RetrievePrivateData");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_RetrievePrivateData");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_RetrievePrivateData");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, int flags, const struct lsa_OpenPolicy2 *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
+ if (r->in.system_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ if (r->in.attr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ 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_OpenPolicy2(struct ndr_pull *ndr, int flags, struct lsa_OpenPolicy2 *r)
+{
+ uint32_t _ptr_system_name;
+ TALLOC_CTX *_mem_save_system_name_0;
+ TALLOC_CTX *_mem_save_attr_0;
+ TALLOC_CTX *_mem_save_handle_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
+ if (_ptr_system_name) {
+ NDR_PULL_ALLOC(ndr, r->in.system_name);
+ } else {
+ r->in.system_name = NULL;
+ }
+ if (r->in.system_name) {
+ _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
+ if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_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->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.attr);
+ }
+ _mem_save_attr_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.attr, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_ObjectAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.attr));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_attr_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_PULL_ALLOC(ndr, r->out.handle);
+ ZERO_STRUCTP(r->out.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_OpenPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy2 *r)
+{
+ ndr_print_struct(ndr, name, "lsa_OpenPolicy2");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_OpenPolicy2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "system_name", r->in.system_name);
+ ndr->depth++;
+ if (r->in.system_name) {
+ ndr_print_string(ndr, "system_name", r->in.system_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "attr", r->in.attr);
+ ndr->depth++;
+ ndr_print_lsa_ObjectAttribute(ndr, "attr", r->in.attr);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_OpenPolicy2");
+ 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_GetUserName(struct ndr_push *ndr, int flags, const struct lsa_GetUserName *r)
+{
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
+ if (r->in.system_name) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.system_name, CH_UTF16)));
+ NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.system_name, ndr_charset_length(r->in.system_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.account_name));
+ if (r->in.account_name) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.authority_name));
+ if (r->in.authority_name) {
+ NDR_CHECK(ndr_push_lsa_StringPointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.authority_name));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.account_name));
+ if (r->out.account_name) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.account_name));
+ }
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.authority_name));
+ if (r->out.authority_name) {
+ NDR_CHECK(ndr_push_lsa_StringPointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.authority_name));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_GetUserName(struct ndr_pull *ndr, int flags, struct lsa_GetUserName *r)
+{
+ uint32_t _ptr_system_name;
+ uint32_t _ptr_account_name;
+ uint32_t _ptr_authority_name;
+ TALLOC_CTX *_mem_save_system_name_0;
+ TALLOC_CTX *_mem_save_account_name_0;
+ TALLOC_CTX *_mem_save_authority_name_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
+ if (_ptr_system_name) {
+ NDR_PULL_ALLOC(ndr, r->in.system_name);
+ } else {
+ r->in.system_name = NULL;
+ }
+ if (r->in.system_name) {
+ _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
+ NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
+ if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_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->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
+ }
+ NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
+ if (_ptr_account_name) {
+ NDR_PULL_ALLOC(ndr, r->in.account_name);
+ } else {
+ r->in.account_name = NULL;
+ }
+ if (r->in.account_name) {
+ _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.account_name, 0);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.account_name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
+ if (_ptr_authority_name) {
+ NDR_PULL_ALLOC(ndr, r->in.authority_name);
+ } else {
+ r->in.authority_name = NULL;
+ }
+ if (r->in.authority_name) {
+ _mem_save_authority_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.authority_name, 0);
+ NDR_CHECK(ndr_pull_lsa_StringPointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.authority_name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_account_name));
+ if (_ptr_account_name) {
+ NDR_PULL_ALLOC(ndr, r->out.account_name);
+ } else {
+ r->out.account_name = NULL;
+ }
+ if (r->out.account_name) {
+ _mem_save_account_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.account_name, 0);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.account_name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_account_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_authority_name));
+ if (_ptr_authority_name) {
+ NDR_PULL_ALLOC(ndr, r->out.authority_name);
+ } else {
+ r->out.authority_name = NULL;
+ }
+ if (r->out.authority_name) {
+ _mem_save_authority_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.authority_name, 0);
+ NDR_CHECK(ndr_pull_lsa_StringPointer(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.authority_name));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_authority_name_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetUserName *r)
+{
+ ndr_print_struct(ndr, name, "lsa_GetUserName");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_GetUserName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "system_name", r->in.system_name);
+ ndr->depth++;
+ if (r->in.system_name) {
+ ndr_print_string(ndr, "system_name", r->in.system_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "account_name", r->in.account_name);
+ ndr->depth++;
+ if (r->in.account_name) {
+ ndr_print_lsa_String(ndr, "account_name", r->in.account_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "authority_name", r->in.authority_name);
+ ndr->depth++;
+ if (r->in.authority_name) {
+ ndr_print_lsa_StringPointer(ndr, "authority_name", r->in.authority_name);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_GetUserName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "account_name", r->out.account_name);
+ ndr->depth++;
+ if (r->out.account_name) {
+ ndr_print_lsa_String(ndr, "account_name", r->out.account_name);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "authority_name", r->out.authority_name);
+ ndr->depth++;
+ if (r->out.authority_name) {
+ ndr_print_lsa_StringPointer(ndr, "authority_name", r->out.authority_name);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_QueryInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_QueryInfoPolicy2 *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_uint16(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_QueryInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_QueryInfoPolicy2 *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_info_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_uint16(ndr, NDR_SCALARS, &r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_lsa_PolicyInformation(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy2 *r)
+{
+ ndr_print_struct(ndr, name, "lsa_QueryInfoPolicy2");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_QueryInfoPolicy2");
+ 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_uint16(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_QueryInfoPolicy2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_lsa_PolicyInformation(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_SetInfoPolicy2(struct ndr_push *ndr, int flags, const struct lsa_SetInfoPolicy2 *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_SetInfoPolicy2(struct ndr_pull *ndr, int flags, struct lsa_SetInfoPolicy2 *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SetInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy2 *r)
+{
+ ndr_print_struct(ndr, name, "lsa_SetInfoPolicy2");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_SetInfoPolicy2");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_SetInfoPolicy2");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_QueryTrustedDomainInfoByName *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_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
+ NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoByName *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_info_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_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
+ NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoByName *r)
+{
+ ndr_print_struct(ndr, name, "lsa_QueryTrustedDomainInfoByName");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_QueryTrustedDomainInfoByName");
+ 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_lsa_String(ndr, "trusted_domain", &r->in.trusted_domain);
+ ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_QueryTrustedDomainInfoByName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_SetTrustedDomainInfoByName(struct ndr_push *ndr, int flags, const struct lsa_SetTrustedDomainInfoByName *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_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
+ NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
+ if (r->in.info) {
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
+ NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_SetTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_SetTrustedDomainInfoByName *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_info_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);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
+ NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->in.info);
+ } else {
+ r->in.info = NULL;
+ }
+ if (r->in.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
+ NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfoByName *r)
+{
+ ndr_print_struct(ndr, name, "lsa_SetTrustedDomainInfoByName");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_SetTrustedDomainInfoByName");
+ 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_lsa_String(ndr, "trusted_domain", &r->in.trusted_domain);
+ ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "info", r->in.info);
+ ndr->depth++;
+ if (r->in.info) {
+ ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
+ ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->in.info);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_SetTrustedDomainInfoByName");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_EnumTrustedDomainsEx(struct ndr_push *ndr, int flags, const struct lsa_EnumTrustedDomainsEx *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_size));
+ }
+ 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.domains == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_DomainListEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_EnumTrustedDomainsEx(struct ndr_pull *ndr, int flags, struct lsa_EnumTrustedDomainsEx *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_resume_handle_0;
+ TALLOC_CTX *_mem_save_domains_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_size));
+ NDR_PULL_ALLOC(ndr, r->out.resume_handle);
+ *r->out.resume_handle = *r->in.resume_handle;
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ ZERO_STRUCTP(r->out.domains);
+ }
+ 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.domains);
+ }
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_DomainListEx(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_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_EnumTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustedDomainsEx *r)
+{
+ ndr_print_struct(ndr, name, "lsa_EnumTrustedDomainsEx");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_EnumTrustedDomainsEx");
+ 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_size", r->in.max_size);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_EnumTrustedDomainsEx");
+ 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, "domains", r->out.domains);
+ ndr->depth++;
+ ndr_print_lsa_DomainListEx(ndr, "domains", r->out.domains);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CreateTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CreateTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CreateTrustedDomainEx");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CloseTrustedDomainEx(struct ndr_push *ndr, int flags, const struct lsa_CloseTrustedDomainEx *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_CloseTrustedDomainEx(struct ndr_pull *ndr, int flags, struct lsa_CloseTrustedDomainEx *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_CloseTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CloseTrustedDomainEx *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CloseTrustedDomainEx");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CloseTrustedDomainEx");
+ 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_CloseTrustedDomainEx");
+ 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_QueryDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_QueryDomainInformationPolicy *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_uint16(ndr, NDR_SCALARS, r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
+ if (r->out.info) {
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ }
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_QueryDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_QueryDomainInformationPolicy *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_info_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_uint16(ndr, NDR_SCALARS, &r->in.level));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ } else {
+ r->out.info = NULL;
+ }
+ if (r->out.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryDomainInformationPolicy *r)
+{
+ ndr_print_struct(ndr, name, "lsa_QueryDomainInformationPolicy");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_QueryDomainInformationPolicy");
+ 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_uint16(ndr, "level", r->in.level);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_QueryDomainInformationPolicy");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "info", r->out.info);
+ ndr->depth++;
+ if (r->out.info) {
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_lsa_DomainInformationPolicy(ndr, "info", r->out.info);
+ }
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_SetDomainInformationPolicy(struct ndr_push *ndr, int flags, const struct lsa_SetDomainInformationPolicy *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_uint16(ndr, NDR_SCALARS, r->in.level));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
+ if (r->in.info) {
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
+ NDR_CHECK(ndr_push_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_SetDomainInformationPolicy(struct ndr_pull *ndr, int flags, struct lsa_SetDomainInformationPolicy *r)
+{
+ uint32_t _ptr_info;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_info_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);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, r->in.info);
+ } else {
+ r->in.info = NULL;
+ }
+ if (r->in.info) {
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
+ NDR_CHECK(ndr_pull_lsa_DomainInformationPolicy(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetDomainInformationPolicy *r)
+{
+ ndr_print_struct(ndr, name, "lsa_SetDomainInformationPolicy");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_SetDomainInformationPolicy");
+ 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_uint16(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "info", r->in.info);
+ ndr->depth++;
+ if (r->in.info) {
+ ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
+ ndr_print_lsa_DomainInformationPolicy(ndr, "info", r->in.info);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_SetDomainInformationPolicy");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_OpenTrustedDomainByName(struct ndr_push *ndr, int flags, const struct lsa_OpenTrustedDomainByName *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_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
+ }
+ if (flags & NDR_OUT) {
+ if (r->out.trustdom_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trustdom_handle));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_OpenTrustedDomainByName(struct ndr_pull *ndr, int flags, struct lsa_OpenTrustedDomainByName *r)
+{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_trustdom_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_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
+ NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
+ ZERO_STRUCTP(r->out.trustdom_handle);
+ }
+ if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.trustdom_handle);
+ }
+ _mem_save_trustdom_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.trustdom_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.trustdom_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trustdom_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_OpenTrustedDomainByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomainByName *r)
+{
+ ndr_print_struct(ndr, name, "lsa_OpenTrustedDomainByName");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_OpenTrustedDomainByName");
+ 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_lsa_String(ndr, "name", &r->in.name);
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_OpenTrustedDomainByName");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "trustdom_handle", r->out.trustdom_handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "trustdom_handle", r->out.trustdom_handle);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_TestCall(struct ndr_push *ndr, int flags, const struct lsa_TestCall *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_TestCall(struct ndr_pull *ndr, int flags, struct lsa_TestCall *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct lsa_TestCall *r)
+{
+ ndr_print_struct(ndr, name, "lsa_TestCall");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_TestCall");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_TestCall");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LookupSids2(struct ndr_push *ndr, int flags, const struct lsa_LookupSids2 *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.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ if (r->in.names == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
+ if (r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ }
+ if (r->out.names == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
+ if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LookupSids2(struct ndr_pull *ndr, int flags, struct lsa_LookupSids2 *r)
+{
+ uint32_t _ptr_domains;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_sids_0;
+ TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_names_0;
+ TALLOC_CTX *_mem_save_count_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.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.names);
+ }
+ _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.names);
+ *r->out.names = *r->in.names;
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ *r->out.count = *r->in.count;
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
+ if (_ptr_domains) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ } else {
+ r->out.domains = NULL;
+ }
+ if (r->out.domains) {
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.names);
+ }
+ _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_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_LookupSids2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids2 *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LookupSids2");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LookupSids2");
+ 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, "sids", r->in.sids);
+ ndr->depth++;
+ ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "names", r->in.names);
+ ndr->depth++;
+ ndr_print_lsa_TransNameArray2(ndr, "names", r->in.names);
+ ndr->depth--;
+ ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "count", r->in.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->in.count);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
+ ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LookupSids2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "domains", r->out.domains);
+ ndr->depth++;
+ if (r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "names", r->out.names);
+ ndr->depth++;
+ ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "count", r->out.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->out.count);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LookupNames2(struct ndr_push *ndr, int flags, const struct lsa_LookupNames2 *r)
+{
+ uint32_t cntr_names_0;
+ 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_uint32(ndr, NDR_SCALARS, r->in.num_names));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
+ }
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
+ }
+ if (r->in.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
+ if (r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ }
+ if (r->out.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
+ if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LookupNames2(struct ndr_pull *ndr, int flags, struct lsa_LookupNames2 *r)
+{
+ uint32_t cntr_names_0;
+ uint32_t _ptr_domains;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_names_0;
+ TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_sids_0;
+ TALLOC_CTX *_mem_save_count_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_uint32(ndr, NDR_SCALARS, &r->in.num_names));
+ if (r->in.num_names < 0 || r->in.num_names > 1000) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
+ NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
+ _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
+ }
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.sids);
+ *r->out.sids = *r->in.sids;
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ *r->out.count = *r->in.count;
+ if (r->in.names) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
+ if (_ptr_domains) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ } else {
+ r->out.domains = NULL;
+ }
+ if (r->out.domains) {
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransSidArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_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_LookupNames2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames2 *r)
+{
+ uint32_t cntr_names_0;
+ ndr_print_struct(ndr, name, "lsa_LookupNames2");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LookupNames2");
+ 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_uint32(ndr, "num_names", r->in.num_names);
+ ndr->print(ndr, "%s: ARRAY(%d)", "names", r->in.num_names);
+ ndr->depth++;
+ for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_names_0);
+ if (idx_0) {
+ ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "sids", r->in.sids);
+ ndr->depth++;
+ ndr_print_lsa_TransSidArray2(ndr, "sids", r->in.sids);
+ ndr->depth--;
+ ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "count", r->in.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->in.count);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
+ ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LookupNames2");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "domains", r->out.domains);
+ ndr->depth++;
+ if (r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "sids", r->out.sids);
+ ndr->depth++;
+ ndr_print_lsa_TransSidArray2(ndr, "sids", r->out.sids);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "count", r->out.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->out.count);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CreateTrustedDomainEx2(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CreateTrustedDomainEx2(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomainEx2 *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx2 *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CreateTrustedDomainEx2");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomainEx2");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CreateTrustedDomainEx2");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CREDRWRITE(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CREDRWRITE(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_CREDRWRITE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITE *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CREDRWRITE");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CREDRWRITE");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CREDRWRITE");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CREDRREAD(struct ndr_push *ndr, int flags, const struct lsa_CREDRREAD *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CREDRREAD(struct ndr_pull *ndr, int flags, struct lsa_CREDRREAD *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_CREDRREAD(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREAD *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CREDRREAD");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CREDRREAD");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CREDRREAD");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CREDRENUMERATE(struct ndr_push *ndr, int flags, const struct lsa_CREDRENUMERATE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CREDRENUMERATE(struct ndr_pull *ndr, int flags, struct lsa_CREDRENUMERATE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_CREDRENUMERATE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRENUMERATE *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CREDRENUMERATE");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CREDRENUMERATE");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CREDRENUMERATE");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CREDRWRITEDOMAINCREDENTIALS");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CREDRWRITEDOMAINCREDENTIALS");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CREDRWRITEDOMAINCREDENTIALS");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_push *ndr, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_pull *ndr, int flags, struct lsa_CREDRREADDOMAINCREDENTIALS *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CREDRREADDOMAINCREDENTIALS");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CREDRREADDOMAINCREDENTIALS");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CREDRREADDOMAINCREDENTIALS");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CREDRDELETE(struct ndr_push *ndr, int flags, const struct lsa_CREDRDELETE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CREDRDELETE(struct ndr_pull *ndr, int flags, struct lsa_CREDRDELETE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_CREDRDELETE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRDELETE *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CREDRDELETE");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CREDRDELETE");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CREDRDELETE");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CREDRGETTARGETINFO(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETTARGETINFO *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CREDRGETTARGETINFO(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETTARGETINFO *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETTARGETINFO *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CREDRGETTARGETINFO");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CREDRGETTARGETINFO");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CREDRGETTARGETINFO");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CREDRPROFILELOADED(struct ndr_push *ndr, int flags, const struct lsa_CREDRPROFILELOADED *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CREDRPROFILELOADED(struct ndr_pull *ndr, int flags, struct lsa_CREDRPROFILELOADED *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRPROFILELOADED *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CREDRPROFILELOADED");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CREDRPROFILELOADED");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CREDRPROFILELOADED");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LookupNames3(struct ndr_push *ndr, int flags, const struct lsa_LookupNames3 *r)
+{
+ uint32_t cntr_names_0;
+ 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_uint32(ndr, NDR_SCALARS, r->in.num_names));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
+ }
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
+ }
+ if (r->in.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
+ if (r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ }
+ if (r->out.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
+ if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LookupNames3(struct ndr_pull *ndr, int flags, struct lsa_LookupNames3 *r)
+{
+ uint32_t cntr_names_0;
+ uint32_t _ptr_domains;
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_names_0;
+ TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_sids_0;
+ TALLOC_CTX *_mem_save_count_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_uint32(ndr, NDR_SCALARS, &r->in.num_names));
+ if (r->in.num_names < 0 || r->in.num_names > 1000) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
+ NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
+ _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
+ }
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.sids);
+ *r->out.sids = *r->in.sids;
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ *r->out.count = *r->in.count;
+ if (r->in.names) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
+ if (_ptr_domains) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ } else {
+ r->out.domains = NULL;
+ }
+ if (r->out.domains) {
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_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_LookupNames3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames3 *r)
+{
+ uint32_t cntr_names_0;
+ ndr_print_struct(ndr, name, "lsa_LookupNames3");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LookupNames3");
+ 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_uint32(ndr, "num_names", r->in.num_names);
+ ndr->print(ndr, "%s: ARRAY(%d)", "names", r->in.num_names);
+ ndr->depth++;
+ for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_names_0);
+ if (idx_0) {
+ ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "sids", r->in.sids);
+ ndr->depth++;
+ ndr_print_lsa_TransSidArray3(ndr, "sids", r->in.sids);
+ ndr->depth--;
+ ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "count", r->in.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->in.count);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
+ ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LookupNames3");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "domains", r->out.domains);
+ ndr->depth++;
+ if (r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "sids", r->out.sids);
+ ndr->depth++;
+ ndr_print_lsa_TransSidArray3(ndr, "sids", r->out.sids);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "count", r->out.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->out.count);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CREDRGETSESSIONTYPES(struct ndr_push *ndr, int flags, const struct lsa_CREDRGETSESSIONTYPES *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CREDRGETSESSIONTYPES(struct ndr_pull *ndr, int flags, struct lsa_CREDRGETSESSIONTYPES *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETSESSIONTYPES *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CREDRGETSESSIONTYPES");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CREDRGETSESSIONTYPES");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CREDRGETSESSIONTYPES");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LSARREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LSARREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARREGISTERAUDITEVENT *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LSARREGISTERAUDITEVENT");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LSARREGISTERAUDITEVENT");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LSARREGISTERAUDITEVENT");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LSARGENAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARGENAUDITEVENT *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LSARGENAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARGENAUDITEVENT *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARGENAUDITEVENT *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LSARGENAUDITEVENT");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LSARGENAUDITEVENT");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LSARGENAUDITEVENT");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARUNREGISTERAUDITEVENT *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LSARUNREGISTERAUDITEVENT");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LSARUNREGISTERAUDITEVENT");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LSARUNREGISTERAUDITEVENT");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LSARQUERYFORESTTRUSTINFORMATION");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LSARQUERYFORESTTRUSTINFORMATION");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LSARQUERYFORESTTRUSTINFORMATION");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_push *ndr, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_pull *ndr, int flags, struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LSARSETFORESTTRUSTINFORMATION");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LSARSETFORESTTRUSTINFORMATION");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LSARSETFORESTTRUSTINFORMATION");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_CREDRRENAME(struct ndr_push *ndr, int flags, const struct lsa_CREDRRENAME *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_CREDRRENAME(struct ndr_pull *ndr, int flags, struct lsa_CREDRRENAME *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_CREDRRENAME(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRRENAME *r)
+{
+ ndr_print_struct(ndr, name, "lsa_CREDRRENAME");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_CREDRRENAME");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_CREDRRENAME");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LookupSids3(struct ndr_push *ndr, int flags, const struct lsa_LookupSids3 *r)
+{
+ if (flags & NDR_IN) {
+ if (r->in.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ if (r->in.names == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
+ if (r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ }
+ if (r->out.names == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
+ if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LookupSids3(struct ndr_pull *ndr, int flags, struct lsa_LookupSids3 *r)
+{
+ uint32_t _ptr_domains;
+ TALLOC_CTX *_mem_save_sids_0;
+ TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_names_0;
+ TALLOC_CTX *_mem_save_count_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.names);
+ }
+ _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.names, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.names);
+ *r->out.names = *r->in.names;
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ *r->out.count = *r->in.count;
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
+ if (_ptr_domains) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ } else {
+ r->out.domains = NULL;
+ }
+ if (r->out.domains) {
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.names);
+ }
+ _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.names, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransNameArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.names));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_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_LookupSids3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids3 *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LookupSids3");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LookupSids3");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "sids", r->in.sids);
+ ndr->depth++;
+ ndr_print_lsa_SidArray(ndr, "sids", r->in.sids);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "names", r->in.names);
+ ndr->depth++;
+ ndr_print_lsa_TransNameArray2(ndr, "names", r->in.names);
+ ndr->depth--;
+ ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "count", r->in.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->in.count);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
+ ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LookupSids3");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "domains", r->out.domains);
+ ndr->depth++;
+ if (r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "names", r->out.names);
+ ndr->depth++;
+ ndr_print_lsa_TransNameArray2(ndr, "names", r->out.names);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "count", r->out.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->out.count);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LookupNames4(struct ndr_push *ndr, int flags, const struct lsa_LookupNames4 *r)
+{
+ uint32_t cntr_names_0;
+ if (flags & NDR_IN) {
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_names));
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
+ }
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
+ }
+ if (r->in.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.level));
+ if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown1));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.domains));
+ if (r->out.domains) {
+ NDR_CHECK(ndr_push_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ }
+ if (r->out.sids == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
+ if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LookupNames4(struct ndr_pull *ndr, int flags, struct lsa_LookupNames4 *r)
+{
+ uint32_t cntr_names_0;
+ uint32_t _ptr_domains;
+ TALLOC_CTX *_mem_save_names_0;
+ TALLOC_CTX *_mem_save_domains_0;
+ TALLOC_CTX *_mem_save_sids_0;
+ TALLOC_CTX *_mem_save_count_0;
+ if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_names));
+ if (r->in.num_names < 0 || r->in.num_names > 1000) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
+ NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
+ _mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
+ }
+ for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.level));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown1));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
+ NDR_PULL_ALLOC(ndr, r->out.sids);
+ *r->out.sids = *r->in.sids;
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ *r->out.count = *r->in.count;
+ if (r->in.names) {
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.names, r->in.num_names));
+ }
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domains));
+ if (_ptr_domains) {
+ NDR_PULL_ALLOC(ndr, r->out.domains);
+ } else {
+ r->out.domains = NULL;
+ }
+ if (r->out.domains) {
+ _mem_save_domains_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.domains, 0);
+ NDR_CHECK(ndr_pull_lsa_RefDomainList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.domains));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domains_0, 0);
+ }
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.sids);
+ }
+ _mem_save_sids_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.sids, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_TransSidArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sids_0, LIBNDR_FLAG_REF_ALLOC);
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.count);
+ }
+ _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_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_LookupNames4(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames4 *r)
+{
+ uint32_t cntr_names_0;
+ ndr_print_struct(ndr, name, "lsa_LookupNames4");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LookupNames4");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "num_names", r->in.num_names);
+ ndr->print(ndr, "%s: ARRAY(%d)", "names", r->in.num_names);
+ ndr->depth++;
+ for (cntr_names_0=0;cntr_names_0<r->in.num_names;cntr_names_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_names_0);
+ if (idx_0) {
+ ndr_print_lsa_String(ndr, "names", &r->in.names[cntr_names_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "sids", r->in.sids);
+ ndr->depth++;
+ ndr_print_lsa_TransSidArray3(ndr, "sids", r->in.sids);
+ ndr->depth--;
+ ndr_print_uint16(ndr, "level", r->in.level);
+ ndr_print_ptr(ndr, "count", r->in.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->in.count);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "unknown1", r->in.unknown1);
+ ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LookupNames4");
+ ndr->depth++;
+ ndr_print_ptr(ndr, "domains", r->out.domains);
+ ndr->depth++;
+ if (r->out.domains) {
+ ndr_print_lsa_RefDomainList(ndr, "domains", r->out.domains);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "sids", r->out.sids);
+ ndr->depth++;
+ ndr_print_lsa_TransSidArray3(ndr, "sids", r->out.sids);
+ ndr->depth--;
+ ndr_print_ptr(ndr, "count", r->out.count);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "count", *r->out.count);
+ ndr->depth--;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LSAROPENPOLICYSCE(struct ndr_push *ndr, int flags, const struct lsa_LSAROPENPOLICYSCE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LSAROPENPOLICYSCE(struct ndr_pull *ndr, int flags, struct lsa_LSAROPENPOLICYSCE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSAROPENPOLICYSCE *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LSAROPENPOLICYSCE");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LSAROPENPOLICYSCE");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LSAROPENPOLICYSCE");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LSARADTREGISTERSECURITYEVENTSOURCE");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_push *ndr, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_pull *ndr, int flags, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+NTSTATUS ndr_push_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_push *ndr, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_pull *ndr, int flags, struct lsa_LSARADTREPORTSECURITYEVENT *r)
+{
+ if (flags & NDR_IN) {
+ }
+ if (flags & NDR_OUT) {
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
+ }
+ return NT_STATUS_OK;
+}
+
+_PUBLIC_ void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r)
+{
+ ndr_print_struct(ndr, name, "lsa_LSARADTREPORTSECURITYEVENT");
+ ndr->depth++;
+ if (flags & NDR_SET_VALUES) {
+ ndr->flags |= LIBNDR_PRINT_SET_VALUES;
+ }
+ if (flags & NDR_IN) {
+ ndr_print_struct(ndr, "in", "lsa_LSARADTREPORTSECURITYEVENT");
+ ndr->depth++;
+ ndr->depth--;
+ }
+ if (flags & NDR_OUT) {
+ ndr_print_struct(ndr, "out", "lsa_LSARADTREPORTSECURITYEVENT");
+ ndr->depth++;
+ ndr_print_NTSTATUS(ndr, "result", r->out.result);
+ ndr->depth--;
+ }
+ ndr->depth--;
+}
+
+const struct dcerpc_interface_call lsarpc_calls[] = {
+ {
+ "lsa_Close",
+ sizeof(struct lsa_Close),
+ (ndr_push_flags_fn_t) ndr_push_lsa_Close,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_Close,
+ (ndr_print_function_t) ndr_print_lsa_Close,
+ False,
+ },
+ {
+ "lsa_Delete",
+ sizeof(struct lsa_Delete),
+ (ndr_push_flags_fn_t) ndr_push_lsa_Delete,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_Delete,
+ (ndr_print_function_t) ndr_print_lsa_Delete,
+ False,
+ },
+ {
+ "lsa_EnumPrivs",
+ sizeof(struct lsa_EnumPrivs),
+ (ndr_push_flags_fn_t) ndr_push_lsa_EnumPrivs,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumPrivs,
+ (ndr_print_function_t) ndr_print_lsa_EnumPrivs,
+ False,
+ },
+ {
+ "lsa_QuerySecurity",
+ sizeof(struct lsa_QuerySecurity),
+ (ndr_push_flags_fn_t) ndr_push_lsa_QuerySecurity,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_QuerySecurity,
+ (ndr_print_function_t) ndr_print_lsa_QuerySecurity,
+ False,
+ },
+ {
+ "lsa_SetSecObj",
+ sizeof(struct lsa_SetSecObj),
+ (ndr_push_flags_fn_t) ndr_push_lsa_SetSecObj,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSecObj,
+ (ndr_print_function_t) ndr_print_lsa_SetSecObj,
+ False,
+ },
+ {
+ "lsa_ChangePassword",
+ sizeof(struct lsa_ChangePassword),
+ (ndr_push_flags_fn_t) ndr_push_lsa_ChangePassword,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_ChangePassword,
+ (ndr_print_function_t) ndr_print_lsa_ChangePassword,
+ False,
+ },
+ {
+ "lsa_OpenPolicy",
+ sizeof(struct lsa_OpenPolicy),
+ (ndr_push_flags_fn_t) ndr_push_lsa_OpenPolicy,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenPolicy,
+ (ndr_print_function_t) ndr_print_lsa_OpenPolicy,
+ False,
+ },
+ {
+ "lsa_QueryInfoPolicy",
+ sizeof(struct lsa_QueryInfoPolicy),
+ (ndr_push_flags_fn_t) ndr_push_lsa_QueryInfoPolicy,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryInfoPolicy,
+ (ndr_print_function_t) ndr_print_lsa_QueryInfoPolicy,
+ False,
+ },
+ {
+ "lsa_SetInfoPolicy",
+ sizeof(struct lsa_SetInfoPolicy),
+ (ndr_push_flags_fn_t) ndr_push_lsa_SetInfoPolicy,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInfoPolicy,
+ (ndr_print_function_t) ndr_print_lsa_SetInfoPolicy,
+ False,
+ },
+ {
+ "lsa_ClearAuditLog",
+ sizeof(struct lsa_ClearAuditLog),
+ (ndr_push_flags_fn_t) ndr_push_lsa_ClearAuditLog,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_ClearAuditLog,
+ (ndr_print_function_t) ndr_print_lsa_ClearAuditLog,
+ False,
+ },
+ {
+ "lsa_CreateAccount",
+ sizeof(struct lsa_CreateAccount),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CreateAccount,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateAccount,
+ (ndr_print_function_t) ndr_print_lsa_CreateAccount,
+ False,
+ },
+ {
+ "lsa_EnumAccounts",
+ sizeof(struct lsa_EnumAccounts),
+ (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccounts,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccounts,
+ (ndr_print_function_t) ndr_print_lsa_EnumAccounts,
+ False,
+ },
+ {
+ "lsa_CreateTrustedDomain",
+ sizeof(struct lsa_CreateTrustedDomain),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomain,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomain,
+ (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomain,
+ False,
+ },
+ {
+ "lsa_EnumTrustDom",
+ sizeof(struct lsa_EnumTrustDom),
+ (ndr_push_flags_fn_t) ndr_push_lsa_EnumTrustDom,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumTrustDom,
+ (ndr_print_function_t) ndr_print_lsa_EnumTrustDom,
+ False,
+ },
+ {
+ "lsa_LookupNames",
+ sizeof(struct lsa_LookupNames),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames,
+ (ndr_print_function_t) ndr_print_lsa_LookupNames,
+ False,
+ },
+ {
+ "lsa_LookupSids",
+ sizeof(struct lsa_LookupSids),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids,
+ (ndr_print_function_t) ndr_print_lsa_LookupSids,
+ False,
+ },
+ {
+ "lsa_CreateSecret",
+ sizeof(struct lsa_CreateSecret),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CreateSecret,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateSecret,
+ (ndr_print_function_t) ndr_print_lsa_CreateSecret,
+ False,
+ },
+ {
+ "lsa_OpenAccount",
+ sizeof(struct lsa_OpenAccount),
+ (ndr_push_flags_fn_t) ndr_push_lsa_OpenAccount,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenAccount,
+ (ndr_print_function_t) ndr_print_lsa_OpenAccount,
+ False,
+ },
+ {
+ "lsa_EnumPrivsAccount",
+ sizeof(struct lsa_EnumPrivsAccount),
+ (ndr_push_flags_fn_t) ndr_push_lsa_EnumPrivsAccount,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumPrivsAccount,
+ (ndr_print_function_t) ndr_print_lsa_EnumPrivsAccount,
+ False,
+ },
+ {
+ "lsa_AddPrivilegesToAccount",
+ sizeof(struct lsa_AddPrivilegesToAccount),
+ (ndr_push_flags_fn_t) ndr_push_lsa_AddPrivilegesToAccount,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_AddPrivilegesToAccount,
+ (ndr_print_function_t) ndr_print_lsa_AddPrivilegesToAccount,
+ False,
+ },
+ {
+ "lsa_RemovePrivilegesFromAccount",
+ sizeof(struct lsa_RemovePrivilegesFromAccount),
+ (ndr_push_flags_fn_t) ndr_push_lsa_RemovePrivilegesFromAccount,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_RemovePrivilegesFromAccount,
+ (ndr_print_function_t) ndr_print_lsa_RemovePrivilegesFromAccount,
+ False,
+ },
+ {
+ "lsa_GetQuotasForAccount",
+ sizeof(struct lsa_GetQuotasForAccount),
+ (ndr_push_flags_fn_t) ndr_push_lsa_GetQuotasForAccount,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_GetQuotasForAccount,
+ (ndr_print_function_t) ndr_print_lsa_GetQuotasForAccount,
+ False,
+ },
+ {
+ "lsa_SetQuotasForAccount",
+ sizeof(struct lsa_SetQuotasForAccount),
+ (ndr_push_flags_fn_t) ndr_push_lsa_SetQuotasForAccount,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_SetQuotasForAccount,
+ (ndr_print_function_t) ndr_print_lsa_SetQuotasForAccount,
+ False,
+ },
+ {
+ "lsa_GetSystemAccessAccount",
+ sizeof(struct lsa_GetSystemAccessAccount),
+ (ndr_push_flags_fn_t) ndr_push_lsa_GetSystemAccessAccount,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_GetSystemAccessAccount,
+ (ndr_print_function_t) ndr_print_lsa_GetSystemAccessAccount,
+ False,
+ },
+ {
+ "lsa_SetSystemAccessAccount",
+ sizeof(struct lsa_SetSystemAccessAccount),
+ (ndr_push_flags_fn_t) ndr_push_lsa_SetSystemAccessAccount,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSystemAccessAccount,
+ (ndr_print_function_t) ndr_print_lsa_SetSystemAccessAccount,
+ False,
+ },
+ {
+ "lsa_OpenTrustedDomain",
+ sizeof(struct lsa_OpenTrustedDomain),
+ (ndr_push_flags_fn_t) ndr_push_lsa_OpenTrustedDomain,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenTrustedDomain,
+ (ndr_print_function_t) ndr_print_lsa_OpenTrustedDomain,
+ False,
+ },
+ {
+ "lsa_QueryTrustedDomainInfo",
+ sizeof(struct lsa_QueryTrustedDomainInfo),
+ (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfo,
+ (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfo,
+ False,
+ },
+ {
+ "lsa_SetInformationTrustedDomain",
+ sizeof(struct lsa_SetInformationTrustedDomain),
+ (ndr_push_flags_fn_t) ndr_push_lsa_SetInformationTrustedDomain,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInformationTrustedDomain,
+ (ndr_print_function_t) ndr_print_lsa_SetInformationTrustedDomain,
+ False,
+ },
+ {
+ "lsa_OpenSecret",
+ sizeof(struct lsa_OpenSecret),
+ (ndr_push_flags_fn_t) ndr_push_lsa_OpenSecret,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenSecret,
+ (ndr_print_function_t) ndr_print_lsa_OpenSecret,
+ False,
+ },
+ {
+ "lsa_SetSecret",
+ sizeof(struct lsa_SetSecret),
+ (ndr_push_flags_fn_t) ndr_push_lsa_SetSecret,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_SetSecret,
+ (ndr_print_function_t) ndr_print_lsa_SetSecret,
+ False,
+ },
+ {
+ "lsa_QuerySecret",
+ sizeof(struct lsa_QuerySecret),
+ (ndr_push_flags_fn_t) ndr_push_lsa_QuerySecret,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_QuerySecret,
+ (ndr_print_function_t) ndr_print_lsa_QuerySecret,
+ False,
+ },
+ {
+ "lsa_LookupPrivValue",
+ sizeof(struct lsa_LookupPrivValue),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivValue,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivValue,
+ (ndr_print_function_t) ndr_print_lsa_LookupPrivValue,
+ False,
+ },
+ {
+ "lsa_LookupPrivName",
+ sizeof(struct lsa_LookupPrivName),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivName,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivName,
+ (ndr_print_function_t) ndr_print_lsa_LookupPrivName,
+ False,
+ },
+ {
+ "lsa_LookupPrivDisplayName",
+ sizeof(struct lsa_LookupPrivDisplayName),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LookupPrivDisplayName,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupPrivDisplayName,
+ (ndr_print_function_t) ndr_print_lsa_LookupPrivDisplayName,
+ False,
+ },
+ {
+ "lsa_DeleteObject",
+ sizeof(struct lsa_DeleteObject),
+ (ndr_push_flags_fn_t) ndr_push_lsa_DeleteObject,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_DeleteObject,
+ (ndr_print_function_t) ndr_print_lsa_DeleteObject,
+ False,
+ },
+ {
+ "lsa_EnumAccountsWithUserRight",
+ sizeof(struct lsa_EnumAccountsWithUserRight),
+ (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccountsWithUserRight,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccountsWithUserRight,
+ (ndr_print_function_t) ndr_print_lsa_EnumAccountsWithUserRight,
+ False,
+ },
+ {
+ "lsa_EnumAccountRights",
+ sizeof(struct lsa_EnumAccountRights),
+ (ndr_push_flags_fn_t) ndr_push_lsa_EnumAccountRights,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumAccountRights,
+ (ndr_print_function_t) ndr_print_lsa_EnumAccountRights,
+ False,
+ },
+ {
+ "lsa_AddAccountRights",
+ sizeof(struct lsa_AddAccountRights),
+ (ndr_push_flags_fn_t) ndr_push_lsa_AddAccountRights,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_AddAccountRights,
+ (ndr_print_function_t) ndr_print_lsa_AddAccountRights,
+ False,
+ },
+ {
+ "lsa_RemoveAccountRights",
+ sizeof(struct lsa_RemoveAccountRights),
+ (ndr_push_flags_fn_t) ndr_push_lsa_RemoveAccountRights,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_RemoveAccountRights,
+ (ndr_print_function_t) ndr_print_lsa_RemoveAccountRights,
+ False,
+ },
+ {
+ "lsa_QueryTrustedDomainInfoBySid",
+ sizeof(struct lsa_QueryTrustedDomainInfoBySid),
+ (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfoBySid,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfoBySid,
+ (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfoBySid,
+ False,
+ },
+ {
+ "lsa_SetTrustedDomainInfo",
+ sizeof(struct lsa_SetTrustedDomainInfo),
+ (ndr_push_flags_fn_t) ndr_push_lsa_SetTrustedDomainInfo,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_SetTrustedDomainInfo,
+ (ndr_print_function_t) ndr_print_lsa_SetTrustedDomainInfo,
+ False,
+ },
+ {
+ "lsa_DeleteTrustedDomain",
+ sizeof(struct lsa_DeleteTrustedDomain),
+ (ndr_push_flags_fn_t) ndr_push_lsa_DeleteTrustedDomain,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_DeleteTrustedDomain,
+ (ndr_print_function_t) ndr_print_lsa_DeleteTrustedDomain,
+ False,
+ },
+ {
+ "lsa_StorePrivateData",
+ sizeof(struct lsa_StorePrivateData),
+ (ndr_push_flags_fn_t) ndr_push_lsa_StorePrivateData,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_StorePrivateData,
+ (ndr_print_function_t) ndr_print_lsa_StorePrivateData,
+ False,
+ },
+ {
+ "lsa_RetrievePrivateData",
+ sizeof(struct lsa_RetrievePrivateData),
+ (ndr_push_flags_fn_t) ndr_push_lsa_RetrievePrivateData,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_RetrievePrivateData,
+ (ndr_print_function_t) ndr_print_lsa_RetrievePrivateData,
+ False,
+ },
+ {
+ "lsa_OpenPolicy2",
+ sizeof(struct lsa_OpenPolicy2),
+ (ndr_push_flags_fn_t) ndr_push_lsa_OpenPolicy2,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenPolicy2,
+ (ndr_print_function_t) ndr_print_lsa_OpenPolicy2,
+ False,
+ },
+ {
+ "lsa_GetUserName",
+ sizeof(struct lsa_GetUserName),
+ (ndr_push_flags_fn_t) ndr_push_lsa_GetUserName,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_GetUserName,
+ (ndr_print_function_t) ndr_print_lsa_GetUserName,
+ False,
+ },
+ {
+ "lsa_QueryInfoPolicy2",
+ sizeof(struct lsa_QueryInfoPolicy2),
+ (ndr_push_flags_fn_t) ndr_push_lsa_QueryInfoPolicy2,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryInfoPolicy2,
+ (ndr_print_function_t) ndr_print_lsa_QueryInfoPolicy2,
+ False,
+ },
+ {
+ "lsa_SetInfoPolicy2",
+ sizeof(struct lsa_SetInfoPolicy2),
+ (ndr_push_flags_fn_t) ndr_push_lsa_SetInfoPolicy2,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_SetInfoPolicy2,
+ (ndr_print_function_t) ndr_print_lsa_SetInfoPolicy2,
+ False,
+ },
+ {
+ "lsa_QueryTrustedDomainInfoByName",
+ sizeof(struct lsa_QueryTrustedDomainInfoByName),
+ (ndr_push_flags_fn_t) ndr_push_lsa_QueryTrustedDomainInfoByName,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryTrustedDomainInfoByName,
+ (ndr_print_function_t) ndr_print_lsa_QueryTrustedDomainInfoByName,
+ False,
+ },
+ {
+ "lsa_SetTrustedDomainInfoByName",
+ sizeof(struct lsa_SetTrustedDomainInfoByName),
+ (ndr_push_flags_fn_t) ndr_push_lsa_SetTrustedDomainInfoByName,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_SetTrustedDomainInfoByName,
+ (ndr_print_function_t) ndr_print_lsa_SetTrustedDomainInfoByName,
+ False,
+ },
+ {
+ "lsa_EnumTrustedDomainsEx",
+ sizeof(struct lsa_EnumTrustedDomainsEx),
+ (ndr_push_flags_fn_t) ndr_push_lsa_EnumTrustedDomainsEx,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_EnumTrustedDomainsEx,
+ (ndr_print_function_t) ndr_print_lsa_EnumTrustedDomainsEx,
+ False,
+ },
+ {
+ "lsa_CreateTrustedDomainEx",
+ sizeof(struct lsa_CreateTrustedDomainEx),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomainEx,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomainEx,
+ (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomainEx,
+ False,
+ },
+ {
+ "lsa_CloseTrustedDomainEx",
+ sizeof(struct lsa_CloseTrustedDomainEx),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CloseTrustedDomainEx,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CloseTrustedDomainEx,
+ (ndr_print_function_t) ndr_print_lsa_CloseTrustedDomainEx,
+ False,
+ },
+ {
+ "lsa_QueryDomainInformationPolicy",
+ sizeof(struct lsa_QueryDomainInformationPolicy),
+ (ndr_push_flags_fn_t) ndr_push_lsa_QueryDomainInformationPolicy,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_QueryDomainInformationPolicy,
+ (ndr_print_function_t) ndr_print_lsa_QueryDomainInformationPolicy,
+ False,
+ },
+ {
+ "lsa_SetDomainInformationPolicy",
+ sizeof(struct lsa_SetDomainInformationPolicy),
+ (ndr_push_flags_fn_t) ndr_push_lsa_SetDomainInformationPolicy,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_SetDomainInformationPolicy,
+ (ndr_print_function_t) ndr_print_lsa_SetDomainInformationPolicy,
+ False,
+ },
+ {
+ "lsa_OpenTrustedDomainByName",
+ sizeof(struct lsa_OpenTrustedDomainByName),
+ (ndr_push_flags_fn_t) ndr_push_lsa_OpenTrustedDomainByName,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_OpenTrustedDomainByName,
+ (ndr_print_function_t) ndr_print_lsa_OpenTrustedDomainByName,
+ False,
+ },
+ {
+ "lsa_TestCall",
+ sizeof(struct lsa_TestCall),
+ (ndr_push_flags_fn_t) ndr_push_lsa_TestCall,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_TestCall,
+ (ndr_print_function_t) ndr_print_lsa_TestCall,
+ False,
+ },
+ {
+ "lsa_LookupSids2",
+ sizeof(struct lsa_LookupSids2),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids2,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids2,
+ (ndr_print_function_t) ndr_print_lsa_LookupSids2,
+ False,
+ },
+ {
+ "lsa_LookupNames2",
+ sizeof(struct lsa_LookupNames2),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames2,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames2,
+ (ndr_print_function_t) ndr_print_lsa_LookupNames2,
+ False,
+ },
+ {
+ "lsa_CreateTrustedDomainEx2",
+ sizeof(struct lsa_CreateTrustedDomainEx2),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CreateTrustedDomainEx2,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CreateTrustedDomainEx2,
+ (ndr_print_function_t) ndr_print_lsa_CreateTrustedDomainEx2,
+ False,
+ },
+ {
+ "lsa_CREDRWRITE",
+ sizeof(struct lsa_CREDRWRITE),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CREDRWRITE,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRWRITE,
+ (ndr_print_function_t) ndr_print_lsa_CREDRWRITE,
+ False,
+ },
+ {
+ "lsa_CREDRREAD",
+ sizeof(struct lsa_CREDRREAD),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CREDRREAD,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRREAD,
+ (ndr_print_function_t) ndr_print_lsa_CREDRREAD,
+ False,
+ },
+ {
+ "lsa_CREDRENUMERATE",
+ sizeof(struct lsa_CREDRENUMERATE),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CREDRENUMERATE,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRENUMERATE,
+ (ndr_print_function_t) ndr_print_lsa_CREDRENUMERATE,
+ False,
+ },
+ {
+ "lsa_CREDRWRITEDOMAINCREDENTIALS",
+ sizeof(struct lsa_CREDRWRITEDOMAINCREDENTIALS),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS,
+ (ndr_print_function_t) ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS,
+ False,
+ },
+ {
+ "lsa_CREDRREADDOMAINCREDENTIALS",
+ sizeof(struct lsa_CREDRREADDOMAINCREDENTIALS),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CREDRREADDOMAINCREDENTIALS,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS,
+ (ndr_print_function_t) ndr_print_lsa_CREDRREADDOMAINCREDENTIALS,
+ False,
+ },
+ {
+ "lsa_CREDRDELETE",
+ sizeof(struct lsa_CREDRDELETE),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CREDRDELETE,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRDELETE,
+ (ndr_print_function_t) ndr_print_lsa_CREDRDELETE,
+ False,
+ },
+ {
+ "lsa_CREDRGETTARGETINFO",
+ sizeof(struct lsa_CREDRGETTARGETINFO),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CREDRGETTARGETINFO,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRGETTARGETINFO,
+ (ndr_print_function_t) ndr_print_lsa_CREDRGETTARGETINFO,
+ False,
+ },
+ {
+ "lsa_CREDRPROFILELOADED",
+ sizeof(struct lsa_CREDRPROFILELOADED),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CREDRPROFILELOADED,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRPROFILELOADED,
+ (ndr_print_function_t) ndr_print_lsa_CREDRPROFILELOADED,
+ False,
+ },
+ {
+ "lsa_LookupNames3",
+ sizeof(struct lsa_LookupNames3),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames3,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames3,
+ (ndr_print_function_t) ndr_print_lsa_LookupNames3,
+ False,
+ },
+ {
+ "lsa_CREDRGETSESSIONTYPES",
+ sizeof(struct lsa_CREDRGETSESSIONTYPES),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CREDRGETSESSIONTYPES,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRGETSESSIONTYPES,
+ (ndr_print_function_t) ndr_print_lsa_CREDRGETSESSIONTYPES,
+ False,
+ },
+ {
+ "lsa_LSARREGISTERAUDITEVENT",
+ sizeof(struct lsa_LSARREGISTERAUDITEVENT),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LSARREGISTERAUDITEVENT,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARREGISTERAUDITEVENT,
+ (ndr_print_function_t) ndr_print_lsa_LSARREGISTERAUDITEVENT,
+ False,
+ },
+ {
+ "lsa_LSARGENAUDITEVENT",
+ sizeof(struct lsa_LSARGENAUDITEVENT),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LSARGENAUDITEVENT,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARGENAUDITEVENT,
+ (ndr_print_function_t) ndr_print_lsa_LSARGENAUDITEVENT,
+ False,
+ },
+ {
+ "lsa_LSARUNREGISTERAUDITEVENT",
+ sizeof(struct lsa_LSARUNREGISTERAUDITEVENT),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LSARUNREGISTERAUDITEVENT,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARUNREGISTERAUDITEVENT,
+ (ndr_print_function_t) ndr_print_lsa_LSARUNREGISTERAUDITEVENT,
+ False,
+ },
+ {
+ "lsa_LSARQUERYFORESTTRUSTINFORMATION",
+ sizeof(struct lsa_LSARQUERYFORESTTRUSTINFORMATION),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LSARQUERYFORESTTRUSTINFORMATION,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARQUERYFORESTTRUSTINFORMATION,
+ (ndr_print_function_t) ndr_print_lsa_LSARQUERYFORESTTRUSTINFORMATION,
+ False,
+ },
+ {
+ "lsa_LSARSETFORESTTRUSTINFORMATION",
+ sizeof(struct lsa_LSARSETFORESTTRUSTINFORMATION),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION,
+ (ndr_print_function_t) ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION,
+ False,
+ },
+ {
+ "lsa_CREDRRENAME",
+ sizeof(struct lsa_CREDRRENAME),
+ (ndr_push_flags_fn_t) ndr_push_lsa_CREDRRENAME,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_CREDRRENAME,
+ (ndr_print_function_t) ndr_print_lsa_CREDRRENAME,
+ False,
+ },
+ {
+ "lsa_LookupSids3",
+ sizeof(struct lsa_LookupSids3),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LookupSids3,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupSids3,
+ (ndr_print_function_t) ndr_print_lsa_LookupSids3,
+ False,
+ },
+ {
+ "lsa_LookupNames4",
+ sizeof(struct lsa_LookupNames4),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LookupNames4,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LookupNames4,
+ (ndr_print_function_t) ndr_print_lsa_LookupNames4,
+ False,
+ },
+ {
+ "lsa_LSAROPENPOLICYSCE",
+ sizeof(struct lsa_LSAROPENPOLICYSCE),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LSAROPENPOLICYSCE,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LSAROPENPOLICYSCE,
+ (ndr_print_function_t) ndr_print_lsa_LSAROPENPOLICYSCE,
+ False,
+ },
+ {
+ "lsa_LSARADTREGISTERSECURITYEVENTSOURCE",
+ sizeof(struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
+ (ndr_print_function_t) ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE,
+ False,
+ },
+ {
+ "lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE",
+ sizeof(struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
+ (ndr_print_function_t) ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE,
+ False,
+ },
+ {
+ "lsa_LSARADTREPORTSECURITYEVENT",
+ sizeof(struct lsa_LSARADTREPORTSECURITYEVENT),
+ (ndr_push_flags_fn_t) ndr_push_lsa_LSARADTREPORTSECURITYEVENT,
+ (ndr_pull_flags_fn_t) ndr_pull_lsa_LSARADTREPORTSECURITYEVENT,
+ (ndr_print_function_t) ndr_print_lsa_LSARADTREPORTSECURITYEVENT,
+ False,
+ },
+ { NULL, 0, NULL, NULL, NULL, False }
+};
+
+const char * const lsarpc_endpoint_strings[] = {
+ "ncacn_np:[\\pipe\\lsarpc]",
+ "ncacn_np:[\\pipe\\netlogon]",
+ "ncacn_np:[\\pipe\\lsass]",
+ "ncacn_ip_tcp:",
+ "ncalrpc:",
+};
+
+const struct dcerpc_endpoint_list lsarpc_endpoints = {
+ .count = 5,
+ .names = lsarpc_endpoint_strings
+};
+
+const char * const lsarpc_authservice_strings[] = {
+ "host",
+};
+
+const struct dcerpc_authservice_list lsarpc_authservices = {
+ .count = 5,
+ .names = lsarpc_authservice_strings
+};
+
+
+const struct dcerpc_interface_table dcerpc_table_lsarpc = {
+ .name = "lsarpc",
+ .syntax_id = {
+ {0x12345778,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
+ DCERPC_LSARPC_VERSION
+ },
+ .helpstring = DCERPC_LSARPC_HELPSTRING,
+ .num_calls = 82,
+ .calls = lsarpc_calls,
+ .endpoints = &lsarpc_endpoints,
+ .authservices = &lsarpc_authservices
+};
+
diff --git a/source3/librpc/gen_ndr/ndr_lsa.h b/source3/librpc/gen_ndr/ndr_lsa.h
new file mode 100644
index 0000000000..13501b139e
--- /dev/null
+++ b/source3/librpc/gen_ndr/ndr_lsa.h
@@ -0,0 +1,331 @@
+/* header auto-generated by pidl */
+
+#include "librpc/gen_ndr/lsa.h"
+
+#ifndef _HEADER_NDR_lsarpc
+#define _HEADER_NDR_lsarpc
+
+#include "librpc/ndr/libndr.h"
+#define DCERPC_LSARPC_UUID "12345778-1234-abcd-ef00-0123456789ab"
+#define DCERPC_LSARPC_VERSION 0.0
+#define DCERPC_LSARPC_NAME "lsarpc"
+#define DCERPC_LSARPC_HELPSTRING "Local Security Authority"
+extern const struct dcerpc_interface_table dcerpc_table_lsarpc;
+NTSTATUS dcerpc_server_lsarpc_init(void);
+#define DCERPC_LSA_CLOSE (0x00)
+
+#define DCERPC_LSA_DELETE (0x01)
+
+#define DCERPC_LSA_ENUMPRIVS (0x02)
+
+#define DCERPC_LSA_QUERYSECURITY (0x03)
+
+#define DCERPC_LSA_SETSECOBJ (0x04)
+
+#define DCERPC_LSA_CHANGEPASSWORD (0x05)
+
+#define DCERPC_LSA_OPENPOLICY (0x06)
+
+#define DCERPC_LSA_QUERYINFOPOLICY (0x07)
+
+#define DCERPC_LSA_SETINFOPOLICY (0x08)
+
+#define DCERPC_LSA_CLEARAUDITLOG (0x09)
+
+#define DCERPC_LSA_CREATEACCOUNT (0x0a)
+
+#define DCERPC_LSA_ENUMACCOUNTS (0x0b)
+
+#define DCERPC_LSA_CREATETRUSTEDDOMAIN (0x0c)
+
+#define DCERPC_LSA_ENUMTRUSTDOM (0x0d)
+
+#define DCERPC_LSA_LOOKUPNAMES (0x0e)
+
+#define DCERPC_LSA_LOOKUPSIDS (0x0f)
+
+#define DCERPC_LSA_CREATESECRET (0x10)
+
+#define DCERPC_LSA_OPENACCOUNT (0x11)
+
+#define DCERPC_LSA_ENUMPRIVSACCOUNT (0x12)
+
+#define DCERPC_LSA_ADDPRIVILEGESTOACCOUNT (0x13)
+
+#define DCERPC_LSA_REMOVEPRIVILEGESFROMACCOUNT (0x14)
+
+#define DCERPC_LSA_GETQUOTASFORACCOUNT (0x15)
+
+#define DCERPC_LSA_SETQUOTASFORACCOUNT (0x16)
+
+#define DCERPC_LSA_GETSYSTEMACCESSACCOUNT (0x17)
+
+#define DCERPC_LSA_SETSYSTEMACCESSACCOUNT (0x18)
+
+#define DCERPC_LSA_OPENTRUSTEDDOMAIN (0x19)
+
+#define DCERPC_LSA_QUERYTRUSTEDDOMAININFO (0x1a)
+
+#define DCERPC_LSA_SETINFORMATIONTRUSTEDDOMAIN (0x1b)
+
+#define DCERPC_LSA_OPENSECRET (0x1c)
+
+#define DCERPC_LSA_SETSECRET (0x1d)
+
+#define DCERPC_LSA_QUERYSECRET (0x1e)
+
+#define DCERPC_LSA_LOOKUPPRIVVALUE (0x1f)
+
+#define DCERPC_LSA_LOOKUPPRIVNAME (0x20)
+
+#define DCERPC_LSA_LOOKUPPRIVDISPLAYNAME (0x21)
+
+#define DCERPC_LSA_DELETEOBJECT (0x22)
+
+#define DCERPC_LSA_ENUMACCOUNTSWITHUSERRIGHT (0x23)
+
+#define DCERPC_LSA_ENUMACCOUNTRIGHTS (0x24)
+
+#define DCERPC_LSA_ADDACCOUNTRIGHTS (0x25)
+
+#define DCERPC_LSA_REMOVEACCOUNTRIGHTS (0x26)
+
+#define DCERPC_LSA_QUERYTRUSTEDDOMAININFOBYSID (0x27)
+
+#define DCERPC_LSA_SETTRUSTEDDOMAININFO (0x28)
+
+#define DCERPC_LSA_DELETETRUSTEDDOMAIN (0x29)
+
+#define DCERPC_LSA_STOREPRIVATEDATA (0x2a)
+
+#define DCERPC_LSA_RETRIEVEPRIVATEDATA (0x2b)
+
+#define DCERPC_LSA_OPENPOLICY2 (0x2c)
+
+#define DCERPC_LSA_GETUSERNAME (0x2d)
+
+#define DCERPC_LSA_QUERYINFOPOLICY2 (0x2e)
+
+#define DCERPC_LSA_SETINFOPOLICY2 (0x2f)
+
+#define DCERPC_LSA_QUERYTRUSTEDDOMAININFOBYNAME (0x30)
+
+#define DCERPC_LSA_SETTRUSTEDDOMAININFOBYNAME (0x31)
+
+#define DCERPC_LSA_ENUMTRUSTEDDOMAINSEX (0x32)
+
+#define DCERPC_LSA_CREATETRUSTEDDOMAINEX (0x33)
+
+#define DCERPC_LSA_CLOSETRUSTEDDOMAINEX (0x34)
+
+#define DCERPC_LSA_QUERYDOMAININFORMATIONPOLICY (0x35)
+
+#define DCERPC_LSA_SETDOMAININFORMATIONPOLICY (0x36)
+
+#define DCERPC_LSA_OPENTRUSTEDDOMAINBYNAME (0x37)
+
+#define DCERPC_LSA_TESTCALL (0x38)
+
+#define DCERPC_LSA_LOOKUPSIDS2 (0x39)
+
+#define DCERPC_LSA_LOOKUPNAMES2 (0x3a)
+
+#define DCERPC_LSA_CREATETRUSTEDDOMAINEX2 (0x3b)
+
+#define DCERPC_LSA_CREDRWRITE (0x3c)
+
+#define DCERPC_LSA_CREDRREAD (0x3d)
+
+#define DCERPC_LSA_CREDRENUMERATE (0x3e)
+
+#define DCERPC_LSA_CREDRWRITEDOMAINCREDENTIALS (0x3f)
+
+#define DCERPC_LSA_CREDRREADDOMAINCREDENTIALS (0x40)
+
+#define DCERPC_LSA_CREDRDELETE (0x41)
+
+#define DCERPC_LSA_CREDRGETTARGETINFO (0x42)
+
+#define DCERPC_LSA_CREDRPROFILELOADED (0x43)
+
+#define DCERPC_LSA_LOOKUPNAMES3 (0x44)
+
+#define DCERPC_LSA_CREDRGETSESSIONTYPES (0x45)
+
+#define DCERPC_LSA_LSARREGISTERAUDITEVENT (0x46)
+
+#define DCERPC_LSA_LSARGENAUDITEVENT (0x47)
+
+#define DCERPC_LSA_LSARUNREGISTERAUDITEVENT (0x48)
+
+#define DCERPC_LSA_LSARQUERYFORESTTRUSTINFORMATION (0x49)
+
+#define DCERPC_LSA_LSARSETFORESTTRUSTINFORMATION (0x4a)
+
+#define DCERPC_LSA_CREDRRENAME (0x4b)
+
+#define DCERPC_LSA_LOOKUPSIDS3 (0x4c)
+
+#define DCERPC_LSA_LOOKUPNAMES4 (0x4d)
+
+#define DCERPC_LSA_LSAROPENPOLICYSCE (0x4e)
+
+#define DCERPC_LSA_LSARADTREGISTERSECURITYEVENTSOURCE (0x4f)
+
+#define DCERPC_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE (0x50)
+
+#define DCERPC_LSA_LSARADTREPORTSECURITYEVENT (0x51)
+
+#define DCERPC_LSARPC_CALL_COUNT (82)
+NTSTATUS ndr_push_lsa_String(struct ndr_push *ndr, int ndr_flags, const struct lsa_String *r);
+NTSTATUS ndr_pull_lsa_String(struct ndr_pull *ndr, int ndr_flags, struct lsa_String *r);
+void ndr_print_lsa_String(struct ndr_print *ndr, const char *name, const struct lsa_String *r);
+NTSTATUS ndr_push_lsa_StringLarge(struct ndr_push *ndr, int ndr_flags, const struct lsa_StringLarge *r);
+NTSTATUS ndr_pull_lsa_StringLarge(struct ndr_pull *ndr, int ndr_flags, struct lsa_StringLarge *r);
+void ndr_print_lsa_StringLarge(struct ndr_print *ndr, const char *name, const struct lsa_StringLarge *r);
+NTSTATUS ndr_push_lsa_Strings(struct ndr_push *ndr, int ndr_flags, const struct lsa_Strings *r);
+NTSTATUS ndr_pull_lsa_Strings(struct ndr_pull *ndr, int ndr_flags, struct lsa_Strings *r);
+void ndr_print_lsa_Strings(struct ndr_print *ndr, const char *name, const struct lsa_Strings *r);
+NTSTATUS ndr_push_lsa_AsciiString(struct ndr_push *ndr, int ndr_flags, const struct lsa_AsciiString *r);
+NTSTATUS ndr_pull_lsa_AsciiString(struct ndr_pull *ndr, int ndr_flags, struct lsa_AsciiString *r);
+void ndr_print_lsa_AsciiString(struct ndr_print *ndr, const char *name, const struct lsa_AsciiString *r);
+void ndr_print_lsa_LUID(struct ndr_print *ndr, const char *name, const struct lsa_LUID *r);
+void ndr_print_lsa_PrivEntry(struct ndr_print *ndr, const char *name, const struct lsa_PrivEntry *r);
+void ndr_print_lsa_PrivArray(struct ndr_print *ndr, const char *name, const struct lsa_PrivArray *r);
+void ndr_print_lsa_QosInfo(struct ndr_print *ndr, const char *name, const struct lsa_QosInfo *r);
+void ndr_print_lsa_ObjectAttribute(struct ndr_print *ndr, const char *name, const struct lsa_ObjectAttribute *r);
+void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditLogInfo *r);
+void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditEventsInfo *r);
+void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfo *r);
+void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *name, const struct lsa_PDAccountInfo *r);
+void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, const struct lsa_ServerRole *r);
+void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, const struct lsa_ReplicaSourceInfo *r);
+void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, const struct lsa_DefaultQuotaInfo *r);
+void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, const struct lsa_ModificationInfo *r);
+void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullSetInfo *r);
+void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, const struct lsa_AuditFullQueryInfo *r);
+void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, const struct lsa_DnsDomainInfo *r);
+void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, const union lsa_PolicyInformation *r);
+void ndr_print_lsa_SidPtr(struct ndr_print *ndr, const char *name, const struct lsa_SidPtr *r);
+NTSTATUS ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, const struct lsa_SidArray *r);
+NTSTATUS ndr_pull_lsa_SidArray(struct ndr_pull *ndr, int ndr_flags, struct lsa_SidArray *r);
+void ndr_print_lsa_SidArray(struct ndr_print *ndr, const char *name, const struct lsa_SidArray *r);
+void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name, const struct lsa_DomainList *r);
+void ndr_print_lsa_SidType(struct ndr_print *ndr, const char *name, enum lsa_SidType r);
+void ndr_print_lsa_TranslatedSid(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid *r);
+void ndr_print_lsa_TransSidArray(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray *r);
+void ndr_print_lsa_RefDomainList(struct ndr_print *ndr, const char *name, const struct lsa_RefDomainList *r);
+void ndr_print_lsa_TranslatedName(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName *r);
+void ndr_print_lsa_TransNameArray(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray *r);
+void ndr_print_lsa_LUIDAttribute(struct ndr_print *ndr, const char *name, const struct lsa_LUIDAttribute *r);
+void ndr_print_lsa_PrivilegeSet(struct ndr_print *ndr, const char *name, const struct lsa_PrivilegeSet *r);
+void ndr_print_lsa_DATA_BUF(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF *r);
+void ndr_print_lsa_DATA_BUF2(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF2 *r);
+void ndr_print_lsa_TrustDomInfoEnum(struct ndr_print *ndr, const char *name, enum lsa_TrustDomInfoEnum r);
+void ndr_print_lsa_TrustDomainInfoName(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoName *r);
+void ndr_print_lsa_TrustDomainInfoPosixOffset(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPosixOffset *r);
+void ndr_print_lsa_TrustDomainInfoPassword(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoPassword *r);
+void ndr_print_lsa_TrustDomainInfoBasic(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBasic *r);
+void ndr_print_lsa_TrustDomainInfoInfoEx(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoEx *r);
+void ndr_print_lsa_TrustDomainInfoBuffer(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoBuffer *r);
+void ndr_print_lsa_TrustDomainInfoAuthInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoAuthInfo *r);
+void ndr_print_lsa_TrustDomainInfoFullInfo(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoFullInfo *r);
+void ndr_print_lsa_TrustDomainInfo11(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfo11 *r);
+void ndr_print_lsa_TrustDomainInfoInfoAll(struct ndr_print *ndr, const char *name, const struct lsa_TrustDomainInfoInfoAll *r);
+void ndr_print_lsa_TrustedDomainInfo(struct ndr_print *ndr, const char *name, const union lsa_TrustedDomainInfo *r);
+void ndr_print_lsa_DATA_BUF_PTR(struct ndr_print *ndr, const char *name, const struct lsa_DATA_BUF_PTR *r);
+void ndr_print_lsa_RightSet(struct ndr_print *ndr, const char *name, const struct lsa_RightSet *r);
+void ndr_print_lsa_StringPointer(struct ndr_print *ndr, const char *name, const struct lsa_StringPointer *r);
+void ndr_print_lsa_DomainListEx(struct ndr_print *ndr, const char *name, const struct lsa_DomainListEx *r);
+void ndr_print_lsa_DomainInfoKerberos(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoKerberos *r);
+void ndr_print_lsa_DomainInfoEfs(struct ndr_print *ndr, const char *name, const struct lsa_DomainInfoEfs *r);
+void ndr_print_lsa_DomainInformationPolicy(struct ndr_print *ndr, const char *name, const union lsa_DomainInformationPolicy *r);
+void ndr_print_lsa_TranslatedName2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedName2 *r);
+void ndr_print_lsa_TransNameArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransNameArray2 *r);
+void ndr_print_lsa_TranslatedSid2(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid2 *r);
+void ndr_print_lsa_TransSidArray2(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray2 *r);
+void ndr_print_lsa_TranslatedSid3(struct ndr_print *ndr, const char *name, const struct lsa_TranslatedSid3 *r);
+void ndr_print_lsa_TransSidArray3(struct ndr_print *ndr, const char *name, const struct lsa_TransSidArray3 *r);
+void ndr_print_lsa_Close(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Close *r);
+void ndr_print_lsa_Delete(struct ndr_print *ndr, const char *name, int flags, const struct lsa_Delete *r);
+void ndr_print_lsa_EnumPrivs(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivs *r);
+void ndr_print_lsa_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecurity *r);
+void ndr_print_lsa_SetSecObj(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecObj *r);
+void ndr_print_lsa_ChangePassword(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ChangePassword *r);
+void ndr_print_lsa_OpenPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy *r);
+void ndr_print_lsa_QueryInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy *r);
+void ndr_print_lsa_SetInfoPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy *r);
+void ndr_print_lsa_ClearAuditLog(struct ndr_print *ndr, const char *name, int flags, const struct lsa_ClearAuditLog *r);
+void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateAccount *r);
+void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccounts *r);
+void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomain *r);
+void ndr_print_lsa_EnumTrustDom(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustDom *r);
+void ndr_print_lsa_LookupNames(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames *r);
+void ndr_print_lsa_LookupSids(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids *r);
+void ndr_print_lsa_CreateSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateSecret *r);
+void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenAccount *r);
+void ndr_print_lsa_EnumPrivsAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumPrivsAccount *r);
+void ndr_print_lsa_AddPrivilegesToAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddPrivilegesToAccount *r);
+void ndr_print_lsa_RemovePrivilegesFromAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemovePrivilegesFromAccount *r);
+void ndr_print_lsa_GetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetQuotasForAccount *r);
+void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetQuotasForAccount *r);
+void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetSystemAccessAccount *r);
+void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSystemAccessAccount *r);
+void ndr_print_lsa_OpenTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomain *r);
+void ndr_print_lsa_QueryTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfo *r);
+void ndr_print_lsa_SetInformationTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInformationTrustedDomain *r);
+void ndr_print_lsa_OpenSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenSecret *r);
+void ndr_print_lsa_SetSecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetSecret *r);
+void ndr_print_lsa_QuerySecret(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QuerySecret *r);
+void ndr_print_lsa_LookupPrivValue(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivValue *r);
+void ndr_print_lsa_LookupPrivName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivName *r);
+void ndr_print_lsa_LookupPrivDisplayName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupPrivDisplayName *r);
+void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteObject *r);
+void ndr_print_lsa_EnumAccountsWithUserRight(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountsWithUserRight *r);
+void ndr_print_lsa_EnumAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumAccountRights *r);
+void ndr_print_lsa_AddAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_AddAccountRights *r);
+void ndr_print_lsa_RemoveAccountRights(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RemoveAccountRights *r);
+void ndr_print_lsa_QueryTrustedDomainInfoBySid(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoBySid *r);
+void ndr_print_lsa_SetTrustedDomainInfo(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfo *r);
+void ndr_print_lsa_DeleteTrustedDomain(struct ndr_print *ndr, const char *name, int flags, const struct lsa_DeleteTrustedDomain *r);
+void ndr_print_lsa_StorePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_StorePrivateData *r);
+void ndr_print_lsa_RetrievePrivateData(struct ndr_print *ndr, const char *name, int flags, const struct lsa_RetrievePrivateData *r);
+void ndr_print_lsa_OpenPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenPolicy2 *r);
+void ndr_print_lsa_GetUserName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_GetUserName *r);
+void ndr_print_lsa_QueryInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryInfoPolicy2 *r);
+void ndr_print_lsa_SetInfoPolicy2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetInfoPolicy2 *r);
+void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryTrustedDomainInfoByName *r);
+void ndr_print_lsa_SetTrustedDomainInfoByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetTrustedDomainInfoByName *r);
+void ndr_print_lsa_EnumTrustedDomainsEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_EnumTrustedDomainsEx *r);
+void ndr_print_lsa_CreateTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx *r);
+void ndr_print_lsa_CloseTrustedDomainEx(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CloseTrustedDomainEx *r);
+void ndr_print_lsa_QueryDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_QueryDomainInformationPolicy *r);
+void ndr_print_lsa_SetDomainInformationPolicy(struct ndr_print *ndr, const char *name, int flags, const struct lsa_SetDomainInformationPolicy *r);
+void ndr_print_lsa_OpenTrustedDomainByName(struct ndr_print *ndr, const char *name, int flags, const struct lsa_OpenTrustedDomainByName *r);
+void ndr_print_lsa_TestCall(struct ndr_print *ndr, const char *name, int flags, const struct lsa_TestCall *r);
+void ndr_print_lsa_LookupSids2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids2 *r);
+void ndr_print_lsa_LookupNames2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames2 *r);
+void ndr_print_lsa_CreateTrustedDomainEx2(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CreateTrustedDomainEx2 *r);
+void ndr_print_lsa_CREDRWRITE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITE *r);
+void ndr_print_lsa_CREDRREAD(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREAD *r);
+void ndr_print_lsa_CREDRENUMERATE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRENUMERATE *r);
+void ndr_print_lsa_CREDRWRITEDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRWRITEDOMAINCREDENTIALS *r);
+void ndr_print_lsa_CREDRREADDOMAINCREDENTIALS(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRREADDOMAINCREDENTIALS *r);
+void ndr_print_lsa_CREDRDELETE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRDELETE *r);
+void ndr_print_lsa_CREDRGETTARGETINFO(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETTARGETINFO *r);
+void ndr_print_lsa_CREDRPROFILELOADED(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRPROFILELOADED *r);
+void ndr_print_lsa_LookupNames3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames3 *r);
+void ndr_print_lsa_CREDRGETSESSIONTYPES(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRGETSESSIONTYPES *r);
+void ndr_print_lsa_LSARREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARREGISTERAUDITEVENT *r);
+void ndr_print_lsa_LSARGENAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARGENAUDITEVENT *r);
+void ndr_print_lsa_LSARUNREGISTERAUDITEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARUNREGISTERAUDITEVENT *r);
+void ndr_print_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARQUERYFORESTTRUSTINFORMATION *r);
+void ndr_print_lsa_LSARSETFORESTTRUSTINFORMATION(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARSETFORESTTRUSTINFORMATION *r);
+void ndr_print_lsa_CREDRRENAME(struct ndr_print *ndr, const char *name, int flags, const struct lsa_CREDRRENAME *r);
+void ndr_print_lsa_LookupSids3(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupSids3 *r);
+void ndr_print_lsa_LookupNames4(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LookupNames4 *r);
+void ndr_print_lsa_LSAROPENPOLICYSCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSAROPENPOLICYSCE *r);
+void ndr_print_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE *r);
+void ndr_print_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r);
+void ndr_print_lsa_LSARADTREPORTSECURITYEVENT(struct ndr_print *ndr, const char *name, int flags, const struct lsa_LSARADTREPORTSECURITYEVENT *r);
+#endif /* _HEADER_NDR_lsarpc */
diff --git a/source3/librpc/gen_ndr/ndr_unixinfo.c b/source3/librpc/gen_ndr/ndr_unixinfo.c
index 1a8a150f14..fb5c2fd581 100644
--- a/source3/librpc/gen_ndr/ndr_unixinfo.c
+++ b/source3/librpc/gen_ndr/ndr_unixinfo.c
@@ -1,7 +1,6 @@
/* parser auto-generated by pidl */
#include "includes.h"
-#define _PUBLIC_
#include "librpc/gen_ndr/ndr_unixinfo.h"
#include "librpc/gen_ndr/ndr_security.h"
diff --git a/source3/librpc/ndr/ndr_misc.c b/source3/librpc/ndr/ndr_misc.c
index 2f9004ae66..0be13eec33 100644
--- a/source3/librpc/ndr/ndr_misc.c
+++ b/source3/librpc/ndr/ndr_misc.c
@@ -25,6 +25,41 @@
#include "includes.h"
+NTSTATUS ndr_push_GUID(struct ndr_push *ndr, int ndr_flags, const struct GUID *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time_low));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->time_mid));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->time_hi_and_version));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->clock_seq, 2));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->node, 6));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, struct GUID *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time_low));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->time_mid));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->time_hi_and_version));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->clock_seq, 2));
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->node, 6));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+size_t ndr_size_GUID(const struct GUID *r, int flags)
+{
+ return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_GUID);
+}
+
/**
build a GUID from a string
*/
@@ -169,3 +204,36 @@ BOOL policy_handle_empty(struct policy_handle *h)
{
return (h->handle_type == 0 && GUID_all_zero(&h->uuid));
}
+
+NTSTATUS ndr_push_policy_handle(struct ndr_push *ndr, int ndr_flags, const struct policy_handle *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->handle_type));
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->uuid));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_policy_handle(struct ndr_pull *ndr, int ndr_flags, struct policy_handle *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->handle_type));
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->uuid));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ }
+ return NT_STATUS_OK;
+}
+
+void ndr_print_policy_handle(struct ndr_print *ndr, const char *name, const struct policy_handle *r)
+{
+ ndr_print_struct(ndr, name, "policy_handle");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "handle_type", r->handle_type);
+ ndr_print_GUID(ndr, "uuid", &r->uuid);
+ ndr->depth--;
+}
diff --git a/source3/librpc/ndr/ndr_sec_helper.c b/source3/librpc/ndr/ndr_sec_helper.c
index edbdd9a40e..944b172d6c 100644
--- a/source3/librpc/ndr/ndr_sec_helper.c
+++ b/source3/librpc/ndr/ndr_sec_helper.c
@@ -91,97 +91,813 @@ void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct d
ndr_print_dom_sid(ndr, name, sid);
}
+static NTSTATUS ndr_push_security_ace_flags(struct ndr_push *ndr, int ndr_flags, uint8_t r)
+{
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
-/*
- parse a dom_sid2 - this is a dom_sid but with an extra copy of the num_auths field
-*/
-NTSTATUS ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid)
+static NTSTATUS ndr_pull_security_ace_flags(struct ndr_pull *ndr, int ndr_flags, uint8_t *r)
+{
+ uint8_t v;
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+void ndr_print_security_ace_flags(struct ndr_print *ndr, const char *name, uint8_t r)
+{
+ ndr_print_uint8(ndr, name, r);
+ ndr->depth++;
+ ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_OBJECT_INHERIT", SEC_ACE_FLAG_OBJECT_INHERIT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_CONTAINER_INHERIT", SEC_ACE_FLAG_CONTAINER_INHERIT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_NO_PROPAGATE_INHERIT", SEC_ACE_FLAG_NO_PROPAGATE_INHERIT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_INHERIT_ONLY", SEC_ACE_FLAG_INHERIT_ONLY, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_INHERITED_ACE", SEC_ACE_FLAG_INHERITED_ACE, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_VALID_INHERIT", SEC_ACE_FLAG_VALID_INHERIT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_SUCCESSFUL_ACCESS", SEC_ACE_FLAG_SUCCESSFUL_ACCESS, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint8_t), "SEC_ACE_FLAG_FAILED_ACCESS", SEC_ACE_FLAG_FAILED_ACCESS, r);
+ ndr->depth--;
+}
+
+static NTSTATUS ndr_push_security_ace_type(struct ndr_push *ndr, int ndr_flags, enum security_ace_type r)
+{
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+static NTSTATUS ndr_pull_security_ace_type(struct ndr_pull *ndr, int ndr_flags, enum security_ace_type *r)
+{
+ uint8_t v;
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+void ndr_print_security_ace_type(struct ndr_print *ndr, const char *name, enum security_ace_type r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case SEC_ACE_TYPE_ACCESS_ALLOWED: val = "SEC_ACE_TYPE_ACCESS_ALLOWED"; break;
+ case SEC_ACE_TYPE_ACCESS_DENIED: val = "SEC_ACE_TYPE_ACCESS_DENIED"; break;
+ case SEC_ACE_TYPE_SYSTEM_AUDIT: val = "SEC_ACE_TYPE_SYSTEM_AUDIT"; break;
+ case SEC_ACE_TYPE_SYSTEM_ALARM: val = "SEC_ACE_TYPE_SYSTEM_ALARM"; break;
+ case SEC_ACE_TYPE_ALLOWED_COMPOUND: val = "SEC_ACE_TYPE_ALLOWED_COMPOUND"; break;
+ case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: val = "SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT"; break;
+ case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: val = "SEC_ACE_TYPE_ACCESS_DENIED_OBJECT"; break;
+ case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: val = "SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT"; break;
+ case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: val = "SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static NTSTATUS ndr_push_security_ace_object_flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+static NTSTATUS ndr_pull_security_ace_object_flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+void ndr_print_security_ace_object_flags(struct ndr_print *ndr, const char *name, uint32_t r)
{
- uint32_t num_auths;
- if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
+ ndr_print_uint32(ndr, name, r);
+ ndr->depth++;
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_ACE_OBJECT_TYPE_PRESENT", SEC_ACE_OBJECT_TYPE_PRESENT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT", SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT, r);
+ ndr->depth--;
+}
+
+static NTSTATUS ndr_push_security_ace_object_type(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_type *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ switch (level) {
+ case SEC_ACE_OBJECT_TYPE_PRESENT:
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->type));
+ break;
+
+ default:
+ break;
+
+ }
}
- NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &num_auths));
- NDR_CHECK(ndr_pull_dom_sid(ndr, ndr_flags, sid));
- if (sid->num_auths != num_auths) {
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE,
- "Bad array size %u should exceed %u",
- num_auths, sid->num_auths);
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case SEC_ACE_OBJECT_TYPE_PRESENT:
+ break;
+
+ default:
+ break;
+
+ }
}
return NT_STATUS_OK;
}
-/*
- parse a dom_sid2 - this is a dom_sid but with an extra copy of the num_auths field
-*/
-NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid)
+static NTSTATUS ndr_pull_security_ace_object_type(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_type *r)
{
- if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
+ int level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ switch (level) {
+ case SEC_ACE_OBJECT_TYPE_PRESENT: {
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->type));
+ break; }
+
+ default: {
+ break; }
+
+ }
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, sid->num_auths));
- return ndr_push_dom_sid(ndr, ndr_flags, sid);
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case SEC_ACE_OBJECT_TYPE_PRESENT:
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
}
-/*
- parse a dom_sid28 - this is a dom_sid in a fixed 28 byte buffer, so we need to ensure there are only upto 5 sub_auth
-*/
-NTSTATUS ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid)
+void ndr_print_security_ace_object_type(struct ndr_print *ndr, const char *name, const union security_ace_object_type *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "security_ace_object_type");
+ switch (level) {
+ case SEC_ACE_OBJECT_TYPE_PRESENT:
+ ndr_print_GUID(ndr, "type", &r->type);
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+static NTSTATUS ndr_push_security_ace_object_inherited_type(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_inherited_type *r)
{
- NTSTATUS status;
- struct ndr_pull *subndr;
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ switch (level) {
+ case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT:
+ NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->inherited_type));
+ break;
- if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
+ default:
+ break;
+
+ }
}
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT:
+ break;
- subndr = talloc_zero(ndr, struct ndr_pull);
- NT_STATUS_HAVE_NO_MEMORY(subndr);
- subndr->flags = ndr->flags;
- subndr->current_mem_ctx = ndr->current_mem_ctx;
+ default:
+ break;
- subndr->data = ndr->data + ndr->offset;
- subndr->data_size = 28;
- subndr->offset = 0;
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+static NTSTATUS ndr_pull_security_ace_object_inherited_type(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_inherited_type *r)
+{
+ int level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ switch (level) {
+ case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT: {
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->inherited_type));
+ break; }
- NDR_CHECK(ndr_pull_advance(ndr, 28));
+ default: {
+ break; }
- status = ndr_pull_dom_sid(subndr, ndr_flags, sid);
- if (!NT_STATUS_IS_OK(status)) {
- /* handle a w2k bug which send random data in the buffer */
- ZERO_STRUCTP(sid);
+ }
}
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT:
+ break;
+ default:
+ break;
+
+ }
+ }
return NT_STATUS_OK;
}
-/*
- push a dom_sid28 - this is a dom_sid in a 28 byte fixed buffer
-*/
-NTSTATUS ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid)
+void ndr_print_security_ace_object_inherited_type(struct ndr_print *ndr, const char *name, const union security_ace_object_inherited_type *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "security_ace_object_inherited_type");
+ switch (level) {
+ case SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT:
+ ndr_print_GUID(ndr, "inherited_type", &r->inherited_type);
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+static NTSTATUS ndr_push_security_ace_object(struct ndr_push *ndr, int ndr_flags, const struct security_ace_object *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_security_ace_object_flags(ndr, NDR_SCALARS, r->flags));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->type, r->flags&SEC_ACE_OBJECT_TYPE_PRESENT));
+ NDR_CHECK(ndr_push_security_ace_object_type(ndr, NDR_SCALARS, &r->type));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->inherited_type, r->flags&SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT));
+ NDR_CHECK(ndr_push_security_ace_object_inherited_type(ndr, NDR_SCALARS, &r->inherited_type));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_security_ace_object_type(ndr, NDR_BUFFERS, &r->type));
+ NDR_CHECK(ndr_push_security_ace_object_inherited_type(ndr, NDR_BUFFERS, &r->inherited_type));
+ }
+ return NT_STATUS_OK;
+}
+
+static NTSTATUS ndr_pull_security_ace_object(struct ndr_pull *ndr, int ndr_flags, struct security_ace_object *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_security_ace_object_flags(ndr, NDR_SCALARS, &r->flags));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->type, r->flags&SEC_ACE_OBJECT_TYPE_PRESENT));
+ NDR_CHECK(ndr_pull_security_ace_object_type(ndr, NDR_SCALARS, &r->type));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->inherited_type, r->flags&SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT));
+ NDR_CHECK(ndr_pull_security_ace_object_inherited_type(ndr, NDR_SCALARS, &r->inherited_type));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_security_ace_object_type(ndr, NDR_BUFFERS, &r->type));
+ NDR_CHECK(ndr_pull_security_ace_object_inherited_type(ndr, NDR_BUFFERS, &r->inherited_type));
+ }
+ return NT_STATUS_OK;
+}
+
+void ndr_print_security_ace_object(struct ndr_print *ndr, const char *name, const struct security_ace_object *r)
+{
+ ndr_print_struct(ndr, name, "security_ace_object");
+ ndr->depth++;
+ ndr_print_security_ace_object_flags(ndr, "flags", r->flags);
+ ndr_print_set_switch_value(ndr, &r->type, r->flags&SEC_ACE_OBJECT_TYPE_PRESENT);
+ ndr_print_security_ace_object_type(ndr, "type", &r->type);
+ ndr_print_set_switch_value(ndr, &r->inherited_type, r->flags&SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT);
+ ndr_print_security_ace_object_inherited_type(ndr, "inherited_type", &r->inherited_type);
+ ndr->depth--;
+}
+
+static NTSTATUS ndr_push_security_ace_object_ctr(struct ndr_push *ndr, int ndr_flags, const union security_ace_object_ctr *r)
+{
+ int level;
+ level = ndr_push_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ switch (level) {
+ case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT:
+ NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object));
+ break;
+
+ case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT:
+ NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object));
+ break;
+
+ case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT:
+ NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object));
+ break;
+
+ case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT:
+ NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_SCALARS, &r->object));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT:
+ NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_BUFFERS, &r->object));
+ break;
+
+ case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT:
+ NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_BUFFERS, &r->object));
+ break;
+
+ case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT:
+ NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_BUFFERS, &r->object));
+ break;
+
+ case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT:
+ NDR_CHECK(ndr_push_security_ace_object(ndr, NDR_BUFFERS, &r->object));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+static NTSTATUS ndr_pull_security_ace_object_ctr(struct ndr_pull *ndr, int ndr_flags, union security_ace_object_ctr *r)
+{
+ int level;
+ level = ndr_pull_get_switch_value(ndr, r);
+ if (ndr_flags & NDR_SCALARS) {
+ switch (level) {
+ case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT: {
+ NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
+ break; }
+
+ case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT: {
+ NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
+ break; }
+
+ case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT: {
+ NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
+ break; }
+
+ case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT: {
+ NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_SCALARS, &r->object));
+ break; }
+
+ default: {
+ break; }
+
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ switch (level) {
+ case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT:
+ NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
+ break;
+
+ case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT:
+ NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
+ break;
+
+ case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT:
+ NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
+ break;
+
+ case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT:
+ NDR_CHECK(ndr_pull_security_ace_object(ndr, NDR_BUFFERS, &r->object));
+ break;
+
+ default:
+ break;
+
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+void ndr_print_security_ace_object_ctr(struct ndr_print *ndr, const char *name, const union security_ace_object_ctr *r)
+{
+ int level;
+ level = ndr_print_get_switch_value(ndr, r);
+ ndr_print_union(ndr, name, level, "security_ace_object_ctr");
+ switch (level) {
+ case SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT:
+ ndr_print_security_ace_object(ndr, "object", &r->object);
+ break;
+
+ case SEC_ACE_TYPE_ACCESS_DENIED_OBJECT:
+ ndr_print_security_ace_object(ndr, "object", &r->object);
+ break;
+
+ case SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT:
+ ndr_print_security_ace_object(ndr, "object", &r->object);
+ break;
+
+ case SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT:
+ ndr_print_security_ace_object(ndr, "object", &r->object);
+ break;
+
+ default:
+ break;
+
+ }
+}
+
+NTSTATUS ndr_push_security_ace(struct ndr_push *ndr, int ndr_flags, const struct security_ace *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_security_ace_type(ndr, NDR_SCALARS, r->type));
+ NDR_CHECK(ndr_push_security_ace_flags(ndr, NDR_SCALARS, r->flags));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_security_ace(r,ndr->flags)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->access_mask));
+ NDR_CHECK(ndr_push_set_switch_value(ndr, &r->object, r->type));
+ NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_SCALARS, &r->object));
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->trustee));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_push_security_ace_object_ctr(ndr, NDR_BUFFERS, &r->object));
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_security_ace(struct ndr_pull *ndr, int ndr_flags, struct security_ace *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_security_ace_type(ndr, NDR_SCALARS, &r->type));
+ NDR_CHECK(ndr_pull_security_ace_flags(ndr, NDR_SCALARS, &r->flags));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->access_mask));
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->object, r->type));
+ NDR_CHECK(ndr_pull_security_ace_object_ctr(ndr, NDR_SCALARS, &r->object));
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->trustee));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ NDR_CHECK(ndr_pull_security_ace_object_ctr(ndr, NDR_BUFFERS, &r->object));
+ }
+ return NT_STATUS_OK;
+}
+
+void ndr_print_security_ace(struct ndr_print *ndr, const char *name, const struct security_ace *r)
+{
+ ndr_print_struct(ndr, name, "security_ace");
+ ndr->depth++;
+ ndr_print_security_ace_type(ndr, "type", r->type);
+ ndr_print_security_ace_flags(ndr, "flags", r->flags);
+ ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_ace(r,ndr->flags):r->size);
+ ndr_print_uint32(ndr, "access_mask", r->access_mask);
+ ndr_print_set_switch_value(ndr, &r->object, r->type);
+ ndr_print_security_ace_object_ctr(ndr, "object", &r->object);
+ ndr_print_dom_sid(ndr, "trustee", &r->trustee);
+ ndr->depth--;
+}
+
+static NTSTATUS ndr_push_security_acl_revision(struct ndr_push *ndr, int ndr_flags, enum security_acl_revision r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+static NTSTATUS ndr_pull_security_acl_revision(struct ndr_pull *ndr, int ndr_flags, enum security_acl_revision *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+void ndr_print_security_acl_revision(struct ndr_print *ndr, const char *name, enum security_acl_revision r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case SECURITY_ACL_REVISION_NT4: val = "SECURITY_ACL_REVISION_NT4"; break;
+ case SECURITY_ACL_REVISION_ADS: val = "SECURITY_ACL_REVISION_ADS"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+NTSTATUS ndr_push_security_acl(struct ndr_push *ndr, int ndr_flags, const struct security_acl *r)
{
- uint32_t old_offset;
- uint32_t padding;
+ uint32_t cntr_aces_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_security_acl_revision(ndr, NDR_SCALARS, r->revision));
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_security_acl(r,ndr->flags)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_aces));
+ for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) {
+ NDR_CHECK(ndr_push_security_ace(ndr, NDR_SCALARS, &r->aces[cntr_aces_0]));
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) {
+ NDR_CHECK(ndr_push_security_ace(ndr, NDR_BUFFERS, &r->aces[cntr_aces_0]));
+ }
+ }
+ return NT_STATUS_OK;
+}
- if (!(ndr_flags & NDR_SCALARS)) {
- return NT_STATUS_OK;
+NTSTATUS ndr_pull_security_acl(struct ndr_pull *ndr, int ndr_flags, struct security_acl *r)
+{
+ uint32_t cntr_aces_0;
+ TALLOC_CTX *_mem_save_aces_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_security_acl_revision(ndr, NDR_SCALARS, &r->revision));
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_aces));
+ if (r->num_aces < 0 || r->num_aces > 1000) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_PULL_ALLOC_N(ndr, r->aces, r->num_aces);
+ _mem_save_aces_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->aces, 0);
+ for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) {
+ NDR_CHECK(ndr_pull_security_ace(ndr, NDR_SCALARS, &r->aces[cntr_aces_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aces_0, 0);
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ _mem_save_aces_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->aces, 0);
+ for (cntr_aces_0 = 0; cntr_aces_0 < r->num_aces; cntr_aces_0++) {
+ NDR_CHECK(ndr_pull_security_ace(ndr, NDR_BUFFERS, &r->aces[cntr_aces_0]));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_aces_0, 0);
}
+ return NT_STATUS_OK;
+}
+
+void ndr_print_security_acl(struct ndr_print *ndr, const char *name, const struct security_acl *r)
+{
+ uint32_t cntr_aces_0;
+ ndr_print_struct(ndr, name, "security_acl");
+ ndr->depth++;
+ ndr_print_security_acl_revision(ndr, "revision", r->revision);
+ ndr_print_uint16(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_acl(r,ndr->flags):r->size);
+ ndr_print_uint32(ndr, "num_aces", r->num_aces);
+ ndr->print(ndr, "%s: ARRAY(%d)", "aces", r->num_aces);
+ ndr->depth++;
+ for (cntr_aces_0=0;cntr_aces_0<r->num_aces;cntr_aces_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_aces_0);
+ if (idx_0) {
+ ndr_print_security_ace(ndr, "aces", &r->aces[cntr_aces_0]);
+ free(idx_0);
+ }
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
+
+static NTSTATUS ndr_push_security_descriptor_revision(struct ndr_push *ndr, int ndr_flags, enum security_descriptor_revision r)
+{
+ NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
+
+static NTSTATUS ndr_pull_security_descriptor_revision(struct ndr_pull *ndr, int ndr_flags, enum security_descriptor_revision *r)
+{
+ uint8_t v;
+ NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
- if (sid->num_auths > 5) {
- return ndr_push_error(ndr, NDR_ERR_RANGE,
- "dom_sid28 allows only upto 5 sub auth [%u]",
- sid->num_auths);
+void ndr_print_security_descriptor_revision(struct ndr_print *ndr, const char *name, enum security_descriptor_revision r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case SECURITY_DESCRIPTOR_REVISION_1: val = "SECURITY_DESCRIPTOR_REVISION_1"; break;
}
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
+static NTSTATUS ndr_push_security_descriptor_type(struct ndr_push *ndr, int ndr_flags, uint16_t r)
+{
+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
+ return NT_STATUS_OK;
+}
- old_offset = ndr->offset;
- NDR_CHECK(ndr_push_dom_sid(ndr, ndr_flags, sid));
+static NTSTATUS ndr_pull_security_descriptor_type(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
+{
+ uint16_t v;
+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+void ndr_print_security_descriptor_type(struct ndr_print *ndr, const char *name, uint16_t r)
+{
+ ndr_print_uint16(ndr, name, r);
+ ndr->depth++;
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_OWNER_DEFAULTED", SEC_DESC_OWNER_DEFAULTED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_GROUP_DEFAULTED", SEC_DESC_GROUP_DEFAULTED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_PRESENT", SEC_DESC_DACL_PRESENT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_DEFAULTED", SEC_DESC_DACL_DEFAULTED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_PRESENT", SEC_DESC_SACL_PRESENT, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_DEFAULTED", SEC_DESC_SACL_DEFAULTED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_TRUSTED", SEC_DESC_DACL_TRUSTED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SERVER_SECURITY", SEC_DESC_SERVER_SECURITY, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_AUTO_INHERIT_REQ", SEC_DESC_DACL_AUTO_INHERIT_REQ, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_AUTO_INHERIT_REQ", SEC_DESC_SACL_AUTO_INHERIT_REQ, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_AUTO_INHERITED", SEC_DESC_DACL_AUTO_INHERITED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_AUTO_INHERITED", SEC_DESC_SACL_AUTO_INHERITED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_DACL_PROTECTED", SEC_DESC_DACL_PROTECTED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SACL_PROTECTED", SEC_DESC_SACL_PROTECTED, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_RM_CONTROL_VALID", SEC_DESC_RM_CONTROL_VALID, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "SEC_DESC_SELF_RELATIVE", SEC_DESC_SELF_RELATIVE, r);
+ ndr->depth--;
+}
- padding = 28 - (ndr->offset - old_offset);
+NTSTATUS ndr_push_security_descriptor(struct ndr_push *ndr, int ndr_flags, const struct security_descriptor *r)
+{
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_security_descriptor_revision(ndr, NDR_SCALARS, r->revision));
+ NDR_CHECK(ndr_push_security_descriptor_type(ndr, NDR_SCALARS, r->type));
+ NDR_CHECK(ndr_push_relative_ptr1(ndr, r->owner_sid));
+ NDR_CHECK(ndr_push_relative_ptr1(ndr, r->group_sid));
+ NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sacl));
+ NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dacl));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->owner_sid) {
+ NDR_CHECK(ndr_push_relative_ptr2(ndr, r->owner_sid));
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->owner_sid));
+ }
+ if (r->group_sid) {
+ NDR_CHECK(ndr_push_relative_ptr2(ndr, r->group_sid));
+ NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->group_sid));
+ }
+ if (r->sacl) {
+ NDR_CHECK(ndr_push_relative_ptr2(ndr, r->sacl));
+ NDR_CHECK(ndr_push_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->sacl));
+ }
+ if (r->dacl) {
+ NDR_CHECK(ndr_push_relative_ptr2(ndr, r->dacl));
+ NDR_CHECK(ndr_push_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->dacl));
+ }
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_security_descriptor(struct ndr_pull *ndr, int ndr_flags, struct security_descriptor *r)
+{
+ uint32_t _ptr_owner_sid;
+ TALLOC_CTX *_mem_save_owner_sid_0;
+ uint32_t _ptr_group_sid;
+ TALLOC_CTX *_mem_save_group_sid_0;
+ uint32_t _ptr_sacl;
+ TALLOC_CTX *_mem_save_sacl_0;
+ uint32_t _ptr_dacl;
+ TALLOC_CTX *_mem_save_dacl_0;
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_security_descriptor_revision(ndr, NDR_SCALARS, &r->revision));
+ NDR_CHECK(ndr_pull_security_descriptor_type(ndr, NDR_SCALARS, &r->type));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_owner_sid));
+ if (_ptr_owner_sid) {
+ NDR_PULL_ALLOC(ndr, r->owner_sid);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->owner_sid, _ptr_owner_sid));
+ } else {
+ r->owner_sid = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_sid));
+ if (_ptr_group_sid) {
+ NDR_PULL_ALLOC(ndr, r->group_sid);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->group_sid, _ptr_group_sid));
+ } else {
+ r->group_sid = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sacl));
+ if (_ptr_sacl) {
+ NDR_PULL_ALLOC(ndr, r->sacl);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sacl, _ptr_sacl));
+ } else {
+ r->sacl = NULL;
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dacl));
+ if (_ptr_dacl) {
+ NDR_PULL_ALLOC(ndr, r->dacl);
+ NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dacl, _ptr_dacl));
+ } else {
+ r->dacl = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->owner_sid) {
+ struct ndr_pull_save _relative_save;
+ ndr_pull_save(ndr, &_relative_save);
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->owner_sid));
+ _mem_save_owner_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->owner_sid, 0);
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->owner_sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_owner_sid_0, 0);
+ ndr_pull_restore(ndr, &_relative_save);
+ }
+ if (r->group_sid) {
+ struct ndr_pull_save _relative_save;
+ ndr_pull_save(ndr, &_relative_save);
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->group_sid));
+ _mem_save_group_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->group_sid, 0);
+ NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->group_sid));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_sid_0, 0);
+ ndr_pull_restore(ndr, &_relative_save);
+ }
+ if (r->sacl) {
+ struct ndr_pull_save _relative_save;
+ ndr_pull_save(ndr, &_relative_save);
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sacl));
+ _mem_save_sacl_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sacl, 0);
+ NDR_CHECK(ndr_pull_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->sacl));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sacl_0, 0);
+ ndr_pull_restore(ndr, &_relative_save);
+ }
+ if (r->dacl) {
+ struct ndr_pull_save _relative_save;
+ ndr_pull_save(ndr, &_relative_save);
+ NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dacl));
+ _mem_save_dacl_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->dacl, 0);
+ NDR_CHECK(ndr_pull_security_acl(ndr, NDR_SCALARS|NDR_BUFFERS, r->dacl));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dacl_0, 0);
+ ndr_pull_restore(ndr, &_relative_save);
+ }
+ }
+ ndr->flags = _flags_save_STRUCT;
+ }
+ return NT_STATUS_OK;
+}
- if (padding > 0) {
- NDR_CHECK(ndr_push_zero(ndr, padding));
+void ndr_print_security_descriptor(struct ndr_print *ndr, const char *name, const struct security_descriptor *r)
+{
+ ndr_print_struct(ndr, name, "security_descriptor");
+ {
+ uint32_t _flags_save_STRUCT = ndr->flags;
+ ndr_set_flags(&ndr->flags, LIBNDR_FLAG_LITTLE_ENDIAN);
+ ndr->depth++;
+ ndr_print_security_descriptor_revision(ndr, "revision", r->revision);
+ ndr_print_security_descriptor_type(ndr, "type", r->type);
+ ndr_print_ptr(ndr, "owner_sid", r->owner_sid);
+ ndr->depth++;
+ if (r->owner_sid) {
+ ndr_print_dom_sid(ndr, "owner_sid", r->owner_sid);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "group_sid", r->group_sid);
+ ndr->depth++;
+ if (r->group_sid) {
+ ndr_print_dom_sid(ndr, "group_sid", r->group_sid);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "sacl", r->sacl);
+ ndr->depth++;
+ if (r->sacl) {
+ ndr_print_security_acl(ndr, "sacl", r->sacl);
+ }
+ ndr->depth--;
+ ndr_print_ptr(ndr, "dacl", r->dacl);
+ ndr->depth++;
+ if (r->dacl) {
+ ndr_print_security_acl(ndr, "dacl", r->dacl);
+ }
+ ndr->depth--;
+ ndr->depth--;
+ ndr->flags = _flags_save_STRUCT;
}
+}
+NTSTATUS ndr_push_security_secinfo(struct ndr_push *ndr, int ndr_flags, uint32_t r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
return NT_STATUS_OK;
}
+NTSTATUS ndr_pull_security_secinfo(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NT_STATUS_OK;
+}
+
+void ndr_print_security_secinfo(struct ndr_print *ndr, const char *name, uint32_t r)
+{
+ ndr_print_uint32(ndr, name, r);
+ ndr->depth++;
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_OWNER", SECINFO_OWNER, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_GROUP", SECINFO_GROUP, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_DACL", SECINFO_DACL, r);
+ ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SECINFO_SACL", SECINFO_SACL, r);
+ ndr->depth--;
+}
+
diff --git a/source3/librpc/ndr/sid.c b/source3/librpc/ndr/sid.c
index f8c284e93c..af48063dfa 100644
--- a/source3/librpc/ndr/sid.c
+++ b/source3/librpc/ndr/sid.c
@@ -90,3 +90,163 @@ char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
return ret;
}
+
+/*
+ parse a dom_sid2 - this is a dom_sid but with an extra copy of the num_auths field
+*/
+NTSTATUS ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid)
+{
+ uint32_t num_auths;
+ if (!(ndr_flags & NDR_SCALARS)) {
+ return NT_STATUS_OK;
+ }
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &num_auths));
+ NDR_CHECK(ndr_pull_dom_sid(ndr, ndr_flags, sid));
+ if (sid->num_auths != num_auths) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE,
+ "Bad array size %u should exceed %u",
+ num_auths, sid->num_auths);
+ }
+ return NT_STATUS_OK;
+}
+
+/*
+ parse a dom_sid2 - this is a dom_sid but with an extra copy of the num_auths field
+*/
+NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid)
+{
+ if (!(ndr_flags & NDR_SCALARS)) {
+ return NT_STATUS_OK;
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, sid->num_auths));
+ return ndr_push_dom_sid(ndr, ndr_flags, sid);
+}
+
+/*
+ parse a dom_sid28 - this is a dom_sid in a fixed 28 byte buffer, so we need to ensure there are only upto 5 sub_auth
+*/
+NTSTATUS ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid)
+{
+ NTSTATUS status;
+ struct ndr_pull *subndr;
+
+ if (!(ndr_flags & NDR_SCALARS)) {
+ return NT_STATUS_OK;
+ }
+
+ subndr = talloc_zero(ndr, struct ndr_pull);
+ NT_STATUS_HAVE_NO_MEMORY(subndr);
+ subndr->flags = ndr->flags;
+ subndr->current_mem_ctx = ndr->current_mem_ctx;
+
+ subndr->data = ndr->data + ndr->offset;
+ subndr->data_size = 28;
+ subndr->offset = 0;
+
+ NDR_CHECK(ndr_pull_advance(ndr, 28));
+
+ status = ndr_pull_dom_sid(subndr, ndr_flags, sid);
+ if (!NT_STATUS_IS_OK(status)) {
+ /* handle a w2k bug which send random data in the buffer */
+ ZERO_STRUCTP(sid);
+ }
+
+ return NT_STATUS_OK;
+}
+
+/*
+ push a dom_sid28 - this is a dom_sid in a 28 byte fixed buffer
+*/
+NTSTATUS ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid)
+{
+ uint32_t old_offset;
+ uint32_t padding;
+
+ if (!(ndr_flags & NDR_SCALARS)) {
+ return NT_STATUS_OK;
+ }
+
+ if (sid->num_auths > 5) {
+ return ndr_push_error(ndr, NDR_ERR_RANGE,
+ "dom_sid28 allows only upto 5 sub auth [%u]",
+ sid->num_auths);
+ }
+
+ old_offset = ndr->offset;
+ NDR_CHECK(ndr_push_dom_sid(ndr, ndr_flags, sid));
+
+ padding = 28 - (ndr->offset - old_offset);
+
+ if (padding > 0) {
+ NDR_CHECK(ndr_push_zero(ndr, padding));
+ }
+
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_push_sec_desc_buf(struct ndr_push *ndr, int ndr_flags, const struct sec_desc_buf *r)
+{
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_security_descriptor(r->sd,ndr->flags)));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd));
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->sd) {
+ {
+ struct ndr_push *_ndr_sd;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sd, 4, -1));
+ NDR_CHECK(ndr_push_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sd, 4, -1));
+ }
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+NTSTATUS ndr_pull_sec_desc_buf(struct ndr_pull *ndr, int ndr_flags, struct sec_desc_buf *r)
+{
+ uint32_t _ptr_sd;
+ TALLOC_CTX *_mem_save_sd_0;
+ if (ndr_flags & NDR_SCALARS) {
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sd_size));
+ if (r->sd_size < 0 || r->sd_size > 0x40000) {
+ return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
+ }
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd));
+ if (_ptr_sd) {
+ NDR_PULL_ALLOC(ndr, r->sd);
+ } else {
+ r->sd = NULL;
+ }
+ }
+ if (ndr_flags & NDR_BUFFERS) {
+ if (r->sd) {
+ _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->sd, 0);
+ {
+ struct ndr_pull *_ndr_sd;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sd, 4, -1));
+ NDR_CHECK(ndr_pull_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sd, 4, -1));
+ }
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, 0);
+ }
+ }
+ return NT_STATUS_OK;
+}
+
+void ndr_print_sec_desc_buf(struct ndr_print *ndr, const char *name, const struct sec_desc_buf *r)
+{
+ ndr_print_struct(ndr, name, "sec_desc_buf");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "sd_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_security_descriptor(r->sd,ndr->flags):r->sd_size);
+ ndr_print_ptr(ndr, "sd", r->sd);
+ ndr->depth++;
+ if (r->sd) {
+ ndr_print_security_descriptor(ndr, "sd", r->sd);
+ }
+ ndr->depth--;
+ ndr->depth--;
+}
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index f89c03274a..7b4e216961 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -3784,7 +3784,7 @@ convert_sid_to_string(struct cli_state *ipc_cli,
{
char **domains = NULL;
char **names = NULL;
- enum SID_NAME_USE *types = NULL;
+ enum lsa_SidType *types = NULL;
struct rpc_pipe_client *pipe_hnd = find_lsa_pipe_hnd(ipc_cli);
sid_to_string(str, sid);
@@ -3820,7 +3820,7 @@ convert_string_to_sid(struct cli_state *ipc_cli,
DOM_SID *sid,
const char *str)
{
- enum SID_NAME_USE *types = NULL;
+ enum lsa_SidType *types = NULL;
DOM_SID *sids = NULL;
BOOL result = True;
struct rpc_pipe_client *pipe_hnd = find_lsa_pipe_hnd(ipc_cli);
diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c
index 11498fccf9..58d823c4f9 100644
--- a/source3/modules/vfs_afsacl.c
+++ b/source3/modules/vfs_afsacl.c
@@ -48,7 +48,7 @@ struct afs_ace {
BOOL positive;
char *name;
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
uint32 rights;
struct afs_ace *next;
};
@@ -110,7 +110,7 @@ static struct afs_ace *new_afs_ace(TALLOC_CTX *mem_ctx,
const char *name, uint32 rights)
{
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
struct afs_ace *result;
if (strcmp(name, "system:administrators") == 0) {
@@ -713,7 +713,7 @@ static BOOL nt_to_afs_acl(const char *filename,
for (i = 0; i < dacl->num_aces; i++) {
SEC_ACE *ace = &(dacl->ace[i]);
const char *dom_name, *name;
- enum SID_NAME_USE name_type;
+ enum lsa_SidType name_type;
char *p;
if (ace->type != SEC_ACE_TYPE_ACCESS_ALLOWED) {
diff --git a/source3/nsswitch/wb_client.c b/source3/nsswitch/wb_client.c
index 2f0a694d68..77e2645b74 100644
--- a/source3/nsswitch/wb_client.c
+++ b/source3/nsswitch/wb_client.c
@@ -35,7 +35,7 @@ NSS_STATUS winbindd_request_response(int req_type,
/* Call winbindd to convert a name to a sid */
BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,
- enum SID_NAME_USE *name_type)
+ enum lsa_SidType *name_type)
{
struct winbindd_request request;
struct winbindd_response response;
@@ -56,7 +56,7 @@ BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,
&response)) == NSS_STATUS_SUCCESS) {
if (!string_to_sid(sid, response.data.sid.sid))
return False;
- *name_type = (enum SID_NAME_USE)response.data.sid.type;
+ *name_type = (enum lsa_SidType)response.data.sid.type;
}
return result == NSS_STATUS_SUCCESS;
@@ -66,7 +66,7 @@ BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,
BOOL winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
const char **domain, const char **name,
- enum SID_NAME_USE *name_type)
+ enum lsa_SidType *name_type)
{
struct winbindd_request request;
struct winbindd_response response;
@@ -105,7 +105,7 @@ BOOL winbind_lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
}
}
- *name_type = (enum SID_NAME_USE)response.data.name.type;
+ *name_type = (enum lsa_SidType)response.data.name.type;
DEBUG(10, ("winbind_lookup_sid: SUCCESS: SID %s -> %s %s\n",
sid_string_static(sid), response.data.name.dom_name,
@@ -117,7 +117,7 @@ BOOL winbind_lookup_rids(TALLOC_CTX *mem_ctx,
const DOM_SID *domain_sid,
int num_rids, uint32 *rids,
const char **domain_name,
- const char ***names, enum SID_NAME_USE **types)
+ const char ***names, enum lsa_SidType **types)
{
size_t i, buflen;
ssize_t len;
@@ -166,7 +166,7 @@ BOOL winbind_lookup_rids(TALLOC_CTX *mem_ctx,
*domain_name = talloc_strdup(mem_ctx, response.data.domain_name);
*names = TALLOC_ARRAY(mem_ctx, const char *, num_rids);
- *types = TALLOC_ARRAY(mem_ctx, enum SID_NAME_USE, num_rids);
+ *types = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_rids);
if ((*names == NULL) || (*types == NULL)) {
goto fail;
@@ -183,7 +183,7 @@ BOOL winbind_lookup_rids(TALLOC_CTX *mem_ctx,
goto fail;
}
- (*types)[i] = (enum SID_NAME_USE)strtoul(p, &q, 10);
+ (*types)[i] = (enum lsa_SidType)strtoul(p, &q, 10);
if (*q != ' ') {
DEBUG(10, ("Got invalid reply: %s\n",
diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c
index a393855f02..ffca4121fa 100644
--- a/source3/nsswitch/wbinfo.c
+++ b/source3/nsswitch/wbinfo.c
@@ -647,7 +647,7 @@ static BOOL wbinfo_lookuprids(char *domain_sid, char *arg)
const char *p;
char ridstr[32];
const char **names;
- enum SID_NAME_USE *types;
+ enum lsa_SidType *types;
const char *domain_name;
TALLOC_CTX *mem_ctx;
diff --git a/source3/nsswitch/winbindd.h b/source3/nsswitch/winbindd.h
index 73aaff9a11..98c0e12349 100644
--- a/source3/nsswitch/winbindd.h
+++ b/source3/nsswitch/winbindd.h
@@ -60,7 +60,7 @@ struct sid_ctr {
BOOL finished;
const char *domain;
const char *name;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
};
struct winbindd_cli_state {
@@ -239,7 +239,7 @@ struct winbindd_methods {
const char *domain_name,
const char *name,
DOM_SID *sid,
- enum SID_NAME_USE *type);
+ enum lsa_SidType *type);
/* convert a sid to a user or group name */
NTSTATUS (*sid_to_name)(struct winbindd_domain *domain,
@@ -247,7 +247,7 @@ struct winbindd_methods {
const DOM_SID *sid,
char **domain_name,
char **name,
- enum SID_NAME_USE *type);
+ enum lsa_SidType *type);
NTSTATUS (*rids_to_names)(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
@@ -256,7 +256,7 @@ struct winbindd_methods {
size_t num_rids,
char **domain_name,
char ***names,
- enum SID_NAME_USE **types);
+ enum lsa_SidType **types);
/* lookup user info for a given SID */
NTSTATUS (*query_user)(struct winbindd_domain *domain,
diff --git a/source3/nsswitch/winbindd_async.c b/source3/nsswitch/winbindd_async.c
index bb8b523246..ccc4f219c6 100644
--- a/source3/nsswitch/winbindd_async.c
+++ b/source3/nsswitch/winbindd_async.c
@@ -551,9 +551,9 @@ static void lookupsid_recv(TALLOC_CTX *mem_ctx, BOOL success,
void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ, const char *dom_name,
- const char *name, enum SID_NAME_USE type) =
+ const char *name, enum lsa_SidType type) =
(void (*)(void *, BOOL, const char *, const char *,
- enum SID_NAME_USE))c;
+ enum lsa_SidType))c;
if (!success) {
DEBUG(5, ("Could not trigger lookupsid\n"));
@@ -569,14 +569,14 @@ static void lookupsid_recv(TALLOC_CTX *mem_ctx, BOOL success,
cont(private_data, True, response->data.name.dom_name,
response->data.name.name,
- (enum SID_NAME_USE)response->data.name.type);
+ (enum lsa_SidType)response->data.name.type);
}
void winbindd_lookupsid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
void (*cont)(void *private_data, BOOL success,
const char *dom_name,
const char *name,
- enum SID_NAME_USE type),
+ enum lsa_SidType type),
void *private_data)
{
struct winbindd_domain *domain;
@@ -601,7 +601,7 @@ void winbindd_lookupsid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
enum winbindd_result winbindd_dual_lookupsid(struct winbindd_domain *domain,
struct winbindd_cli_state *state)
{
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
DOM_SID sid;
fstring name;
fstring dom_name;
@@ -638,8 +638,8 @@ static void lookupname_recv(TALLOC_CTX *mem_ctx, BOOL success,
void *c, void *private_data)
{
void (*cont)(void *priv, BOOL succ, const DOM_SID *sid,
- enum SID_NAME_USE type) =
- (void (*)(void *, BOOL, const DOM_SID *, enum SID_NAME_USE))c;
+ enum lsa_SidType type) =
+ (void (*)(void *, BOOL, const DOM_SID *, enum lsa_SidType))c;
DOM_SID sid;
if (!success) {
@@ -662,14 +662,14 @@ static void lookupname_recv(TALLOC_CTX *mem_ctx, BOOL success,
}
cont(private_data, True, &sid,
- (enum SID_NAME_USE)response->data.sid.type);
+ (enum lsa_SidType)response->data.sid.type);
}
void winbindd_lookupname_async(TALLOC_CTX *mem_ctx, const char *dom_name,
const char *name,
void (*cont)(void *private_data, BOOL success,
const DOM_SID *sid,
- enum SID_NAME_USE type),
+ enum lsa_SidType type),
void *private_data)
{
struct winbindd_request request;
@@ -695,7 +695,7 @@ void winbindd_lookupname_async(TALLOC_CTX *mem_ctx, const char *dom_name,
enum winbindd_result winbindd_dual_lookupname(struct winbindd_domain *domain,
struct winbindd_cli_state *state)
{
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
char *name_domain, *name_user;
DOM_SID sid;
char *p;
@@ -812,7 +812,7 @@ enum winbindd_result winbindd_dual_lookuprids(struct winbindd_domain *domain,
DOM_SID domain_sid;
char *domain_name;
char **names;
- enum SID_NAME_USE *types;
+ enum lsa_SidType *types;
NTSTATUS status;
char *result;
@@ -1171,7 +1171,7 @@ struct sid2uid_state {
static void sid2uid_lookup_sid_recv(void *private_data, BOOL success,
const char *dom_name, const char *name,
- enum SID_NAME_USE type);
+ enum lsa_SidType type);
static void sid2uid_noalloc_recv(void *private_data, BOOL success, uid_t uid);
static void sid2uid_alloc_recv(void *private_data, BOOL success, uid_t uid);
static void sid2uid_name2uid_recv(void *private_data, BOOL success, uid_t uid);
@@ -1220,7 +1220,7 @@ void winbindd_sid2uid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
static void sid2uid_lookup_sid_recv(void *private_data, BOOL success,
const char *dom_name, const char *name,
- enum SID_NAME_USE type)
+ enum lsa_SidType type)
{
struct sid2uid_state *state =
talloc_get_type_abort(private_data, struct sid2uid_state);
@@ -1333,7 +1333,7 @@ struct sid2gid_state {
static void sid2gid_lookup_sid_recv(void *private_data, BOOL success,
const char *dom_name, const char *name,
- enum SID_NAME_USE type);
+ enum lsa_SidType type);
static void sid2gid_noalloc_recv(void *private_data, BOOL success, gid_t gid);
static void sid2gid_alloc_recv(void *private_data, BOOL success, gid_t gid);
static void sid2gid_name2gid_recv(void *private_data, BOOL success, gid_t gid);
@@ -1382,7 +1382,7 @@ void winbindd_sid2gid_async(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
static void sid2gid_lookup_sid_recv(void *private_data, BOOL success,
const char *dom_name, const char *name,
- enum SID_NAME_USE type)
+ enum lsa_SidType type)
{
struct sid2gid_state *state =
talloc_get_type_abort(private_data, struct sid2gid_state);
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index cb4f405ee0..2cff894eb4 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -746,7 +746,7 @@ static void centry_end(struct cache_entry *centry, const char *format, ...)
static void wcache_save_name_to_sid(struct winbindd_domain *domain,
NTSTATUS status, const char *domain_name,
const char *name, const DOM_SID *sid,
- enum SID_NAME_USE type)
+ enum lsa_SidType type)
{
struct cache_entry *centry;
fstring uname;
@@ -765,7 +765,7 @@ static void wcache_save_name_to_sid(struct winbindd_domain *domain,
}
static void wcache_save_sid_to_name(struct winbindd_domain *domain, NTSTATUS status,
- const DOM_SID *sid, const char *domain_name, const char *name, enum SID_NAME_USE type)
+ const DOM_SID *sid, const char *domain_name, const char *name, enum lsa_SidType type)
{
struct cache_entry *centry;
fstring sid_string;
@@ -1266,7 +1266,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
const char *domain_name,
const char *name,
DOM_SID *sid,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
struct winbind_cache *cache = get_cache(domain);
struct cache_entry *centry = NULL;
@@ -1281,7 +1281,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
centry = wcache_fetch(cache, domain, "NS/%s/%s", domain_name, uname);
if (!centry)
goto do_query;
- *type = (enum SID_NAME_USE)centry_uint32(centry);
+ *type = (enum lsa_SidType)centry_uint32(centry);
status = centry->status;
if (NT_STATUS_IS_OK(status)) {
centry_sid(centry, mem_ctx, sid);
@@ -1333,7 +1333,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
const DOM_SID *sid,
char **domain_name,
char **name,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
struct winbind_cache *cache = get_cache(domain);
struct cache_entry *centry = NULL;
@@ -1347,7 +1347,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
if (!centry)
goto do_query;
if (NT_STATUS_IS_OK(centry->status)) {
- *type = (enum SID_NAME_USE)centry_uint32(centry);
+ *type = (enum lsa_SidType)centry_uint32(centry);
*domain_name = centry_string(centry, mem_ctx);
*name = centry_string(centry, mem_ctx);
}
@@ -1396,7 +1396,7 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
size_t num_rids,
char **domain_name,
char ***names,
- enum SID_NAME_USE **types)
+ enum lsa_SidType **types)
{
struct winbind_cache *cache = get_cache(domain);
size_t i;
@@ -1417,7 +1417,7 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
}
*names = TALLOC_ARRAY(mem_ctx, char *, num_rids);
- *types = TALLOC_ARRAY(mem_ctx, enum SID_NAME_USE, num_rids);
+ *types = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_rids);
if ((*names == NULL) || (*types == NULL)) {
result = NT_STATUS_NO_MEMORY;
@@ -1447,7 +1447,7 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
if (NT_STATUS_IS_OK(centry->status)) {
char *dom;
have_mapped = True;
- (*types)[i] = (enum SID_NAME_USE)centry_uint32(centry);
+ (*types)[i] = (enum lsa_SidType)centry_uint32(centry);
dom = centry_string(centry, mem_ctx);
if (*domain_name == NULL) {
*domain_name = dom;
@@ -2208,7 +2208,7 @@ void cache_cleanup_response(pid_t pid)
BOOL lookup_cached_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
const char **domain_name, const char **name,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
struct winbindd_domain *domain;
struct winbind_cache *cache;
@@ -2232,7 +2232,7 @@ BOOL lookup_cached_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
}
if (NT_STATUS_IS_OK(centry->status)) {
- *type = (enum SID_NAME_USE)centry_uint32(centry);
+ *type = (enum lsa_SidType)centry_uint32(centry);
*domain_name = centry_string(centry, mem_ctx);
*name = centry_string(centry, mem_ctx);
}
@@ -2246,7 +2246,7 @@ BOOL lookup_cached_name(TALLOC_CTX *mem_ctx,
const char *domain_name,
const char *name,
DOM_SID *sid,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
struct winbindd_domain *domain;
struct winbind_cache *cache;
@@ -2274,7 +2274,7 @@ BOOL lookup_cached_name(TALLOC_CTX *mem_ctx,
}
if (NT_STATUS_IS_OK(centry->status)) {
- *type = (enum SID_NAME_USE)centry_uint32(centry);
+ *type = (enum lsa_SidType)centry_uint32(centry);
centry_sid(centry, mem_ctx, sid);
}
@@ -2286,7 +2286,7 @@ BOOL lookup_cached_name(TALLOC_CTX *mem_ctx,
void cache_name2sid(struct winbindd_domain *domain,
const char *domain_name, const char *name,
- enum SID_NAME_USE type, const DOM_SID *sid)
+ enum lsa_SidType type, const DOM_SID *sid)
{
wcache_save_name_to_sid(domain, NT_STATUS_OK, domain_name, name,
sid, type);
diff --git a/source3/nsswitch/winbindd_creds.c b/source3/nsswitch/winbindd_creds.c
index 75d21353fd..f11b80909b 100644
--- a/source3/nsswitch/winbindd_creds.c
+++ b/source3/nsswitch/winbindd_creds.c
@@ -80,7 +80,7 @@ NTSTATUS winbindd_store_creds(struct winbindd_domain *domain,
/* do lookup ourself */
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
if (!lookup_cached_name(mem_ctx,
domain->name,
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index 80d103336a..2067c43f8b 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -58,7 +58,7 @@ static BOOL fill_grent(struct winbindd_gr *gr, const char *dom_name,
static BOOL fill_grent_mem(struct winbindd_domain *domain,
DOM_SID *group_sid,
- enum SID_NAME_USE group_name_type,
+ enum lsa_SidType group_name_type,
size_t *num_gr_mem, char **gr_mem, size_t *gr_mem_len)
{
DOM_SID *sid_mem = NULL;
@@ -204,7 +204,7 @@ void winbindd_getgrnam(struct winbindd_cli_state *state)
DOM_SID group_sid, tmp_sid;
uint32 grp_rid;
struct winbindd_domain *domain;
- enum SID_NAME_USE name_type;
+ enum lsa_SidType name_type;
fstring name_domain, name_group;
char *tmp, *gr_mem;
size_t gr_mem_len;
@@ -332,7 +332,7 @@ void winbindd_getgrnam(struct winbindd_cli_state *state)
static void getgrgid_got_sid(struct winbindd_cli_state *state, DOM_SID group_sid)
{
struct winbindd_domain *domain;
- enum SID_NAME_USE name_type;
+ enum lsa_SidType name_type;
fstring dom_name;
fstring group_name;
size_t gr_mem_len;
@@ -392,7 +392,7 @@ static void getgrgid_got_sid(struct winbindd_cli_state *state, DOM_SID group_sid
static void getgrgid_recv(void *private_data, BOOL success, const char *sid)
{
struct winbindd_cli_state *state = talloc_get_type_abort(private_data, struct winbindd_cli_state);
- enum SID_NAME_USE name_type;
+ enum lsa_SidType name_type;
DOM_SID group_sid;
if (success) {
@@ -747,7 +747,7 @@ void winbindd_getgrent(struct winbindd_cli_state *state)
if (!NT_STATUS_IS_OK(idmap_sid_to_gid(&group_sid,
&group_gid, 0))) {
union unid_t id;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
DEBUG(10, ("SID %s not in idmap\n",
sid_string_static(&group_sid)));
@@ -1002,7 +1002,7 @@ struct getgroups_state {
};
static void getgroups_usersid_recv(void *private_data, BOOL success,
- const DOM_SID *sid, enum SID_NAME_USE type);
+ const DOM_SID *sid, enum lsa_SidType type);
static void getgroups_tokensids_recv(void *private_data, BOOL success,
DOM_SID *token_sids, size_t num_token_sids);
static void getgroups_sid2gid_recv(void *private_data, BOOL success, gid_t gid);
@@ -1072,7 +1072,7 @@ void winbindd_getgroups(struct winbindd_cli_state *state)
}
static void getgroups_usersid_recv(void *private_data, BOOL success,
- const DOM_SID *sid, enum SID_NAME_USE type)
+ const DOM_SID *sid, enum lsa_SidType type)
{
struct getgroups_state *s =
(struct getgroups_state *)private_data;
diff --git a/source3/nsswitch/winbindd_pam.c b/source3/nsswitch/winbindd_pam.c
index 6741446a68..f27fc610a6 100644
--- a/source3/nsswitch/winbindd_pam.c
+++ b/source3/nsswitch/winbindd_pam.c
@@ -713,7 +713,7 @@ NTSTATUS winbindd_dual_pam_auth_cached(struct winbindd_domain *domain,
uint16 max_allowed_bad_attempts;
fstring name_domain, name_user;
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
uchar new_nt_pass[NT_HASH_LEN];
const uint8 *cached_nt_pass;
const uint8 *cached_salt;
diff --git a/source3/nsswitch/winbindd_passdb.c b/source3/nsswitch/winbindd_passdb.c
index d73917ef83..70590579cc 100644
--- a/source3/nsswitch/winbindd_passdb.c
+++ b/source3/nsswitch/winbindd_passdb.c
@@ -52,7 +52,7 @@ static void add_expanded_sid(const DOM_SID *sid, char **pp_members, size_t *p_nu
char *domain_name = NULL;
char *name = NULL;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
uint32 num_names;
DOM_SID *sid_mem;
@@ -241,7 +241,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
const char *domain_name,
const char *name,
DOM_SID *sid,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
DEBUG(10, ("Finding name %s\n", name));
@@ -262,7 +262,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
const DOM_SID *sid,
char **domain_name,
char **name,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
const char *dom, *nam;
@@ -293,7 +293,7 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
size_t num_rids,
char **domain_name,
char ***names,
- enum SID_NAME_USE **types)
+ enum lsa_SidType **types)
{
return NT_STATUS_UNSUCCESSFUL;
}
diff --git a/source3/nsswitch/winbindd_reconnect.c b/source3/nsswitch/winbindd_reconnect.c
index 8c5d59f9af..6b484bdd06 100644
--- a/source3/nsswitch/winbindd_reconnect.c
+++ b/source3/nsswitch/winbindd_reconnect.c
@@ -87,7 +87,7 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain,
const char *domain_name,
const char *name,
DOM_SID *sid,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
NTSTATUS result;
@@ -111,7 +111,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
const DOM_SID *sid,
char **domain_name,
char **name,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
NTSTATUS result;
@@ -132,7 +132,7 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
size_t num_rids,
char **domain_name,
char ***names,
- enum SID_NAME_USE **types)
+ enum lsa_SidType **types)
{
NTSTATUS result;
diff --git a/source3/nsswitch/winbindd_rpc.c b/source3/nsswitch/winbindd_rpc.c
index abfaa104fc..dcf9b9b26e 100644
--- a/source3/nsswitch/winbindd_rpc.c
+++ b/source3/nsswitch/winbindd_rpc.c
@@ -241,11 +241,11 @@ NTSTATUS msrpc_name_to_sid(struct winbindd_domain *domain,
const char *domain_name,
const char *name,
DOM_SID *sid,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
NTSTATUS result;
DOM_SID *sids = NULL;
- enum SID_NAME_USE *types = NULL;
+ enum lsa_SidType *types = NULL;
const char *full_name;
struct rpc_pipe_client *cli;
POLICY_HND lsa_policy;
@@ -290,11 +290,11 @@ NTSTATUS msrpc_sid_to_name(struct winbindd_domain *domain,
const DOM_SID *sid,
char **domain_name,
char **name,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
char **domains;
char **names;
- enum SID_NAME_USE *types;
+ enum lsa_SidType *types;
NTSTATUS result;
struct rpc_pipe_client *cli;
POLICY_HND lsa_policy;
@@ -311,7 +311,7 @@ NTSTATUS msrpc_sid_to_name(struct winbindd_domain *domain,
if (!NT_STATUS_IS_OK(result))
return result;
- *type = (enum SID_NAME_USE)types[0];
+ *type = (enum lsa_SidType)types[0];
*domain_name = domains[0];
*name = names[0];
DEBUG(5,("Mapped sid to [%s]\\[%s]\n", domains[0], *name));
@@ -325,7 +325,7 @@ NTSTATUS msrpc_rids_to_names(struct winbindd_domain *domain,
size_t num_rids,
char **domain_name,
char ***names,
- enum SID_NAME_USE **types)
+ enum lsa_SidType **types)
{
char **domains;
NTSTATUS result;
diff --git a/source3/nsswitch/winbindd_sid.c b/source3/nsswitch/winbindd_sid.c
index 194104915a..b572771a25 100644
--- a/source3/nsswitch/winbindd_sid.c
+++ b/source3/nsswitch/winbindd_sid.c
@@ -30,7 +30,7 @@
static void lookupsid_recv(void *private_data, BOOL success,
const char *dom_name, const char *name,
- enum SID_NAME_USE type);
+ enum lsa_SidType type);
void winbindd_lookupsid(struct winbindd_cli_state *state)
{
@@ -53,7 +53,7 @@ void winbindd_lookupsid(struct winbindd_cli_state *state)
static void lookupsid_recv(void *private_data, BOOL success,
const char *dom_name, const char *name,
- enum SID_NAME_USE type)
+ enum lsa_SidType type)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
@@ -75,7 +75,7 @@ static void lookupsid_recv(void *private_data, BOOL success,
**/
static void lookupname_recv(void *private_data, BOOL success,
- const DOM_SID *sid, enum SID_NAME_USE type);
+ const DOM_SID *sid, enum lsa_SidType type);
void winbindd_lookupname(struct winbindd_cli_state *state)
{
@@ -107,7 +107,7 @@ void winbindd_lookupname(struct winbindd_cli_state *state)
}
static void lookupname_recv(void *private_data, BOOL success,
- const DOM_SID *sid, enum SID_NAME_USE type)
+ const DOM_SID *sid, enum lsa_SidType type)
{
struct winbindd_cli_state *state =
talloc_get_type_abort(private_data, struct winbindd_cli_state);
@@ -287,14 +287,14 @@ struct uid2sid_state {
uid_t uid;
fstring name;
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
};
static void uid2sid_uid2name_recv(void *private_data, BOOL success,
const char *username);
static void uid2sid_lookupname_recv(void *private_data, BOOL success,
const DOM_SID *sid,
- enum SID_NAME_USE type);
+ enum lsa_SidType type);
static void uid2sid_idmap_set_mapping_recv(void *private_data, BOOL success);
static void uid2sid_recv(void *private_data, BOOL success, const char *sid);
@@ -394,7 +394,7 @@ static void uid2sid_uid2name_recv(void *private_data, BOOL success,
}
static void uid2sid_lookupname_recv(void *private_data, BOOL success,
- const DOM_SID *sid, enum SID_NAME_USE type)
+ const DOM_SID *sid, enum lsa_SidType type)
{
struct uid2sid_state *state =
talloc_get_type_abort(private_data, struct uid2sid_state);
@@ -432,14 +432,14 @@ struct gid2sid_state {
gid_t gid;
fstring name;
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
};
static void gid2sid_gid2name_recv(void *private_data, BOOL success,
const char *groupname);
static void gid2sid_lookupname_recv(void *private_data, BOOL success,
const DOM_SID *sid,
- enum SID_NAME_USE type);
+ enum lsa_SidType type);
static void gid2sid_idmap_set_mapping_recv(void *private_data, BOOL success);
static void gid2sid_recv(void *private_data, BOOL success, const char *sid);
@@ -542,7 +542,7 @@ static void gid2sid_gid2name_recv(void *private_data, BOOL success,
}
static void gid2sid_lookupname_recv(void *private_data, BOOL success,
- const DOM_SID *sid, enum SID_NAME_USE type)
+ const DOM_SID *sid, enum lsa_SidType type)
{
struct gid2sid_state *state =
talloc_get_type_abort(private_data, struct gid2sid_state);
diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c
index 98df77c0f2..4cc4eac691 100644
--- a/source3/nsswitch/winbindd_user.c
+++ b/source3/nsswitch/winbindd_user.c
@@ -314,7 +314,7 @@ static void getpwsid_sid2gid_recv(void *private_data, BOOL success, gid_t gid)
/* Return a password structure from a username. */
static void getpwnam_name2sid_recv(void *private_data, BOOL success,
- const DOM_SID *sid, enum SID_NAME_USE type);
+ const DOM_SID *sid, enum lsa_SidType type);
void winbindd_getpwnam(struct winbindd_cli_state *state)
{
@@ -360,7 +360,7 @@ void winbindd_getpwnam(struct winbindd_cli_state *state)
}
static void getpwnam_name2sid_recv(void *private_data, BOOL success,
- const DOM_SID *sid, enum SID_NAME_USE type)
+ const DOM_SID *sid, enum lsa_SidType type)
{
struct winbindd_cli_state *state =
(struct winbindd_cli_state *)private_data;
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index acaca16f0a..cb1a810541 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -691,7 +691,7 @@ BOOL winbindd_lookup_sid_by_name(TALLOC_CTX *mem_ctx,
struct winbindd_domain *domain,
const char *domain_name,
const char *name, DOM_SID *sid,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
NTSTATUS result;
@@ -721,7 +721,7 @@ BOOL winbindd_lookup_name_by_sid(TALLOC_CTX *mem_ctx,
DOM_SID *sid,
fstring dom_name,
fstring name,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
char *names;
char *dom_names;
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index dbd466fe40..b339754c6d 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -33,7 +33,7 @@
BOOL lookup_name(TALLOC_CTX *mem_ctx,
const char *full_name, int flags,
const char **ret_domain, const char **ret_name,
- DOM_SID *ret_sid, enum SID_NAME_USE *ret_type)
+ DOM_SID *ret_sid, enum lsa_SidType *ret_type)
{
char *p;
const char *tmp;
@@ -41,7 +41,7 @@ BOOL lookup_name(TALLOC_CTX *mem_ctx,
const char *name = NULL;
uint32 rid;
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
if (tmp_ctx == NULL) {
@@ -232,7 +232,7 @@ BOOL lookup_name(TALLOC_CTX *mem_ctx,
if (IS_DC && winbind_lookup_name("", name, &sid, &type)) {
DOM_SID dom_sid;
uint32 tmp_rid;
- enum SID_NAME_USE domain_type;
+ enum lsa_SidType domain_type;
if (type == SID_NAME_DOMAIN) {
/* Swap name and type */
@@ -332,7 +332,7 @@ BOOL lookup_name(TALLOC_CTX *mem_ctx,
BOOL lookup_name_smbconf(TALLOC_CTX *mem_ctx,
const char *full_name, int flags,
const char **ret_domain, const char **ret_name,
- DOM_SID *ret_sid, enum SID_NAME_USE *ret_type)
+ DOM_SID *ret_sid, enum lsa_SidType *ret_type)
{
char *qualified_name;
const char *p;
@@ -393,11 +393,11 @@ static BOOL wb_lookup_rids(TALLOC_CTX *mem_ctx,
const DOM_SID *domain_sid,
int num_rids, uint32 *rids,
const char **domain_name,
- const char **names, enum SID_NAME_USE *types)
+ const char **names, enum lsa_SidType *types)
{
int i;
const char **my_names;
- enum SID_NAME_USE *my_types;
+ enum lsa_SidType *my_types;
TALLOC_CTX *tmp_ctx;
if (!(tmp_ctx = talloc_init("wb_lookup_rids"))) {
@@ -435,12 +435,12 @@ static BOOL wb_lookup_rids(TALLOC_CTX *mem_ctx,
static BOOL lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid,
int num_rids, uint32_t *rids,
const char **domain_name,
- const char ***names, enum SID_NAME_USE **types)
+ const char ***names, enum lsa_SidType **types)
{
int i;
*names = TALLOC_ARRAY(mem_ctx, const char *, num_rids);
- *types = TALLOC_ARRAY(mem_ctx, enum SID_NAME_USE, num_rids);
+ *types = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_rids);
if ((*names == NULL) || (*types == NULL)) {
return False;
@@ -549,7 +549,7 @@ static BOOL lookup_as_domain(const DOM_SID *sid, TALLOC_CTX *mem_ctx,
const char **name)
{
const char *tmp;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
if (sid_check_is_domain(sid)) {
*name = talloc_strdup(mem_ctx, get_global_sam_name());
@@ -809,7 +809,7 @@ NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
uint32_t *rids;
const char *domain_name = NULL;
const char **names;
- enum SID_NAME_USE *types;
+ enum lsa_SidType *types;
struct lsa_dom_info *dom = &dom_infos[i];
if (!dom->valid) {
@@ -871,7 +871,7 @@ NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
BOOL lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
const char **ret_domain, const char **ret_name,
- enum SID_NAME_USE *ret_type)
+ enum lsa_SidType *ret_type)
{
struct lsa_dom_info *domain;
struct lsa_name_info *name;
@@ -941,14 +941,14 @@ static struct uid_sid_cache {
struct uid_sid_cache *next, *prev;
uid_t uid;
DOM_SID sid;
- enum SID_NAME_USE sidtype;
+ enum lsa_SidType sidtype;
} *uid_sid_cache_head;
static struct gid_sid_cache {
struct gid_sid_cache *next, *prev;
gid_t gid;
DOM_SID sid;
- enum SID_NAME_USE sidtype;
+ enum lsa_SidType sidtype;
} *gid_sid_cache_head;
/*****************************************************************
@@ -1194,7 +1194,7 @@ void gid_to_sid(DOM_SID *psid, gid_t gid)
BOOL sid_to_uid(const DOM_SID *psid, uid_t *puid)
{
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
uint32 rid;
gid_t gid;
@@ -1271,7 +1271,7 @@ BOOL sid_to_gid(const DOM_SID *psid, gid_t *pgid)
uint32 rid;
GROUP_MAP map;
union unid_t id;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
uid_t uid;
if (fetch_gid_from_cache(pgid, psid))
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 8229fd68ab..da3ddb3914 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -551,7 +551,7 @@ BOOL algorithmic_pdb_rid_is_user(uint32 rid)
********************************************************************/
BOOL lookup_global_sam_name(const char *user, int flags, uint32_t *rid,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
GROUP_MAP map;
BOOL ret;
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c
index 3b774b510b..466508e99b 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -166,7 +166,7 @@ const DOM_SID *pdb_get_group_sid(struct samu *sampass)
}
if ( pdb_gid_to_sid(pwd->pw_gid, gsid) ) {
- enum SID_NAME_USE type = SID_NAME_UNKNOWN;
+ enum lsa_SidType type = SID_NAME_UNKNOWN;
TALLOC_CTX *mem_ctx = talloc_init("pdb_get_group_sid");
BOOL lookup_ret;
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index a42f8325f6..cc05d97468 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -46,7 +46,7 @@ static void lazy_initialize_passdb(void)
static BOOL lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32 rid,
const char **name,
- enum SID_NAME_USE *psid_name_use,
+ enum lsa_SidType *psid_name_use,
union unid_t *unix_id);
/*******************************************************************
Clean up uninitialised passwords. The only way to tell
@@ -696,7 +696,7 @@ NTSTATUS pdb_delete_group_mapping_entry(DOM_SID sid)
return pdb->delete_group_mapping_entry(pdb, sid);
}
-BOOL pdb_enum_group_mapping(const DOM_SID *sid, enum SID_NAME_USE sid_name_use, GROUP_MAP **pp_rmap,
+BOOL pdb_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)
{
struct pdb_methods *pdb = pdb_get_methods();
@@ -988,7 +988,7 @@ NTSTATUS pdb_lookup_rids(const DOM_SID *domain_sid,
int num_rids,
uint32 *rids,
const char **names,
- enum SID_NAME_USE *attrs)
+ enum lsa_SidType *attrs)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->lookup_rids(pdb, domain_sid, num_rids, rids, names, attrs);
@@ -998,7 +998,7 @@ NTSTATUS pdb_lookup_names(const DOM_SID *domain_sid,
int num_names,
const char **names,
uint32 *rids,
- enum SID_NAME_USE *attrs)
+ enum lsa_SidType *attrs)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->lookup_names(pdb, domain_sid, num_names, names, rids, attrs);
@@ -1035,7 +1035,7 @@ BOOL pdb_gid_to_sid(gid_t gid, DOM_SID *sid)
}
BOOL pdb_sid_to_id(const DOM_SID *sid, union unid_t *id,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->sid_to_id(pdb, sid, id, type);
@@ -1058,7 +1058,7 @@ BOOL pdb_new_rid(uint32 *rid)
{
struct pdb_methods *pdb = pdb_get_methods();
const char *name = NULL;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
uint32 allocated_rid = 0;
int i;
TALLOC_CTX *ctx;
@@ -1253,7 +1253,7 @@ static BOOL pdb_default_gid_to_sid(struct pdb_methods *methods, gid_t gid,
static BOOL pdb_default_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)
{
TALLOC_CTX *mem_ctx;
BOOL ret = False;
@@ -1471,7 +1471,7 @@ NTSTATUS pdb_default_enum_group_memberships(struct pdb_methods *methods,
static BOOL lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32 rid,
const char **name,
- enum SID_NAME_USE *psid_name_use,
+ enum lsa_SidType *psid_name_use,
union unid_t *unix_id)
{
struct samu *sam_account = NULL;
@@ -1563,7 +1563,7 @@ NTSTATUS pdb_default_lookup_rids(struct pdb_methods *methods,
int num_rids,
uint32 *rids,
const char **names,
- enum SID_NAME_USE *attrs)
+ enum lsa_SidType *attrs)
{
int i;
NTSTATUS result;
@@ -1626,7 +1626,7 @@ NTSTATUS pdb_default_lookup_names(struct pdb_methods *methods,
int num_names,
const char **names,
uint32 *rids,
- enum SID_NAME_USE *attrs)
+ enum lsa_SidType *attrs)
{
int i;
NTSTATUS result;
@@ -1842,7 +1842,7 @@ static void search_end_groups(struct pdb_search *search)
}
static BOOL pdb_search_grouptype(struct pdb_search *search,
- const DOM_SID *sid, enum SID_NAME_USE type)
+ const DOM_SID *sid, enum lsa_SidType type)
{
struct group_search *state;
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index afc95fe90f..865bcdfc9f 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -2156,7 +2156,7 @@ static BOOL init_group_from_ldap(struct ldapsam_privates *ldap_state,
get_attr_key2string( groupmap_attr_list, LDAP_ATTR_GROUP_TYPE)));
return False;
}
- map->sid_name_use = (enum SID_NAME_USE)atol(temp);
+ map->sid_name_use = (enum lsa_SidType)atol(temp);
if ((map->sid_name_use < SID_NAME_USER) ||
(map->sid_name_use > SID_NAME_UNKNOWN)) {
@@ -3104,7 +3104,7 @@ static NTSTATUS ldapsam_getsamgrent(struct pdb_methods *my_methods,
*********************************************************************/
static NTSTATUS ldapsam_enum_group_mapping(struct pdb_methods *methods,
- const DOM_SID *domsid, enum SID_NAME_USE sid_name_use,
+ const DOM_SID *domsid, enum lsa_SidType sid_name_use,
GROUP_MAP **pp_rmap,
size_t *p_num_entries,
BOOL unix_only)
@@ -3166,7 +3166,7 @@ static NTSTATUS ldapsam_modify_aliasmem(struct pdb_methods *methods,
int count;
LDAPMod **mods = NULL;
int rc;
- enum SID_NAME_USE type = SID_NAME_USE_NONE;
+ enum lsa_SidType type = SID_NAME_USE_NONE;
pstring filter;
@@ -3278,7 +3278,7 @@ static NTSTATUS ldapsam_enum_aliasmem(struct pdb_methods *methods,
int i;
pstring filter;
size_t num_members = 0;
- enum SID_NAME_USE type = SID_NAME_USE_NONE;
+ enum lsa_SidType type = SID_NAME_USE_NONE;
*pp_members = NULL;
*p_num_members = 0;
@@ -3377,7 +3377,7 @@ static NTSTATUS ldapsam_alias_memberships(struct pdb_methods *methods,
int i;
int rc;
char *filter;
- enum SID_NAME_USE type = SID_NAME_USE_NONE;
+ enum lsa_SidType type = SID_NAME_USE_NONE;
if (sid_check_is_builtin(domain_sid)) {
type = SID_NAME_ALIAS;
@@ -3644,7 +3644,7 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
int num_rids,
uint32 *rids,
const char **names,
- enum SID_NAME_USE *attrs)
+ enum lsa_SidType *attrs)
{
struct ldapsam_privates *ldap_state =
(struct ldapsam_privates *)methods->private_data;
@@ -3794,7 +3794,7 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
uint32 rid;
int rid_index;
const char *attr;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
const char *dn = smbldap_talloc_dn(mem_ctx, ld, entry);
attr = smbldap_talloc_single_attribute(ld, entry, "sambaGroupType",
@@ -3805,7 +3805,7 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
continue;
}
- type = (enum SID_NAME_USE)atol(attr);
+ type = (enum lsa_SidType)atol(attr);
/* Consistency checks */
if ((is_builtin && (type != SID_NAME_ALIAS)) ||
@@ -4326,7 +4326,7 @@ static BOOL ldapgroup2displayentry(struct ldap_search_state *state,
static BOOL ldapsam_search_grouptype(struct pdb_methods *methods,
struct pdb_search *search,
const DOM_SID *sid,
- enum SID_NAME_USE type)
+ enum lsa_SidType type)
{
struct ldapsam_privates *ldap_state =
(struct ldapsam_privates *)methods->private_data;
@@ -4513,7 +4513,7 @@ static BOOL ldapsam_new_rid(struct pdb_methods *methods, uint32 *rid)
static BOOL ldapsam_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)
{
struct ldapsam_privates *priv =
(struct ldapsam_privates *)methods->private_data;
@@ -4576,7 +4576,7 @@ static BOOL ldapsam_sid_to_id(struct pdb_methods *methods,
}
id->gid = strtoul(gid_str, NULL, 10);
- *type = (enum SID_NAME_USE)strtoul(value, NULL, 10);
+ *type = (enum lsa_SidType)strtoul(value, NULL, 10);
ret = True;
goto done;
}
diff --git a/source3/python/py_lsa.c b/source3/python/py_lsa.c
index 711641828d..068190c020 100644
--- a/source3/python/py_lsa.c
+++ b/source3/python/py_lsa.c
@@ -147,7 +147,7 @@ static PyObject *lsa_lookup_names(PyObject *self, PyObject *args)
const char **names;
DOM_SID *sids;
TALLOC_CTX *mem_ctx = NULL;
- enum SID_NAME_USE *name_types;
+ enum lsa_SidType *name_types;
if (!PyArg_ParseTuple(args, "O", &py_names))
return NULL;
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index 7e29332ef9..15a1a93721 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -177,7 +177,7 @@ NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
const DOM_SID *sids,
char ***domains,
char ***names,
- enum SID_NAME_USE **types)
+ enum lsa_SidType **types)
{
prs_struct qbuf, rbuf;
LSA_Q_LOOKUP_SIDS q;
@@ -233,7 +233,7 @@ NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
goto done;
}
- if (!((*types) = TALLOC_ARRAY(mem_ctx, enum SID_NAME_USE, num_sids))) {
+ if (!((*types) = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_sids))) {
DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
result = NT_STATUS_NO_MEMORY;
goto done;
@@ -254,7 +254,7 @@ NTSTATUS rpccli_lsa_lookup_sids(struct rpc_pipe_client *cli,
(*names)[i] = talloc_strdup(mem_ctx, name);
(*domains)[i] = talloc_strdup(mem_ctx, dom_name);
- (*types)[i] = (enum SID_NAME_USE)t_names.name[i].sid_name_use;
+ (*types)[i] = (enum lsa_SidType)t_names.name[i].sid_name_use;
if (((*names)[i] == NULL) || ((*domains)[i] == NULL)) {
DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
@@ -282,7 +282,7 @@ NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
const char **names,
const char ***dom_names,
DOM_SID **sids,
- enum SID_NAME_USE **types)
+ enum lsa_SidType **types)
{
prs_struct qbuf, rbuf;
LSA_Q_LOOKUP_NAMES q;
@@ -329,7 +329,7 @@ NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
goto done;
}
- if (!((*types = TALLOC_ARRAY(mem_ctx, enum SID_NAME_USE, num_names)))) {
+ if (!((*types = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_names)))) {
DEBUG(0, ("cli_lsa_lookup_sids(): out of memory\n"));
result = NT_STATUS_NO_MEMORY;
goto done;
@@ -365,7 +365,7 @@ NTSTATUS rpccli_lsa_lookup_names(struct rpc_pipe_client *cli,
sid_append_rid(sid, dom_rid);
}
- (*types)[i] = (enum SID_NAME_USE)t_rids[i].type;
+ (*types)[i] = (enum lsa_SidType)t_rids[i].type;
if (dom_names == NULL) {
continue;
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index a8b153b9fa..eda3c428a9 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -4887,7 +4887,7 @@ inits a SAMR_R_LOOKUP_NAMES structure.
NTSTATUS init_samr_r_lookup_names(TALLOC_CTX *ctx, SAMR_R_LOOKUP_NAMES * r_u,
uint32 num_rids,
- uint32 *rid, enum SID_NAME_USE *type,
+ uint32 *rid, enum lsa_SidType *type,
NTSTATUS status)
{
DEBUG(5, ("init_samr_r_lookup_names\n"));
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index 41df870414..f60d352942 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -164,7 +164,7 @@ static NTSTATUS lookup_lsa_rids(TALLOC_CTX *mem_ctx,
int dom_idx;
char *full_name;
const char *domain;
- enum SID_NAME_USE type = SID_NAME_UNKNOWN;
+ enum lsa_SidType type = SID_NAME_UNKNOWN;
/* Split name into domain and user component */
@@ -239,7 +239,7 @@ static NTSTATUS lookup_lsa_sids(TALLOC_CTX *mem_ctx,
int dom_idx;
char *full_name;
const char *domain;
- enum SID_NAME_USE type = SID_NAME_UNKNOWN;
+ enum lsa_SidType type = SID_NAME_UNKNOWN;
/* Split name into domain and user component */
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 67fa7f283c..a0b6d4763a 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -1377,7 +1377,7 @@ NTSTATUS _samr_query_aliasinfo(pipes_struct *p, SAMR_Q_QUERY_ALIASINFO *q_u, SAM
NTSTATUS _samr_lookup_names(pipes_struct *p, SAMR_Q_LOOKUP_NAMES *q_u, SAMR_R_LOOKUP_NAMES *r_u)
{
uint32 rid[MAX_SAM_ENTRIES];
- enum SID_NAME_USE type[MAX_SAM_ENTRIES];
+ enum lsa_SidType type[MAX_SAM_ENTRIES];
int i;
int num_rids = q_u->num_names2;
DOM_SID pol_sid;
@@ -1618,7 +1618,7 @@ static BOOL make_samr_lookup_rids(TALLOC_CTX *ctx, uint32 num_names,
NTSTATUS _samr_lookup_rids(pipes_struct *p, SAMR_Q_LOOKUP_RIDS *q_u, SAMR_R_LOOKUP_RIDS *r_u)
{
const char **names;
- enum SID_NAME_USE *attrs = NULL;
+ enum lsa_SidType *attrs = NULL;
uint32 *wire_attrs = NULL;
UNIHDR *hdr_name = NULL;
UNISTR2 *uni_name = NULL;
@@ -1642,7 +1642,7 @@ NTSTATUS _samr_lookup_rids(pipes_struct *p, SAMR_Q_LOOKUP_RIDS *q_u, SAMR_R_LOOK
}
names = TALLOC_ZERO_ARRAY(p->mem_ctx, const char *, num_rids);
- attrs = TALLOC_ZERO_ARRAY(p->mem_ctx, enum SID_NAME_USE, num_rids);
+ attrs = TALLOC_ZERO_ARRAY(p->mem_ctx, enum lsa_SidType, num_rids);
wire_attrs = TALLOC_ZERO_ARRAY(p->mem_ctx, uint32, num_rids);
if ((num_rids != 0) && ((names == NULL) || (attrs == NULL) || (wire_attrs==NULL)))
@@ -1661,7 +1661,7 @@ NTSTATUS _samr_lookup_rids(pipes_struct *p, SAMR_Q_LOOKUP_RIDS *q_u, SAMR_R_LOOK
&hdr_name, &uni_name))
return NT_STATUS_NO_MEMORY;
- /* Convert from enum SID_NAME_USE to uint32 for wire format. */
+ /* Convert from enum lsa_SidType to uint32 for wire format. */
for (i = 0; i < num_rids; i++) {
wire_attrs[i] = (uint32)attrs[i];
}
@@ -2391,7 +2391,7 @@ NTSTATUS _samr_query_domain_info(pipes_struct *p,
static NTSTATUS can_create(TALLOC_CTX *mem_ctx, const char *new_name)
{
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
BOOL result;
DEBUG(10, ("Checking whether [%s] can be created\n", new_name));
@@ -2933,7 +2933,7 @@ NTSTATUS _samr_open_alias(pipes_struct *p, SAMR_Q_OPEN_ALIAS *q_u, SAMR_R_OPEN_A
{
/* Check we actually have the requested alias */
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
BOOL result;
gid_t gid;
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index 4c65341740..3cd242cd4d 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -31,7 +31,7 @@ static NTSTATUS name_to_sid(struct rpc_pipe_client *cli,
DOM_SID *sid, const char *name)
{
POLICY_HND pol;
- enum SID_NAME_USE *sid_types;
+ enum lsa_SidType *sid_types;
NTSTATUS result;
DOM_SID *sids;
@@ -223,7 +223,7 @@ static NTSTATUS cmd_lsa_lookup_names(struct rpc_pipe_client *cli,
POLICY_HND pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
DOM_SID *sids;
- enum SID_NAME_USE *types;
+ enum lsa_SidType *types;
int i;
if (argc == 1) {
@@ -272,7 +272,7 @@ static NTSTATUS cmd_lsa_lookup_sids(struct rpc_pipe_client *cli, TALLOC_CTX *mem
DOM_SID *sids;
char **domains;
char **names;
- enum SID_NAME_USE *types;
+ enum lsa_SidType *types;
int i;
if (argc == 1) {
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index da1def4361..637d5b4120 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -1977,7 +1977,7 @@ static BOOL api_NetUserGetGroups(connection_struct *conn,uint16 vuid, char *para
size_t i;
NTSTATUS result;
DOM_SID user_sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
TALLOC_CTX *mem_ctx;
*rparam_len = 8;
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index d0ad6fa7e6..734feef4f7 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -420,7 +420,7 @@ static NTSTATUS find_forced_group(BOOL force_user,
NTSTATUS result = NT_STATUS_NO_SUCH_GROUP;
TALLOC_CTX *mem_ctx;
DOM_SID group_sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
char *groupname;
BOOL user_must_be_member = False;
gid_t gid;
diff --git a/source3/smbd/share_access.c b/source3/smbd/share_access.c
index 09b56c3522..cee88bcf0b 100644
--- a/source3/smbd/share_access.c
+++ b/source3/smbd/share_access.c
@@ -73,7 +73,7 @@ static BOOL token_contains_name(TALLOC_CTX *mem_ctx,
{
const char *prefix;
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
if (username != NULL) {
name = talloc_sub_basic(mem_ctx, username,
diff --git a/source3/utils/net_groupmap.c b/source3/utils/net_groupmap.c
index 4708efa908..ad1a141cfc 100644
--- a/source3/utils/net_groupmap.c
+++ b/source3/utils/net_groupmap.c
@@ -188,7 +188,7 @@ static int net_groupmap_add(int argc, const char **argv)
fstring string_sid = "";
fstring type = "";
fstring ntcomment = "";
- enum SID_NAME_USE sid_type = SID_NAME_DOM_GRP;
+ enum lsa_SidType sid_type = SID_NAME_DOM_GRP;
uint32 rid = 0;
gid_t gid;
int i;
@@ -345,7 +345,7 @@ static int net_groupmap_modify(int argc, const char **argv)
fstring ntgroup = "";
fstring unixgrp = "";
fstring sid_string = "";
- enum SID_NAME_USE sid_type = SID_NAME_UNKNOWN;
+ enum lsa_SidType sid_type = SID_NAME_UNKNOWN;
int i;
gid_t gid;
diff --git a/source3/utils/net_lookup.c b/source3/utils/net_lookup.c
index ebc7ba98b0..00cf2f6213 100644
--- a/source3/utils/net_lookup.c
+++ b/source3/utils/net_lookup.c
@@ -247,7 +247,7 @@ static int net_lookup_name(int argc, const char **argv)
{
const char *dom, *name;
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
if (argc != 1) {
d_printf("usage: net lookup name <name>\n");
@@ -269,7 +269,7 @@ static int net_lookup_sid(int argc, const char **argv)
{
const char *dom, *name;
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
if (argc != 1) {
d_printf("usage: net lookup sid <sid>\n");
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index e0c361822d..b05eff8088 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -1330,7 +1330,7 @@ static NTSTATUS rpc_sh_handle_user(TALLOC_CTX *mem_ctx,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
DOM_SID sid;
uint32 rid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
if (argc == 0) {
d_fprintf(stderr, "usage: %s <username>\n", ctx->whoami);
@@ -2008,10 +2008,10 @@ static NTSTATUS get_sid_from_name(struct cli_state *cli,
TALLOC_CTX *mem_ctx,
const char *name,
DOM_SID *sid,
- enum SID_NAME_USE *type)
+ enum lsa_SidType *type)
{
DOM_SID *sids = NULL;
- enum SID_NAME_USE *types = NULL;
+ enum lsa_SidType *types = NULL;
struct rpc_pipe_client *pipe_hnd;
POLICY_HND lsa_pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
@@ -2131,7 +2131,7 @@ static NTSTATUS rpc_add_aliasmem(struct rpc_pipe_client *pipe_hnd,
POLICY_HND alias_pol;
DOM_SID member_sid;
- enum SID_NAME_USE member_type;
+ enum lsa_SidType member_type;
DOM_SID sid;
@@ -2192,7 +2192,7 @@ static NTSTATUS rpc_group_addmem_internals(const DOM_SID *domain_sid,
const char **argv)
{
DOM_SID group_sid;
- enum SID_NAME_USE group_type;
+ enum lsa_SidType group_type;
if (argc != 2) {
d_printf("Usage: 'net rpc group addmem <group> <member>\n");
@@ -2308,7 +2308,7 @@ static NTSTATUS rpc_del_aliasmem(struct rpc_pipe_client *pipe_hnd,
POLICY_HND alias_pol;
DOM_SID member_sid;
- enum SID_NAME_USE member_type;
+ enum lsa_SidType member_type;
DOM_SID sid;
@@ -2366,7 +2366,7 @@ static NTSTATUS rpc_group_delmem_internals(const DOM_SID *domain_sid,
const char **argv)
{
DOM_SID group_sid;
- enum SID_NAME_USE group_type;
+ enum lsa_SidType group_type;
if (argc != 2) {
d_printf("Usage: 'net rpc group delmem <group> <member>\n");
@@ -2717,7 +2717,7 @@ static NTSTATUS rpc_list_alias_members(struct rpc_pipe_client *pipe_hnd,
DOM_SID *alias_sids;
char **domains;
char **names;
- enum SID_NAME_USE *types;
+ enum lsa_SidType *types;
int i;
result = rpccli_samr_open_alias(pipe_hnd, mem_ctx, domain_pol,
@@ -4075,7 +4075,7 @@ static NTSTATUS rpc_aliaslist_dump(const DOM_SID *domain_sid,
for (i=0; i<num_server_aliases; i++) {
char **names;
char **domains;
- enum SID_NAME_USE *types;
+ enum lsa_SidType *types;
int j;
struct full_alias *alias = &server_aliases[i];
diff --git a/source3/utils/net_rpc_rights.c b/source3/utils/net_rpc_rights.c
index 11f5ea5fab..11c4991e7d 100644
--- a/source3/utils/net_rpc_rights.c
+++ b/source3/utils/net_rpc_rights.c
@@ -29,7 +29,7 @@ static NTSTATUS sid_to_name(struct rpc_pipe_client *pipe_hnd,
fstring name)
{
POLICY_HND pol;
- enum SID_NAME_USE *sid_types;
+ enum lsa_SidType *sid_types;
NTSTATUS result;
char **domains, **names;
@@ -60,7 +60,7 @@ static NTSTATUS name_to_sid(struct rpc_pipe_client *pipe_hnd,
DOM_SID *sid, const char *name)
{
POLICY_HND pol;
- enum SID_NAME_USE *sid_types;
+ enum lsa_SidType *sid_types;
NTSTATUS result;
DOM_SID *sids;
diff --git a/source3/utils/net_sam.c b/source3/utils/net_sam.c
index 654c9ec5b2..9edbc7b8cf 100644
--- a/source3/utils/net_sam.c
+++ b/source3/utils/net_sam.c
@@ -32,7 +32,7 @@ static int net_sam_userset(int argc, const char **argv, const char *field,
{
struct samu *sam_acct = NULL;
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
const char *dom, *name;
NTSTATUS status;
@@ -127,7 +127,7 @@ static int net_sam_set_userflag(int argc, const char **argv, const char *field,
{
struct samu *sam_acct = NULL;
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
const char *dom, *name;
NTSTATUS status;
uint16 acct_flags;
@@ -215,7 +215,7 @@ static int net_sam_set_time(int argc, const char **argv, const char *field,
{
struct samu *sam_acct = NULL;
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
const char *dom, *name;
NTSTATUS status;
time_t new_time;
@@ -302,7 +302,7 @@ static int net_sam_set_comment(int argc, const char **argv)
{
GROUP_MAP map;
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
const char *dom, *name;
NTSTATUS status;
@@ -462,7 +462,7 @@ static int net_sam_createbuiltingroup(int argc, const char **argv)
{
NTSTATUS status;
uint32 rid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
fstring groupname;
DOM_SID sid;
@@ -514,7 +514,7 @@ static int net_sam_addmem(int argc, const char **argv)
{
const char *groupdomain, *groupname, *memberdomain, *membername;
DOM_SID group, member;
- enum SID_NAME_USE grouptype, membertype;
+ enum lsa_SidType grouptype, membertype;
NTSTATUS status;
if (argc != 2) {
@@ -587,7 +587,7 @@ static int net_sam_delmem(int argc, const char **argv)
const char *memberdomain = NULL;
const char *membername = NULL;
DOM_SID group, member;
- enum SID_NAME_USE grouptype;
+ enum lsa_SidType grouptype;
NTSTATUS status;
if (argc != 2) {
@@ -645,7 +645,7 @@ static int net_sam_listmem(int argc, const char **argv)
{
const char *groupdomain, *groupname;
DOM_SID group;
- enum SID_NAME_USE grouptype;
+ enum lsa_SidType grouptype;
NTSTATUS status;
if (argc != 1) {
@@ -793,7 +793,7 @@ static int net_sam_list(int argc, const char **argv)
static int net_sam_show(int argc, const char **argv)
{
DOM_SID sid;
- enum SID_NAME_USE type;
+ enum lsa_SidType type;
const char *dom, *name;
if (argc != 1) {
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c
index 953c67d62e..be39a75465 100644
--- a/source3/utils/net_util.c
+++ b/source3/utils/net_util.c
@@ -32,14 +32,14 @@ BOOL is_valid_policy_hnd(const POLICY_HND *hnd)
NTSTATUS net_rpc_lookup_name(TALLOC_CTX *mem_ctx, struct cli_state *cli,
const char *name, const char **ret_domain,
const char **ret_name, DOM_SID *ret_sid,
- enum SID_NAME_USE *ret_type)
+ enum lsa_SidType *ret_type)
{
struct rpc_pipe_client *lsa_pipe;
POLICY_HND pol;
NTSTATUS result = NT_STATUS_OK;
const char **dom_names;
DOM_SID *sids;
- enum SID_NAME_USE *types;
+ enum lsa_SidType *types;
ZERO_STRUCT(pol);
diff --git a/source3/utils/netlookup.c b/source3/utils/netlookup.c
index d82630e5c8..33b6c4bb25 100644
--- a/source3/utils/netlookup.c
+++ b/source3/utils/netlookup.c
@@ -157,7 +157,7 @@ NTSTATUS net_lookup_name_from_sid(TALLOC_CTX *ctx,
struct con_struct *csp = NULL;
char **domains;
char **names;
- enum SID_NAME_USE *types;
+ enum lsa_SidType *types;
*ppdomain = NULL;
*ppname = NULL;
@@ -195,7 +195,7 @@ NTSTATUS net_lookup_sid_from_name(TALLOC_CTX *ctx, const char *full_name, DOM_SI
NTSTATUS nt_status;
struct con_struct *csp = NULL;
DOM_SID *sids = NULL;
- enum SID_NAME_USE *types = NULL;
+ enum lsa_SidType *types = NULL;
csp = create_cs(ctx, &nt_status);
if (csp == NULL) {
diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 6dc9f78ad1..85c59db5ec 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -108,7 +108,7 @@ static void SidToString(fstring str, DOM_SID *sid)
{
char **domains = NULL;
char **names = NULL;
- enum SID_NAME_USE *types = NULL;
+ enum lsa_SidType *types = NULL;
sid_to_string(str, sid);
@@ -135,7 +135,7 @@ static void SidToString(fstring str, DOM_SID *sid)
/* convert a string to a SID, either numeric or username/group */
static BOOL StringToSid(DOM_SID *sid, const char *str)
{
- enum SID_NAME_USE *types = NULL;
+ enum lsa_SidType *types = NULL;
DOM_SID *sids = NULL;
BOOL result = True;
diff --git a/source3/utils/smbcquotas.c b/source3/utils/smbcquotas.c
index 6193395e7e..40f4a86f96 100644
--- a/source3/utils/smbcquotas.c
+++ b/source3/utils/smbcquotas.c
@@ -79,7 +79,7 @@ static void SidToString(fstring str, DOM_SID *sid, BOOL _numeric)
{
char **domains = NULL;
char **names = NULL;
- enum SID_NAME_USE *types = NULL;
+ enum lsa_SidType *types = NULL;
sid_to_string(str, sid);
@@ -106,7 +106,7 @@ static void SidToString(fstring str, DOM_SID *sid, BOOL _numeric)
/* convert a string to a SID, either numeric or username/group */
static BOOL StringToSid(DOM_SID *sid, const char *str)
{
- enum SID_NAME_USE *types = NULL;
+ enum lsa_SidType *types = NULL;
DOM_SID *sids = NULL;
BOOL result = True;