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/cli_winreg.c2
-rw-r--r--source3/librpc/gen_ndr/cli_winreg.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/gen_ndr/ndr_winreg.c89
-rw-r--r--source3/librpc/gen_ndr/ndr_winreg.h1
-rw-r--r--source3/librpc/gen_ndr/tables.c83
-rw-r--r--source3/librpc/gen_ndr/winreg.h10
-rw-r--r--source3/librpc/idl/lsa.idl60
-rw-r--r--source3/librpc/idl/winreg.idl410
13 files changed, 267 insertions, 584 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/cli_winreg.c b/source3/librpc/gen_ndr/cli_winreg.c
index d558a5a185..17b7281c72 100644
--- a/source3/librpc/gen_ndr/cli_winreg.c
+++ b/source3/librpc/gen_ndr/cli_winreg.c
@@ -497,7 +497,7 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
uint32_t enum_index /* [in] */,
- struct winreg_ValNameBuf *name /* [in,out] [ref] */,
+ struct winreg_StringBuf *name /* [in,out] [ref] */,
enum winreg_Type *type /* [in,out] [unique] */,
uint8_t *value /* [in,out] [unique,length_is(*length),size_is(*size)] */,
uint32_t *size /* [in,out] [unique] */,
diff --git a/source3/librpc/gen_ndr/cli_winreg.h b/source3/librpc/gen_ndr/cli_winreg.h
index ce2bfcd5ec..fb27bce9d2 100644
--- a/source3/librpc/gen_ndr/cli_winreg.h
+++ b/source3/librpc/gen_ndr/cli_winreg.h
@@ -68,7 +68,7 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle /* [in] [ref] */,
uint32_t enum_index /* [in] */,
- struct winreg_ValNameBuf *name /* [in,out] [ref] */,
+ struct winreg_StringBuf *name /* [in,out] [ref] */,
enum winreg_Type *type /* [in,out] [unique] */,
uint8_t *value /* [in,out] [unique,length_is(*length),size_is(*size)] */,
uint32_t *size /* [in,out] [unique] */,
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/gen_ndr/ndr_winreg.c b/source3/librpc/gen_ndr/ndr_winreg.c
index 41c9acd7b9..791d11103d 100644
--- a/source3/librpc/gen_ndr/ndr_winreg.c
+++ b/source3/librpc/gen_ndr/ndr_winreg.c
@@ -275,77 +275,6 @@ static enum ndr_err_code ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2));
- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->name) {
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2 / 2));
- NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term_null(r->name) * 2 / 2, sizeof(uint16_t), CH_UTF16));
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-static enum ndr_err_code ndr_pull_winreg_StringBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_StringBuf *r)
-{
- uint32_t _ptr_name;
- TALLOC_CTX *_mem_save_name_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_name));
- if (_ptr_name) {
- NDR_PULL_ALLOC(ndr, r->name);
- } else {
- r->name = NULL;
- }
- }
- if (ndr_flags & NDR_BUFFERS) {
- if (r->name) {
- _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
- NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
- NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
- if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->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->name), ndr_get_array_length(ndr, &r->name));
- }
- NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
- }
- if (r->name) {
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->name, r->size / 2));
- }
- if (r->name) {
- NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->name, r->length / 2));
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
-_PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r)
-{
- ndr_print_struct(ndr, name, "winreg_StringBuf");
- ndr->depth++;
- ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term_null(r->name) * 2:r->length);
- ndr_print_uint16(ndr, "size", r->size);
- ndr_print_ptr(ndr, "name", r->name);
- ndr->depth++;
- if (r->name) {
- ndr_print_string(ndr, "name", r->name);
- }
- ndr->depth--;
- ndr->depth--;
-}
-
-static enum ndr_err_code ndr_push_winreg_ValNameBuf(struct ndr_push *ndr, int ndr_flags, const struct winreg_ValNameBuf *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
@@ -361,7 +290,7 @@ static enum ndr_err_code ndr_push_winreg_ValNameBuf(struct ndr_push *ndr, int nd
return NDR_ERR_SUCCESS;
}
-static enum ndr_err_code ndr_pull_winreg_ValNameBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_ValNameBuf *r)
+static enum ndr_err_code ndr_pull_winreg_StringBuf(struct ndr_pull *ndr, int ndr_flags, struct winreg_StringBuf *r)
{
uint32_t _ptr_name;
TALLOC_CTX *_mem_save_name_0;
@@ -398,9 +327,9 @@ static enum ndr_err_code ndr_pull_winreg_ValNameBuf(struct ndr_pull *ndr, int nd
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r)
+_PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r)
{
- ndr_print_struct(ndr, name, "winreg_ValNameBuf");
+ ndr_print_struct(ndr, name, "winreg_StringBuf");
ndr->depth++;
ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->length);
ndr_print_uint16(ndr, "size", r->size);
@@ -1529,7 +1458,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int f
if (r->in.name == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
+ NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.type));
if (r->in.type) {
NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->in.type));
@@ -1554,7 +1483,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, int f
if (r->out.name == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
+ NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.type));
if (r->out.type) {
NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type));
@@ -1607,7 +1536,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int f
}
_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_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
+ NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
if (_ptr_type) {
@@ -1680,7 +1609,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, int f
}
_mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
+ NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
if (_ptr_type) {
@@ -1766,7 +1695,7 @@ _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name
ndr_print_uint32(ndr, "enum_index", r->in.enum_index);
ndr_print_ptr(ndr, "name", r->in.name);
ndr->depth++;
- ndr_print_winreg_ValNameBuf(ndr, "name", r->in.name);
+ ndr_print_winreg_StringBuf(ndr, "name", r->in.name);
ndr->depth--;
ndr_print_ptr(ndr, "type", r->in.type);
ndr->depth++;
@@ -1800,7 +1729,7 @@ _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name
ndr->depth++;
ndr_print_ptr(ndr, "name", r->out.name);
ndr->depth++;
- ndr_print_winreg_ValNameBuf(ndr, "name", r->out.name);
+ ndr_print_winreg_StringBuf(ndr, "name", r->out.name);
ndr->depth--;
ndr_print_ptr(ndr, "type", r->out.type);
ndr->depth++;
diff --git a/source3/librpc/gen_ndr/ndr_winreg.h b/source3/librpc/gen_ndr/ndr_winreg.h
index ed988638ff..8dea3ae273 100644
--- a/source3/librpc/gen_ndr/ndr_winreg.h
+++ b/source3/librpc/gen_ndr/ndr_winreg.h
@@ -93,7 +93,6 @@ void ndr_print_KeySecurityData(struct ndr_print *ndr, const char *name, const st
void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const struct winreg_SecBuf *r);
void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *name, enum winreg_CreateAction r);
void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r);
-void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r);
enum ndr_err_code ndr_push_winreg_NotifyChangeType(struct ndr_push *ndr, int ndr_flags, uint32_t r);
enum ndr_err_code ndr_pull_winreg_NotifyChangeType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r);
void ndr_print_winreg_NotifyChangeType(struct ndr_print *ndr, const char *name, uint32_t r);
diff --git a/source3/librpc/gen_ndr/tables.c b/source3/librpc/gen_ndr/tables.c
new file mode 100644
index 0000000000..f2064d95ac
--- /dev/null
+++ b/source3/librpc/gen_ndr/tables.c
@@ -0,0 +1,83 @@
+
+/* Automatically generated by tables.pl. DO NOT EDIT */
+
+#include "includes.h"
+#include "librpc/ndr/libndr.h"
+#include "librpc/ndr/ndr_table.h"
+#include "librpc/gen_ndr/ndr_dfs.h"
+#include "librpc/gen_ndr/ndr_drsblobs.h"
+#include "librpc/gen_ndr/ndr_drsuapi.h"
+#include "librpc/gen_ndr/ndr_dssetup.h"
+#include "librpc/gen_ndr/ndr_echo.h"
+#include "librpc/gen_ndr/ndr_epmapper.h"
+#include "librpc/gen_ndr/ndr_eventlog.h"
+#include "librpc/gen_ndr/ndr_initshutdown.h"
+#include "librpc/gen_ndr/ndr_krb5pac.h"
+#include "librpc/gen_ndr/ndr_lsa.h"
+#include "librpc/gen_ndr/ndr_netlogon.h"
+#include "librpc/gen_ndr/ndr_ntsvcs.h"
+#include "librpc/gen_ndr/ndr_samr.h"
+#include "librpc/gen_ndr/ndr_srvsvc.h"
+#include "librpc/gen_ndr/ndr_svcctl.h"
+#include "librpc/gen_ndr/ndr_winreg.h"
+#include "librpc/gen_ndr/ndr_wkssvc.h"
+
+NTSTATUS ndr_table_register_builtin_tables(void)
+{
+ NTSTATUS status;
+
+ status = ndr_table_register(&ndr_table_netdfs);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_drsblobs);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_drsuapi);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_dssetup);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_rpcecho);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_epmapper);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_eventlog);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_initshutdown);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_krb5pac);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_lsarpc);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_netlogon);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_ntsvcs);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_samr);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_srvsvc);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_svcctl);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_winreg);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+ status = ndr_table_register(&ndr_table_wkssvc);
+ if (NT_STATUS_IS_ERR(status)) return status;
+
+
+
+ return NT_STATUS_OK;
+}
diff --git a/source3/librpc/gen_ndr/winreg.h b/source3/librpc/gen_ndr/winreg.h
index 0f3c45ebb7..fbbab33c8d 100644
--- a/source3/librpc/gen_ndr/winreg.h
+++ b/source3/librpc/gen_ndr/winreg.h
@@ -84,12 +84,6 @@ enum winreg_CreateAction
;
struct winreg_StringBuf {
- uint16_t length;/* [value(strlen_m_term_null(name)*2)] */
- uint16_t size;
- const char *name;/* [unique,length_is(length/2),charset(UTF16),size_is(size/2)] */
-};
-
-struct winreg_ValNameBuf {
uint16_t length;/* [value(strlen_m_term(name)*2)] */
uint16_t size;
const char *name;/* [unique,length_is(length/2),charset(UTF16),size_is(size/2)] */
@@ -267,7 +261,7 @@ struct winreg_EnumValue {
struct {
struct policy_handle *handle;/* [ref] */
uint32_t enum_index;
- struct winreg_ValNameBuf *name;/* [ref] */
+ struct winreg_StringBuf *name;/* [ref] */
enum winreg_Type *type;/* [unique] */
uint8_t *value;/* [unique,length_is(*length),size_is(*size)] */
uint32_t *size;/* [unique] */
@@ -275,7 +269,7 @@ struct winreg_EnumValue {
} in;
struct {
- struct winreg_ValNameBuf *name;/* [ref] */
+ struct winreg_StringBuf *name;/* [ref] */
enum winreg_Type *type;/* [unique] */
uint8_t *value;/* [unique,length_is(*length),size_is(*size)] */
uint32_t *size;/* [unique] */
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
);
diff --git a/source3/librpc/idl/winreg.idl b/source3/librpc/idl/winreg.idl
deleted file mode 100644
index 58f5eab805..0000000000
--- a/source3/librpc/idl/winreg.idl
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- winreg interface definition
-*/
-
-import "lsa.idl", "security.idl";
-
-[
- uuid("338cd001-2244-31f1-aaaa-900038001003"),
- version(1.0),
- endpoint("ncacn_np:[\\pipe\\winreg]","ncacn_ip_tcp:","ncalrpc:"),
- pointer_default(unique),
- helpstring("Remote Registry Service")
-] interface winreg
-{
- typedef bitmap security_secinfo security_secinfo;
-
- typedef [bitmap32bit] bitmap {
- KEY_QUERY_VALUE = 0x00001,
- KEY_SET_VALUE = 0x00002,
- KEY_CREATE_SUB_KEY = 0x00004,
- KEY_ENUMERATE_SUB_KEYS = 0x00008,
- KEY_NOTIFY = 0x00010,
- KEY_CREATE_LINK = 0x00020,
- KEY_WOW64_64KEY = 0x00100,
- KEY_WOW64_32KEY = 0x00200
- } winreg_AccessMask;
-
- typedef [public,v1_enum] enum {
- REG_NONE = 0,
- REG_SZ = 1,
- REG_EXPAND_SZ = 2,
- REG_BINARY = 3,
- REG_DWORD = 4,
- REG_DWORD_BIG_ENDIAN = 5,
- REG_LINK = 6,
- REG_MULTI_SZ = 7,
- REG_RESOURCE_LIST = 8,
- REG_FULL_RESOURCE_DESCRIPTOR = 9,
- REG_RESOURCE_REQUIREMENTS_LIST = 10,
- REG_QWORD = 11
- } winreg_Type;
-
- typedef [public,noejs] struct {
- [value(strlen_m_term(name)*2)] uint16 name_len;
- [value(strlen_m_term(name)*2)] uint16 name_size;
- [string,charset(UTF16)] uint16 *name;
- } winreg_String;
-
- /******************/
- /* Function: 0x00 */
- WERROR winreg_OpenHKCR(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x01 */
- WERROR winreg_OpenHKCU(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x02 */
- [public] WERROR winreg_OpenHKLM(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x03 */
- WERROR winreg_OpenHKPD(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x04 */
- WERROR winreg_OpenHKU(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x05 */
- [public] WERROR winreg_CloseKey(
- [in,out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x06 */
-
- typedef struct {
- [size_is(size),length_is(len)] uint8 *data;
- uint32 size;
- uint32 len;
- } KeySecurityData;
-
- typedef struct {
- uint32 length;
- KeySecurityData sd;
- boolean8 inherit;
- } winreg_SecBuf;
-
- typedef [v1_enum] enum {
- REG_ACTION_NONE = 0, /* used by caller */
- REG_CREATED_NEW_KEY = 1,
- REG_OPENED_EXISTING_KEY = 2
- } winreg_CreateAction;
-
- [public] WERROR winreg_CreateKey(
- [in,ref] policy_handle *handle,
- [in] winreg_String name,
- [in] winreg_String keyclass,
- [in] uint32 options,
- [in] winreg_AccessMask access_mask,
- [in,unique] winreg_SecBuf *secdesc,
- [out,ref] policy_handle *new_handle,
- [in,out,unique] winreg_CreateAction *action_taken
- );
-
- /******************/
- /* Function: 0x07 */
- [public] WERROR winreg_DeleteKey(
- [in,ref] policy_handle *handle,
- [in] winreg_String key
- );
-
- /******************/
- /* Function: 0x08 */
- WERROR winreg_DeleteValue(
- [in,ref] policy_handle *handle,
- [in] winreg_String value
- );
-
- typedef struct {
- [value(strlen_m_term_null(name)*2)] uint16 length;
- /* size cannot be auto-set by value() as it is the
- amount of space the server is allowed to use for this
- string in the reply, not its current size */
- uint16 size;
- [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
- } winreg_StringBuf;
-
- /******************/
- /* Function: 0x09 */
- [public] WERROR winreg_EnumKey(
- [in,ref] policy_handle *handle,
- [in] uint32 enum_index,
- [in,out,ref] winreg_StringBuf *name,
- [in,out,unique] winreg_StringBuf *keyclass,
- [in,out,unique] NTTIME *last_changed_time
- );
-
- typedef struct {
- [value(strlen_m_term(name)*2)] uint16 length;
- /* size cannot be auto-set by value() as it is the
- amount of space the server is allowed to use for this
- string in the reply, not its current size */
- uint16 size;
- [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
- } winreg_ValNameBuf;
-
- /******************/
- /* Function: 0x0a */
-
- [public] WERROR winreg_EnumValue(
- [in,ref] policy_handle *handle,
- [in] uint32 enum_index,
- [in,out,ref] winreg_ValNameBuf *name,
- [in,out,unique] winreg_Type *type,
- [in,out,unique,size_is(*size),length_is(*length)] uint8 *value,
- [in,out,unique] uint32 *size,
- [in,out,unique] uint32 *length
- );
-
- /******************/
- /* Function: 0x0b */
- [public] WERROR winreg_FlushKey(
- [in,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x0c */
- [public] WERROR winreg_GetKeySecurity(
- [in,ref] policy_handle *handle,
- [in] security_secinfo sec_info,
- [in,out,ref] KeySecurityData *sd
- );
-
- /******************/
- /* Function: 0x0d */
- WERROR winreg_LoadKey(
- [in,ref] policy_handle *handle,
- [in,unique] winreg_String *keyname,
- [in,unique] winreg_String *filename
- );
-
- /******************/
- /* Function: 0x0e */
- typedef [public,bitmap32bit] bitmap {
- REG_NOTIFY_CHANGE_NAME = 0x00000001,
- REG_NOTIFY_CHANGE_ATTRIBUTES = 0x00000002,
- REG_NOTIFY_CHANGE_LAST_SET = 0x00000004,
- REG_NOTIFY_CHANGE_SECURITY = 0x00000008
- } winreg_NotifyChangeType;
-
- [public] WERROR winreg_NotifyChangeKeyValue(
- [in,ref] policy_handle *handle,
- [in] boolean8 watch_subtree,
- [in] winreg_NotifyChangeType notify_filter,
- [in] uint32 unknown,
- [in] winreg_String string1,
- [in] winreg_String string2,
- [in] uint32 unknown2
- );
-
- /******************/
- /* Function: 0x0f */
- [public] WERROR winreg_OpenKey(
- [in,ref] policy_handle *parent_handle,
- [in] winreg_String keyname,
- [in] uint32 unknown,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x10 */
- [public] WERROR winreg_QueryInfoKey(
- [in,ref] policy_handle *handle,
- [in,out,ref] winreg_String *classname,
- [out,ref] uint32 *num_subkeys,
- [out,ref] uint32 *max_subkeylen,
- [out,ref] uint32 *max_classlen,
- [out,ref] uint32 *num_values,
- [out,ref] uint32 *max_valnamelen,
- [out,ref] uint32 *max_valbufsize,
- [out,ref] uint32 *secdescsize,
- [out,ref] NTTIME *last_changed_time
- );
-
- /******************/
- /* Function: 0x11 */
- [public] WERROR winreg_QueryValue(
- [in,ref] policy_handle *handle,
- [in,ref] winreg_String *value_name,
- [in,out,unique] winreg_Type *type,
- [in,out,unique,size_is(*data_size),length_is(*data_length)] uint8 *data,
- [in,out,unique] uint32 *data_size,
- [in,out,unique] uint32 *data_length
- );
-
- /******************/
- /* Function: 0x12 */
- [todo] WERROR winreg_ReplaceKey(
- );
-
- /******************/
- /* Function: 0x13 */
- WERROR winreg_RestoreKey(
- [in,ref] policy_handle *handle,
- [in,ref] winreg_String *filename,
- [in] uint32 flags
- );
-
- /******************/
- /* Function: 0x14 */
-
- typedef struct {
- uint32 data_size;
- KeySecurityData sec_data;
- uint8 inherit;
- } KeySecurityAttribute;
-
- WERROR winreg_SaveKey(
- [in,ref] policy_handle *handle,
- [in,ref] winreg_String *filename,
- [in,unique] KeySecurityAttribute *sec_attrib
- );
-
- /******************/
- /* Function: 0x15 */
- WERROR winreg_SetKeySecurity(
- [in,ref] policy_handle *handle,
- [in] security_secinfo sec_info,
- [in,ref] KeySecurityData *sd
- );
-
- /******************/
- /* Function: 0x16 */
- WERROR winreg_SetValue(
- [in,ref] policy_handle *handle,
- [in] winreg_String name,
- [in] winreg_Type type,
- [in,size_is(size),ref] uint8 *data,
- [in] uint32 size
- );
-
- /******************/
- /* Function: 0x17 */
- [todo] WERROR winreg_UnLoadKey(
- );
-
- /******************/
- /* Function: 0x18 */
- WERROR winreg_InitiateSystemShutdown(
- [in,unique] uint16 *hostname,
- /*
- * Note: lsa_String and winreg_String both result
- * in WERR_INVALID_PARAM
- */
- [in,unique] lsa_StringLarge *message,
- [in] uint32 timeout,
- [in] uint8 force_apps,
- [in] uint8 do_reboot
- );
-
- /******************/
- /* Function: 0x19 */
- WERROR winreg_AbortSystemShutdown(
- [in,unique] uint16 *server
- );
-
- /******************/
- /* Function: 0x1a */
- [public] WERROR winreg_GetVersion(
- [in,ref] policy_handle *handle,
- [out,ref] uint32 *version
- );
-
- /******************/
- /* Function: 0x1b */
- WERROR winreg_OpenHKCC(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x1c */
- WERROR winreg_OpenHKDD(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- typedef struct {
- winreg_String *name;
- winreg_Type type;
- uint32 offset;
- uint32 length;
- } QueryMultipleValue;
-
- /******************/
- /* Function: 0x1d */
- [public] WERROR winreg_QueryMultipleValues(
- [in,ref] policy_handle *key_handle,
- [in,out,ref,size_is(num_values),length_is(num_values)] QueryMultipleValue *values,
- [in] uint32 num_values,
- [in,out,unique,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
- [in,out,ref] uint32 *buffer_size
- );
-
- /******************/
- /* Function: 0x1e */
- WERROR winreg_InitiateSystemShutdownEx(
- [in,unique] uint16 *hostname,
- /*
- * Note: lsa_String and winreg_String both result
- * in WERR_INVALID_PARAM
- */
- [in,unique] lsa_StringLarge *message,
- [in] uint32 timeout,
- [in] uint8 force_apps,
- [in] uint8 do_reboot,
- [in] uint32 reason
- );
-
- /******************/
- /* Function: 0x1f */
- [todo] WERROR winreg_SaveKeyEx(
- );
-
- /******************/
- /* Function: 0x20 */
- WERROR winreg_OpenHKPT(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x21 */
- WERROR winreg_OpenHKPN(
- [in,unique] uint16 *system_name,
- [in] winreg_AccessMask access_mask,
- [out,ref] policy_handle *handle
- );
-
- /******************/
- /* Function: 0x22 */
- [todo] WERROR winreg_QueryMultipleValues2(
- );
-}