summaryrefslogtreecommitdiff
path: root/source3/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'source3/librpc')
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.c4
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.h2
-rw-r--r--source3/librpc/gen_ndr/lsa.h52
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.c133
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.h3
-rw-r--r--source3/librpc/idl/lsa.idl60
6 files changed, 171 insertions, 83 deletions
diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c
index 15ff462ef6..e7775b1bfe 100644
--- a/source3/librpc/gen_ndr/cli_lsa.c
+++ b/source3/librpc/gen_ndr/cli_lsa.c
@@ -503,7 +503,7 @@ NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- struct policy_handle *handle /* [in] [ref] */,
+ struct policy_handle *policy_handle /* [in] [ref] */,
struct lsa_DomainInfo *info /* [in] [ref] */,
uint32_t access_mask /* [in] */,
struct policy_handle *trustdom_handle /* [out] [ref] */)
@@ -512,7 +512,7 @@ NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli,
NTSTATUS status;
/* In parameters */
- r.in.handle = handle;
+ r.in.policy_handle = policy_handle;
r.in.info = info;
r.in.access_mask = access_mask;
diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h
index d6cb2fc7a7..554182c6db 100644
--- a/source3/librpc/gen_ndr/cli_lsa.h
+++ b/source3/librpc/gen_ndr/cli_lsa.h
@@ -57,7 +57,7 @@ NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli,
uint32_t num_entries /* [in] [range(0,8192)] */);
NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
- struct policy_handle *handle /* [in] [ref] */,
+ struct policy_handle *policy_handle /* [in] [ref] */,
struct lsa_DomainInfo *info /* [in] [ref] */,
uint32_t access_mask /* [in] */,
struct policy_handle *trustdom_handle /* [out] [ref] */);
diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h
index bcf6dd665e..d91cf4b66d 100644
--- a/source3/librpc/gen_ndr/lsa.h
+++ b/source3/librpc/gen_ndr/lsa.h
@@ -97,12 +97,11 @@ struct lsa_ObjectAttribute {
struct lsa_AuditLogInfo {
uint32_t percent_full;
- uint32_t log_size;
- NTTIME retention_time;
+ uint32_t maximum_log_size;
+ uint64_t retention_time;
uint8_t shutdown_in_progress;
- NTTIME time_to_shutdown;
+ uint64_t time_to_shutdown;
uint32_t next_audit_record;
- uint32_t unknown;
};
enum lsa_PolicyAuditPolicy
@@ -166,9 +165,21 @@ struct lsa_PDAccountInfo {
struct lsa_String name;
};
+enum lsa_Role
+#ifndef USE_UINT_ENUMS
+ {
+ LSA_ROLE_BACKUP=2,
+ LSA_ROLE_PRIMARY=3
+}
+#else
+ { __donnot_use_enum_lsa_Role=0x7FFFFFFF}
+#define LSA_ROLE_BACKUP ( 2 )
+#define LSA_ROLE_PRIMARY ( 3 )
+#endif
+;
+
struct lsa_ServerRole {
- uint16_t unknown;
- uint16_t role;
+ enum lsa_Role role;
};
struct lsa_ReplicaSourceInfo {
@@ -195,7 +206,6 @@ struct lsa_AuditFullSetInfo {
};
struct lsa_AuditFullQueryInfo {
- uint16_t unknown;
uint8_t shutdown_on_full;
uint8_t log_is_full;
};
@@ -219,11 +229,12 @@ enum lsa_PolicyInfo
LSA_POLICY_INFO_ROLE=6,
LSA_POLICY_INFO_REPLICA=7,
LSA_POLICY_INFO_QUOTA=8,
- LSA_POLICY_INFO_DB=9,
+ LSA_POLICY_INFO_MOD=9,
LSA_POLICY_INFO_AUDIT_FULL_SET=10,
LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
LSA_POLICY_INFO_DNS=12,
- LSA_POLICY_INFO_DNS_INT=13
+ LSA_POLICY_INFO_DNS_INT=13,
+ LSA_POLICY_INFO_L_ACCOUNT_DOMAIN=14
}
#else
{ __donnot_use_enum_lsa_PolicyInfo=0x7FFFFFFF}
@@ -235,11 +246,12 @@ enum lsa_PolicyInfo
#define LSA_POLICY_INFO_ROLE ( 6 )
#define LSA_POLICY_INFO_REPLICA ( 7 )
#define LSA_POLICY_INFO_QUOTA ( 8 )
-#define LSA_POLICY_INFO_DB ( 9 )
+#define LSA_POLICY_INFO_MOD ( 9 )
#define LSA_POLICY_INFO_AUDIT_FULL_SET ( 10 )
#define LSA_POLICY_INFO_AUDIT_FULL_QUERY ( 11 )
#define LSA_POLICY_INFO_DNS ( 12 )
#define LSA_POLICY_INFO_DNS_INT ( 13 )
+#define LSA_POLICY_INFO_L_ACCOUNT_DOMAIN ( 14 )
#endif
;
@@ -252,10 +264,11 @@ union lsa_PolicyInformation {
struct lsa_ServerRole role;/* [case(LSA_POLICY_INFO_ROLE)] */
struct lsa_ReplicaSourceInfo replica;/* [case(LSA_POLICY_INFO_REPLICA)] */
struct lsa_DefaultQuotaInfo quota;/* [case(LSA_POLICY_INFO_QUOTA)] */
- struct lsa_ModificationInfo db;/* [case(LSA_POLICY_INFO_DB)] */
+ struct lsa_ModificationInfo mod;/* [case(LSA_POLICY_INFO_MOD)] */
struct lsa_AuditFullSetInfo auditfullset;/* [case(LSA_POLICY_INFO_AUDIT_FULL_SET)] */
struct lsa_AuditFullQueryInfo auditfullquery;/* [case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] */
struct lsa_DnsDomainInfo dns;/* [case(LSA_POLICY_INFO_DNS)] */
+ struct lsa_DomainInfo l_account_domain;/* [case(LSA_POLICY_INFO_L_ACCOUNT_DOMAIN)] */
}/* [switch_type(uint16)] */;
struct lsa_SidPtr {
@@ -363,6 +376,21 @@ struct lsa_PrivilegeSet {
struct lsa_LUIDAttribute *set;/* [size_is(count)] */
};
+/* bitmap lsa_SystemAccessModeFlags */
+#define LSA_POLICY_MODE_INTERACTIVE ( 0x00000001 )
+#define LSA_POLICY_MODE_NETWORK ( 0x00000002 )
+#define LSA_POLICY_MODE_BATCH ( 0x00000004 )
+#define LSA_POLICY_MODE_SERVICE ( 0x00000010 )
+#define LSA_POLICY_MODE_PROXY ( 0x00000020 )
+#define LSA_POLICY_MODE_DENY_INTERACTIVE ( 0x00000040 )
+#define LSA_POLICY_MODE_DENY_NETWORK ( 0x00000080 )
+#define LSA_POLICY_MODE_DENY_BATCH ( 0x00000100 )
+#define LSA_POLICY_MODE_DENY_SERVICE ( 0x00000200 )
+#define LSA_POLICY_MODE_REMOTE_INTERACTIVE ( 0x00000400 )
+#define LSA_POLICY_MODE_DENY_REMOTE_INTERACTIVE ( 0x00000800 )
+#define LSA_POLICY_MODE_ALL ( 0x00000FF7 )
+#define LSA_POLICY_MODE_ALL_NT4 ( 0x00000037 )
+
struct lsa_DATA_BUF {
uint32_t length;
uint32_t size;
@@ -845,7 +873,7 @@ struct lsa_EnumAccounts {
struct lsa_CreateTrustedDomain {
struct {
- struct policy_handle *handle;/* [ref] */
+ struct policy_handle *policy_handle;/* [ref] */
struct lsa_DomainInfo *info;/* [ref] */
uint32_t access_mask;
} in;
diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c
index ffa4d7df77..926903865e 100644
--- a/source3/librpc/gen_ndr/ndr_lsa.c
+++ b/source3/librpc/gen_ndr/ndr_lsa.c
@@ -834,14 +834,13 @@ _PUBLIC_ void ndr_print_lsa_PolicyAccessMask(struct ndr_print *ndr, const char *
static enum ndr_err_code 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_align(ndr, 8));
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_uint32(ndr, NDR_SCALARS, r->maximum_log_size));
+ NDR_CHECK(ndr_push_hyper(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_hyper(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) {
}
@@ -851,14 +850,13 @@ static enum ndr_err_code ndr_push_lsa_AuditLogInfo(struct ndr_push *ndr, int ndr
static enum ndr_err_code 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_align(ndr, 8));
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_uint32(ndr, NDR_SCALARS, &r->maximum_log_size));
+ NDR_CHECK(ndr_pull_hyper(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_hyper(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) {
}
@@ -870,12 +868,11 @@ _PUBLIC_ void ndr_print_lsa_AuditLogInfo(struct ndr_print *ndr, const char *name
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_uint32(ndr, "maximum_log_size", r->maximum_log_size);
+ ndr_print_hyper(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_hyper(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--;
}
@@ -1078,12 +1075,36 @@ _PUBLIC_ void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *nam
ndr->depth--;
}
+static enum ndr_err_code ndr_push_lsa_Role(struct ndr_push *ndr, int ndr_flags, enum lsa_Role r)
+{
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+ return NDR_ERR_SUCCESS;
+}
+
+static enum ndr_err_code ndr_pull_lsa_Role(struct ndr_pull *ndr, int ndr_flags, enum lsa_Role *r)
+{
+ uint32_t v;
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+ *r = v;
+ return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_lsa_Role(struct ndr_print *ndr, const char *name, enum lsa_Role r)
+{
+ const char *val = NULL;
+
+ switch (r) {
+ case LSA_ROLE_BACKUP: val = "LSA_ROLE_BACKUP"; break;
+ case LSA_ROLE_PRIMARY: val = "LSA_ROLE_PRIMARY"; break;
+ }
+ ndr_print_enum(ndr, name, "ENUM", val, r);
+}
+
static enum ndr_err_code 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));
+ NDR_CHECK(ndr_push_align(ndr, 4));
+ NDR_CHECK(ndr_push_lsa_Role(ndr, NDR_SCALARS, r->role));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -1093,9 +1114,8 @@ static enum ndr_err_code ndr_push_lsa_ServerRole(struct ndr_push *ndr, int ndr_f
static enum ndr_err_code 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));
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_lsa_Role(ndr, NDR_SCALARS, &r->role));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -1106,8 +1126,7 @@ _PUBLIC_ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name,
{
ndr_print_struct(ndr, name, "lsa_ServerRole");
ndr->depth++;
- ndr_print_uint16(ndr, "unknown", r->unknown);
- ndr_print_uint16(ndr, "role", r->role);
+ ndr_print_lsa_Role(ndr, "role", r->role);
ndr->depth--;
}
@@ -1259,8 +1278,7 @@ _PUBLIC_ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *
static enum ndr_err_code 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_align(ndr, 1));
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->shutdown_on_full));
NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->log_is_full));
}
@@ -1272,8 +1290,7 @@ static enum ndr_err_code ndr_push_lsa_AuditFullQueryInfo(struct ndr_push *ndr, i
static enum ndr_err_code 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_align(ndr, 1));
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->shutdown_on_full));
NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->log_is_full));
}
@@ -1286,7 +1303,6 @@ _PUBLIC_ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char
{
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--;
@@ -1388,11 +1404,12 @@ _PUBLIC_ void ndr_print_lsa_PolicyInfo(struct ndr_print *ndr, const char *name,
case LSA_POLICY_INFO_ROLE: val = "LSA_POLICY_INFO_ROLE"; break;
case LSA_POLICY_INFO_REPLICA: val = "LSA_POLICY_INFO_REPLICA"; break;
case LSA_POLICY_INFO_QUOTA: val = "LSA_POLICY_INFO_QUOTA"; break;
- case LSA_POLICY_INFO_DB: val = "LSA_POLICY_INFO_DB"; break;
+ case LSA_POLICY_INFO_MOD: val = "LSA_POLICY_INFO_MOD"; break;
case LSA_POLICY_INFO_AUDIT_FULL_SET: val = "LSA_POLICY_INFO_AUDIT_FULL_SET"; break;
case LSA_POLICY_INFO_AUDIT_FULL_QUERY: val = "LSA_POLICY_INFO_AUDIT_FULL_QUERY"; break;
case LSA_POLICY_INFO_DNS: val = "LSA_POLICY_INFO_DNS"; break;
case LSA_POLICY_INFO_DNS_INT: val = "LSA_POLICY_INFO_DNS_INT"; break;
+ case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: val = "LSA_POLICY_INFO_L_ACCOUNT_DOMAIN"; break;
}
ndr_print_enum(ndr, name, "ENUM", val, r);
}
@@ -1435,8 +1452,8 @@ static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, in
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));
+ case LSA_POLICY_INFO_MOD: {
+ NDR_CHECK(ndr_push_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod));
break; }
case LSA_POLICY_INFO_AUDIT_FULL_SET: {
@@ -1455,6 +1472,10 @@ static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, in
NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
break; }
+ case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: {
+ NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain));
+ break; }
+
default:
return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
}
@@ -1491,7 +1512,7 @@ static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, in
case LSA_POLICY_INFO_QUOTA:
break;
- case LSA_POLICY_INFO_DB:
+ case LSA_POLICY_INFO_MOD:
break;
case LSA_POLICY_INFO_AUDIT_FULL_SET:
@@ -1508,6 +1529,10 @@ static enum ndr_err_code ndr_push_lsa_PolicyInformation(struct ndr_push *ndr, in
NDR_CHECK(ndr_push_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
break;
+ case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
+ NDR_CHECK(ndr_push_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain));
+ break;
+
default:
return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
}
@@ -1558,8 +1583,8 @@ static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, in
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));
+ case LSA_POLICY_INFO_MOD: {
+ NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->mod));
break; }
case LSA_POLICY_INFO_AUDIT_FULL_SET: {
@@ -1578,6 +1603,10 @@ static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, in
NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
break; }
+ case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN: {
+ NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->l_account_domain));
+ break; }
+
default:
return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
}
@@ -1613,7 +1642,7 @@ static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, in
case LSA_POLICY_INFO_QUOTA:
break;
- case LSA_POLICY_INFO_DB:
+ case LSA_POLICY_INFO_MOD:
break;
case LSA_POLICY_INFO_AUDIT_FULL_SET:
@@ -1630,6 +1659,10 @@ static enum ndr_err_code ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, in
NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
break;
+ case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
+ NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->l_account_domain));
+ break;
+
default:
return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
}
@@ -1675,8 +1708,8 @@ _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char
ndr_print_lsa_DefaultQuotaInfo(ndr, "quota", &r->quota);
break;
- case LSA_POLICY_INFO_DB:
- ndr_print_lsa_ModificationInfo(ndr, "db", &r->db);
+ case LSA_POLICY_INFO_MOD:
+ ndr_print_lsa_ModificationInfo(ndr, "mod", &r->mod);
break;
case LSA_POLICY_INFO_AUDIT_FULL_SET:
@@ -1695,6 +1728,10 @@ _PUBLIC_ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char
ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
break;
+ case LSA_POLICY_INFO_L_ACCOUNT_DOMAIN:
+ ndr_print_lsa_DomainInfo(ndr, "l_account_domain", &r->l_account_domain);
+ break;
+
default:
ndr_print_bad_level(ndr, name, level);
}
@@ -1926,13 +1963,13 @@ _PUBLIC_ void ndr_print_lsa_DomainList(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-static enum ndr_err_code ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r)
+_PUBLIC_ enum ndr_err_code 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 NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *r)
+_PUBLIC_ enum ndr_err_code 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));
@@ -6064,10 +6101,10 @@ _PUBLIC_ void ndr_print_lsa_EnumAccounts(struct ndr_print *ndr, const char *name
_PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr, int flags, const struct lsa_CreateTrustedDomain *r)
{
if (flags & NDR_IN) {
- if (r->in.handle == NULL) {
+ if (r->in.policy_handle == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
if (r->in.info == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -6086,19 +6123,19 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateTrustedDomain(struct ndr_push *ndr
_PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateTrustedDomain(struct ndr_pull *ndr, int flags, struct lsa_CreateTrustedDomain *r)
{
- TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_policy_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);
+ NDR_PULL_ALLOC(ndr, r->in.policy_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, r->in.handle));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ _mem_save_policy_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.policy_handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.policy_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_policy_handle_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->in.info);
}
@@ -6133,9 +6170,9 @@ _PUBLIC_ void ndr_print_lsa_CreateTrustedDomain(struct ndr_print *ndr, const cha
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "lsa_CreateTrustedDomain");
ndr->depth++;
- ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr_print_ptr(ndr, "policy_handle", r->in.policy_handle);
ndr->depth++;
- ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr_print_policy_handle(ndr, "policy_handle", r->in.policy_handle);
ndr->depth--;
ndr_print_ptr(ndr, "info", r->in.info);
ndr->depth++;
diff --git a/source3/librpc/gen_ndr/ndr_lsa.h b/source3/librpc/gen_ndr/ndr_lsa.h
index 61684d1789..2f623c2ba9 100644
--- a/source3/librpc/gen_ndr/ndr_lsa.h
+++ b/source3/librpc/gen_ndr/ndr_lsa.h
@@ -207,6 +207,7 @@ void ndr_print_lsa_PolicyAuditPolicy(struct ndr_print *ndr, const char *name, en
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_Role(struct ndr_print *ndr, const char *name, enum lsa_Role 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);
@@ -221,6 +222,8 @@ enum ndr_err_code ndr_push_lsa_SidArray(struct ndr_push *ndr, int ndr_flags, con
enum ndr_err_code 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);
+enum ndr_err_code ndr_push_lsa_SidType(struct ndr_push *ndr, int ndr_flags, enum lsa_SidType r);
+enum ndr_err_code ndr_pull_lsa_SidType(struct ndr_pull *ndr, int ndr_flags, enum lsa_SidType *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);
diff --git a/source3/librpc/idl/lsa.idl b/source3/librpc/idl/lsa.idl
index 98c27cb717..a443448871 100644
--- a/source3/librpc/idl/lsa.idl
+++ b/source3/librpc/idl/lsa.idl
@@ -161,12 +161,11 @@ import "misc.idl", "security.idl";
typedef struct {
uint32 percent_full;
- uint32 log_size;
- NTTIME retention_time;
+ uint32 maximum_log_size;
+ hyper retention_time;
uint8 shutdown_in_progress;
- NTTIME time_to_shutdown;
+ hyper time_to_shutdown;
uint32 next_audit_record;
- uint32 unknown;
} lsa_AuditLogInfo;
typedef [v1_enum] enum {
@@ -204,9 +203,13 @@ import "misc.idl", "security.idl";
lsa_String name;
} lsa_PDAccountInfo;
+ typedef [v1_enum] enum {
+ LSA_ROLE_BACKUP=2,
+ LSA_ROLE_PRIMARY=3
+ } lsa_Role;
+
typedef struct {
- uint16 unknown; /* an midl padding bug? */
- uint16 role;
+ lsa_Role role;
} lsa_ServerRole;
typedef struct {
@@ -233,7 +236,6 @@ import "misc.idl", "security.idl";
} lsa_AuditFullSetInfo;
typedef struct {
- uint16 unknown; /* an midl padding bug? */
uint8 shutdown_on_full;
uint8 log_is_full;
} lsa_AuditFullQueryInfo;
@@ -261,11 +263,12 @@ import "misc.idl", "security.idl";
LSA_POLICY_INFO_ROLE=6,
LSA_POLICY_INFO_REPLICA=7,
LSA_POLICY_INFO_QUOTA=8,
- LSA_POLICY_INFO_DB=9,
+ LSA_POLICY_INFO_MOD=9,
LSA_POLICY_INFO_AUDIT_FULL_SET=10,
LSA_POLICY_INFO_AUDIT_FULL_QUERY=11,
LSA_POLICY_INFO_DNS=12,
- LSA_POLICY_INFO_DNS_INT=13
+ LSA_POLICY_INFO_DNS_INT=13,
+ LSA_POLICY_INFO_L_ACCOUNT_DOMAIN=14
} lsa_PolicyInfo;
typedef [switch_type(uint16)] union {
@@ -277,11 +280,12 @@ import "misc.idl", "security.idl";
[case(LSA_POLICY_INFO_ROLE)] lsa_ServerRole role;
[case(LSA_POLICY_INFO_REPLICA)] lsa_ReplicaSourceInfo replica;
[case(LSA_POLICY_INFO_QUOTA)] lsa_DefaultQuotaInfo quota;
- [case(LSA_POLICY_INFO_DB)] lsa_ModificationInfo db;
+ [case(LSA_POLICY_INFO_MOD)] lsa_ModificationInfo mod;
[case(LSA_POLICY_INFO_AUDIT_FULL_SET)] lsa_AuditFullSetInfo auditfullset;
[case(LSA_POLICY_INFO_AUDIT_FULL_QUERY)] lsa_AuditFullQueryInfo auditfullquery;
[case(LSA_POLICY_INFO_DNS)] lsa_DnsDomainInfo dns;
[case(LSA_POLICY_INFO_DNS_INT)] lsa_DnsDomainInfo dns;
+ [case(LSA_POLICY_INFO_L_ACCOUNT_DOMAIN)] lsa_DomainInfo l_account_domain;
} lsa_PolicyInformation;
NTSTATUS lsa_QueryInfoPolicy(
@@ -337,7 +341,7 @@ import "misc.idl", "security.idl";
/* Function: 0x0c */
[public] NTSTATUS lsa_CreateTrustedDomain(
- [in] policy_handle *handle,
+ [in] policy_handle *policy_handle,
[in] lsa_DomainInfo *info,
[in] uint32 access_mask,
[out] policy_handle *trustdom_handle
@@ -365,7 +369,7 @@ import "misc.idl", "security.idl";
/******************/
/* Function: 0x0e */
- typedef enum {
+ typedef [public] enum {
SID_NAME_USE_NONE = 0,/* NOTUSED */
SID_NAME_USER = 1, /* user */
SID_NAME_DOM_GRP = 2, /* domain group */
@@ -515,23 +519,39 @@ import "misc.idl", "security.idl";
/* Function: 0x16 */
[todo] NTSTATUS lsa_SetQuotasForAccount();
+ typedef [bitmap32bit] bitmap {
+ LSA_POLICY_MODE_INTERACTIVE = 0x00000001,
+ LSA_POLICY_MODE_NETWORK = 0x00000002,
+ LSA_POLICY_MODE_BATCH = 0x00000004,
+ LSA_POLICY_MODE_SERVICE = 0x00000010,
+ LSA_POLICY_MODE_PROXY = 0x00000020,
+ LSA_POLICY_MODE_DENY_INTERACTIVE = 0x00000040,
+ LSA_POLICY_MODE_DENY_NETWORK = 0x00000080,
+ LSA_POLICY_MODE_DENY_BATCH = 0x00000100,
+ LSA_POLICY_MODE_DENY_SERVICE = 0x00000200,
+ LSA_POLICY_MODE_REMOTE_INTERACTIVE = 0x00000400,
+ LSA_POLICY_MODE_DENY_REMOTE_INTERACTIVE = 0x00000800,
+ LSA_POLICY_MODE_ALL = 0x00000FF7,
+ LSA_POLICY_MODE_ALL_NT4 = 0x00000037
+ } lsa_SystemAccessModeFlags;
+
/* Function: 0x17 */
NTSTATUS lsa_GetSystemAccessAccount(
- [in] policy_handle *handle,
+ [in] policy_handle *handle,
[out,ref] uint32 *access_mask
);
/* Function: 0x18 */
NTSTATUS lsa_SetSystemAccessAccount(
- [in] policy_handle *handle,
- [in] uint32 access_mask
+ [in] policy_handle *handle,
+ [in] uint32 access_mask
);
/* Function: 0x19 */
NTSTATUS lsa_OpenTrustedDomain(
[in] policy_handle *handle,
[in] dom_sid2 *sid,
- [in] uint32 access_mask,
+ [in] uint32 access_mask,
[out] policy_handle *trustdom_handle
);
@@ -772,12 +792,12 @@ import "misc.idl", "security.idl";
[out,ref] uint16 *returned_language_id
);
- /* Function: 0x22 */
+ /*******************/
+ /* Function: 0x22 */
NTSTATUS lsa_DeleteObject (
[in,out] policy_handle *handle
);
-
/*******************/
/* Function: 0x23 */
NTSTATUS lsa_EnumAccountsWithUserRight (
@@ -832,7 +852,7 @@ import "misc.idl", "security.idl";
NTSTATUS lsa_SetTrustedDomainInfo(
[in] policy_handle *handle,
[in] dom_sid2 *dom_sid,
- [in] lsa_TrustDomInfoEnum level,
+ [in] lsa_TrustDomInfoEnum level,
[in,switch_is(level)] lsa_TrustedDomainInfo *info
);
@@ -895,7 +915,7 @@ import "misc.idl", "security.idl";
NTSTATUS lsa_SetTrustedDomainInfoByName(
[in] policy_handle *handle,
[in] lsa_String trusted_domain,
- [in] lsa_TrustDomInfoEnum level,
+ [in] lsa_TrustDomInfoEnum level,
[in,unique,switch_is(level)] lsa_TrustedDomainInfo *info
);