summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-11 07:57:08 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-11 07:57:08 +0000
commit8830a20bce4bde93aef2752c1e87aca428169d0a (patch)
tree29e4c213e3a64832e832d8c5290e0f6b18aba8ad /source4
parent5475c9f9785e11638bc5ec47aa84a169b0284bbb (diff)
downloadsamba-8830a20bce4bde93aef2752c1e87aca428169d0a.tar.gz
samba-8830a20bce4bde93aef2752c1e87aca428169d0a.tar.bz2
samba-8830a20bce4bde93aef2752c1e87aca428169d0a.zip
added 9 more info levels to lsa_QueryInfoPolicy
(This used to be commit b2ced24fc0be4944dd96f160e435f4c6773debcd)
Diffstat (limited to 'source4')
-rw-r--r--source4/include/smb_interfaces.h10
-rw-r--r--source4/librpc/idl/lsa.idl61
-rw-r--r--source4/librpc/ndr/libndr.h1
-rw-r--r--source4/librpc/ndr/ndr_basic.c57
-rw-r--r--source4/librpc/ndr/ndr_lsa.c317
-rw-r--r--source4/librpc/ndr/ndr_lsa.h57
-rw-r--r--source4/librpc/ndr/ndr_sec.c11
7 files changed, 487 insertions, 27 deletions
diff --git a/source4/include/smb_interfaces.h b/source4/include/smb_interfaces.h
index fd393c9db3..52df49f01b 100644
--- a/source4/include/smb_interfaces.h
+++ b/source4/include/smb_interfaces.h
@@ -23,7 +23,7 @@ typedef SMB_BIG_UINT large_t;
/* Globally Unique ID */
#define GUID_SIZE 16
-typedef struct guid_info
+typedef struct GUID
{
uint8 info[GUID_SIZE];
} GUID;
@@ -35,6 +35,14 @@ typedef struct nttime_info
uint32 high;
} NTTIME;
+/* 8 byte aligned 'hyper' type from MS IDL */
+typedef struct
+{
+ uint32 low;
+ uint32 high;
+} HYPER_T;
+
+
/* this structure is just a wrapper for a string, the only reason we
bother with this is that it allows us to check the length provided
diff --git a/source4/librpc/idl/lsa.idl b/source4/librpc/idl/lsa.idl
index 7acbe9cb6b..fb572ae522 100644
--- a/source4/librpc/idl/lsa.idl
+++ b/source4/librpc/idl/lsa.idl
@@ -120,12 +120,65 @@
typedef struct {
lsa_Name name;
dom_sid2 *sid;
- } lsa_PrimaryDomainInfo;
+ } lsa_DomainInfo;
+
+ typedef struct {
+ lsa_Name name;
+ } lsa_PDAccountInfo;
+
+ typedef struct {
+ uint16 role;
+ } lsa_ServerRole;
+
+ typedef struct {
+ lsa_Name source;
+ lsa_Name account;
+ } lsa_ReplicaSourceInfo;
+
+ typedef struct {
+ uint32 paged_pool;
+ uint32 non_paged_pool;
+ uint32 min_wss;
+ uint32 max_wss;
+ uint32 pagefile;
+ HYPER_T unknown;
+ } lsa_DefaultQuotaInfo;
+
+ typedef struct {
+ HYPER_T modified_id;
+ NTTIME db_create_time;
+ } lsa_ModificationInfo;
+
+ typedef struct {
+ uint32 shutdown_on_full;
+ } lsa_AuditFullSetInfo;
+
+ typedef struct {
+ uint32 shutdown_on_full;
+ uint32 log_is_full;
+ } lsa_AuditFullQueryInfo;
+
+ typedef struct {
+ lsa_Name name;
+ lsa_Name dns_domain;
+ lsa_Name dns_forest;
+ GUID domain_guid;
+ dom_sid2 *sid;
+ } lsa_DnsDomainInfo;
typedef union {
- case(1) lsa_AuditLogInfo audit_log;
- case(2) lsa_AuditEventsInfo audit_events;
- case(3) lsa_PrimaryDomainInfo domain;
+ case(1) lsa_AuditLogInfo audit_log;
+ case(2) lsa_AuditEventsInfo audit_events;
+ case(3) lsa_DomainInfo domain;
+ case(4) lsa_PDAccountInfo pd;
+ case(5) lsa_DomainInfo account_domain;
+ case(6) lsa_ServerRole role;
+ case(7) lsa_ReplicaSourceInfo replica;
+ case(8) lsa_DefaultQuotaInfo quota;
+ case(9) lsa_ModificationInfo db;
+ case(10) lsa_AuditFullSetInfo auditfullset;
+ case(11) lsa_AuditFullQueryInfo auditfullquery;
+ case(12) lsa_DnsDomainInfo dns;
} lsa_PolicyInformation;
NTSTATUS lsa_QueryInfoPolicy (
diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h
index f695dcff59..d6d2655ef8 100644
--- a/source4/librpc/ndr/libndr.h
+++ b/source4/librpc/ndr/libndr.h
@@ -75,7 +75,6 @@ struct ndr_print {
#define NDR_PRINT_UNION_DEBUG(type, level, p) ndr_print_union_debug((ndr_print_union_fn_t)ndr_print_ ##type, #p, level, p)
-
/*
flags passed to control parse flow
*/
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c
index ec065f63cc..a906e0c05b 100644
--- a/source4/librpc/ndr/ndr_basic.c
+++ b/source4/librpc/ndr/ndr_basic.c
@@ -81,6 +81,24 @@ NTSTATUS ndr_pull_uint32(struct ndr_pull *ndr, uint32 *v)
}
/*
+ parse a HYPER_T
+*/
+NTSTATUS ndr_pull_HYPER_T(struct ndr_pull *ndr, HYPER_T *v)
+{
+ NDR_PULL_ALIGN(ndr, 8);
+ NDR_PULL_NEED_BYTES(ndr, 8);
+ if (ndr->flags & LIBNDR_FLAG_BIGENDIAN) {
+ v->low = RIVAL(ndr->data, ndr->offset);
+ v->high = RIVAL(ndr->data, ndr->offset+4);
+ } else {
+ v->low = IVAL(ndr->data, ndr->offset);
+ v->high = IVAL(ndr->data, ndr->offset+4);
+ }
+ ndr->offset += 8;
+ return NT_STATUS_OK;
+}
+
+/*
pull a NTSTATUS
*/
NTSTATUS ndr_pull_NTSTATUS(struct ndr_pull *ndr, NTSTATUS *status)
@@ -152,14 +170,11 @@ NTSTATUS ndr_pull_array_uint32(struct ndr_pull *ndr, uint32 *data, uint32 n)
/*
parse a GUID
*/
-NTSTATUS ndr_pull_guid(struct ndr_pull *ndr, GUID *guid)
+NTSTATUS ndr_pull_GUID(struct ndr_pull *ndr, int ndr_flags, GUID *guid)
{
- int i;
- NDR_PULL_NEED_BYTES(ndr, GUID_SIZE);
- for (i=0;i<GUID_SIZE;i++) {
- guid->info[i] = CVAL(ndr->data, ndr->offset + i);
+ if (ndr_flags & NDR_SCALARS) {
+ return ndr_pull_bytes(ndr, guid->info, GUID_SIZE);
}
- ndr->offset += i;
return NT_STATUS_OK;
}
@@ -206,6 +221,19 @@ NTSTATUS ndr_push_uint32(struct ndr_push *ndr, uint32 v)
return NT_STATUS_OK;
}
+/*
+ push a HYPER_T
+*/
+NTSTATUS ndr_push_HYPER_T(struct ndr_push *ndr, HYPER_T v)
+{
+ NDR_PUSH_ALIGN(ndr, 8);
+ NDR_PUSH_NEED_BYTES(ndr, 8);
+ SIVAL(ndr->data, ndr->offset, v.low);
+ SIVAL(ndr->data, ndr->offset+4, v.high);
+ ndr->offset += 8;
+ return NT_STATUS_OK;
+}
+
NTSTATUS ndr_push_align(struct ndr_push *ndr, size_t size)
{
NDR_PUSH_ALIGN(ndr, size);
@@ -385,7 +413,7 @@ NTSTATUS ndr_push_offset_ptr(struct ndr_push *ndr,
/*
push a GUID
*/
-NTSTATUS ndr_push_guid(struct ndr_push *ndr, GUID *guid)
+NTSTATUS ndr_push_GUID(struct ndr_push *ndr, GUID *guid)
{
return ndr_push_bytes(ndr, guid->info, GUID_SIZE);
}
@@ -431,6 +459,11 @@ void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32 v)
ndr->print(ndr, "%-25s: 0x%08x (%u)", name, v, v);
}
+void ndr_print_HYPER_T(struct ndr_print *ndr, const char *name, HYPER_T v)
+{
+ ndr->print(ndr, "%-25s: 0x%08x%08x", name, v.high, v.low);
+}
+
void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p)
{
if (p) {
@@ -482,3 +515,13 @@ void ndr_print_array_uint32(struct ndr_print *ndr, const char *name,
}
ndr->depth--;
}
+
+void ndr_print_GUID(struct ndr_print *ndr, const char *name, struct GUID *guid)
+{
+ ndr->print(ndr, "%-25s: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+ name,
+ IVAL(guid->info, 0), SVAL(guid->info, 4), SVAL(guid->info, 6),
+ guid->info[8], guid->info[9],
+ guid->info[10], guid->info[11], guid->info[12], guid->info[13],
+ guid->info[14], guid->info[15]);
+}
diff --git a/source4/librpc/ndr/ndr_lsa.c b/source4/librpc/ndr/ndr_lsa.c
index a1379b6452..4a7ee4e5ca 100644
--- a/source4/librpc/ndr/ndr_lsa.c
+++ b/source4/librpc/ndr/ndr_lsa.c
@@ -412,7 +412,7 @@ void ndr_print_lsa_AuditEventsInfo(struct ndr_print *ndr, const char *name, stru
ndr->depth--;
}
-static NTSTATUS ndr_pull_lsa_PrimaryDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_PrimaryDomainInfo *r)
+static NTSTATUS ndr_pull_lsa_DomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DomainInfo *r)
{
uint32 _ptr_sid;
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -434,9 +434,9 @@ done:
return NT_STATUS_OK;
}
-void ndr_print_lsa_PrimaryDomainInfo(struct ndr_print *ndr, const char *name, struct lsa_PrimaryDomainInfo *r)
+void ndr_print_lsa_DomainInfo(struct ndr_print *ndr, const char *name, struct lsa_DomainInfo *r)
{
- ndr_print_struct(ndr, name, "lsa_PrimaryDomainInfo");
+ ndr_print_struct(ndr, name, "lsa_DomainInfo");
ndr->depth++;
ndr_print_lsa_Name(ndr, "name", &r->name);
ndr_print_ptr(ndr, "sid", r->sid);
@@ -448,6 +448,203 @@ void ndr_print_lsa_PrimaryDomainInfo(struct ndr_print *ndr, const char *name, st
ndr->depth--;
}
+static NTSTATUS ndr_pull_lsa_PDAccountInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_PDAccountInfo *r)
+{
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name));
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+ NDR_CHECK(ndr_pull_lsa_Name(ndr, ndr_flags, &r->name));
+done:
+ return NT_STATUS_OK;
+}
+
+void ndr_print_lsa_PDAccountInfo(struct ndr_print *ndr, const char *name, struct lsa_PDAccountInfo *r)
+{
+ ndr_print_struct(ndr, name, "lsa_PDAccountInfo");
+ ndr->depth++;
+ ndr_print_lsa_Name(ndr, "name", &r->name);
+ ndr->depth--;
+}
+
+static NTSTATUS ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_flags, struct lsa_ServerRole *r)
+{
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_pull_uint16(ndr, &r->role));
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+done:
+ return NT_STATUS_OK;
+}
+
+void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, struct lsa_ServerRole *r)
+{
+ ndr_print_struct(ndr, name, "lsa_ServerRole");
+ ndr->depth++;
+ ndr_print_uint16(ndr, "role", r->role);
+ ndr->depth--;
+}
+
+static NTSTATUS ndr_pull_lsa_ReplicaSourceInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ReplicaSourceInfo *r)
+{
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->source));
+ NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->account));
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+ NDR_CHECK(ndr_pull_lsa_Name(ndr, ndr_flags, &r->source));
+ NDR_CHECK(ndr_pull_lsa_Name(ndr, ndr_flags, &r->account));
+done:
+ return NT_STATUS_OK;
+}
+
+void ndr_print_lsa_ReplicaSourceInfo(struct ndr_print *ndr, const char *name, struct lsa_ReplicaSourceInfo *r)
+{
+ ndr_print_struct(ndr, name, "lsa_ReplicaSourceInfo");
+ ndr->depth++;
+ ndr_print_lsa_Name(ndr, "source", &r->source);
+ ndr_print_lsa_Name(ndr, "account", &r->account);
+ ndr->depth--;
+}
+
+static NTSTATUS ndr_pull_lsa_DefaultQuotaInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DefaultQuotaInfo *r)
+{
+ NDR_CHECK(ndr_pull_align(ndr, 8));
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->paged_pool));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->non_paged_pool));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->min_wss));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->max_wss));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->pagefile));
+ NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->unknown));
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+done:
+ return NT_STATUS_OK;
+}
+
+void ndr_print_lsa_DefaultQuotaInfo(struct ndr_print *ndr, const char *name, 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_T(ndr, "unknown", r->unknown);
+ ndr->depth--;
+}
+
+static NTSTATUS ndr_pull_lsa_ModificationInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_ModificationInfo *r)
+{
+ NDR_CHECK(ndr_pull_align(ndr, 8));
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->modified_id));
+ NDR_CHECK(ndr_pull_NTTIME(ndr, &r->db_create_time));
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+done:
+ return NT_STATUS_OK;
+}
+
+void ndr_print_lsa_ModificationInfo(struct ndr_print *ndr, const char *name, struct lsa_ModificationInfo *r)
+{
+ ndr_print_struct(ndr, name, "lsa_ModificationInfo");
+ ndr->depth++;
+ ndr_print_HYPER_T(ndr, "modified_id", r->modified_id);
+ ndr_print_NTTIME(ndr, "db_create_time", r->db_create_time);
+ ndr->depth--;
+}
+
+static NTSTATUS ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullSetInfo *r)
+{
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->shutdown_on_full));
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+done:
+ return NT_STATUS_OK;
+}
+
+void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, struct lsa_AuditFullSetInfo *r)
+{
+ ndr_print_struct(ndr, name, "lsa_AuditFullSetInfo");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "shutdown_on_full", r->shutdown_on_full);
+ ndr->depth--;
+}
+
+static NTSTATUS ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_AuditFullQueryInfo *r)
+{
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->shutdown_on_full));
+ NDR_CHECK(ndr_pull_uint32(ndr, &r->log_is_full));
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+done:
+ return NT_STATUS_OK;
+}
+
+void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, struct lsa_AuditFullQueryInfo *r)
+{
+ ndr_print_struct(ndr, name, "lsa_AuditFullQueryInfo");
+ ndr->depth++;
+ ndr_print_uint32(ndr, "shutdown_on_full", r->shutdown_on_full);
+ ndr_print_uint32(ndr, "log_is_full", r->log_is_full);
+ ndr->depth--;
+}
+
+static NTSTATUS ndr_pull_lsa_DnsDomainInfo(struct ndr_pull *ndr, int ndr_flags, struct lsa_DnsDomainInfo *r)
+{
+ uint32 _ptr_sid;
+ NDR_CHECK(ndr_pull_align(ndr, 4));
+ if (!(ndr_flags & NDR_SCALARS)) goto buffers;
+ NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->name));
+ NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->dns_domain));
+ NDR_CHECK(ndr_pull_lsa_Name(ndr, NDR_SCALARS, &r->dns_forest));
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->domain_guid));
+ NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sid));
+ if (_ptr_sid) {
+ NDR_ALLOC(ndr, r->sid);
+ } else {
+ r->sid = NULL;
+ }
+buffers:
+ if (!(ndr_flags & NDR_BUFFERS)) goto done;
+ NDR_CHECK(ndr_pull_lsa_Name(ndr, ndr_flags, &r->name));
+ NDR_CHECK(ndr_pull_lsa_Name(ndr, ndr_flags, &r->dns_domain));
+ NDR_CHECK(ndr_pull_lsa_Name(ndr, ndr_flags, &r->dns_forest));
+ NDR_CHECK(ndr_pull_GUID(ndr, ndr_flags, &r->domain_guid));
+ if (r->sid) {
+ NDR_CHECK(ndr_pull_dom_sid2(ndr, r->sid));
+ }
+done:
+ return NT_STATUS_OK;
+}
+
+void ndr_print_lsa_DnsDomainInfo(struct ndr_print *ndr, const char *name, struct lsa_DnsDomainInfo *r)
+{
+ ndr_print_struct(ndr, name, "lsa_DnsDomainInfo");
+ ndr->depth++;
+ ndr_print_lsa_Name(ndr, "name", &r->name);
+ ndr_print_lsa_Name(ndr, "dns_domain", &r->dns_domain);
+ ndr_print_lsa_Name(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--;
+}
+
static NTSTATUS ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union lsa_PolicyInformation *r)
{
NDR_CHECK(ndr_pull_uint16(ndr, level));
@@ -462,7 +659,43 @@ static NTSTATUS ndr_pull_lsa_PolicyInformation(struct ndr_pull *ndr, int ndr_fla
break;
case 3:
- NDR_CHECK(ndr_pull_lsa_PrimaryDomainInfo(ndr, NDR_SCALARS, &r->domain));
+ NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->domain));
+ break;
+
+ case 4:
+ NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_SCALARS, &r->pd));
+ break;
+
+ case 5:
+ NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_SCALARS, &r->account_domain));
+ break;
+
+ case 6:
+ NDR_CHECK(ndr_pull_lsa_ServerRole(ndr, NDR_SCALARS, &r->role));
+ break;
+
+ case 7:
+ NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_SCALARS, &r->replica));
+ break;
+
+ case 8:
+ NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr, NDR_SCALARS, &r->quota));
+ break;
+
+ case 9:
+ NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_SCALARS, &r->db));
+ break;
+
+ case 10:
+ NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr, NDR_SCALARS, &r->auditfullset));
+ break;
+
+ case 11:
+ NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr, NDR_SCALARS, &r->auditfullquery));
+ break;
+
+ case 12:
+ NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_SCALARS, &r->dns));
break;
default:
@@ -480,7 +713,43 @@ buffers:
break;
case 3:
- NDR_CHECK(ndr_pull_lsa_PrimaryDomainInfo(ndr, NDR_BUFFERS, &r->domain));
+ NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->domain));
+ break;
+
+ case 4:
+ NDR_CHECK(ndr_pull_lsa_PDAccountInfo(ndr, NDR_BUFFERS, &r->pd));
+ break;
+
+ case 5:
+ NDR_CHECK(ndr_pull_lsa_DomainInfo(ndr, NDR_BUFFERS, &r->account_domain));
+ break;
+
+ case 6:
+ NDR_CHECK(ndr_pull_lsa_ServerRole(ndr, NDR_BUFFERS, &r->role));
+ break;
+
+ case 7:
+ NDR_CHECK(ndr_pull_lsa_ReplicaSourceInfo(ndr, NDR_BUFFERS, &r->replica));
+ break;
+
+ case 8:
+ NDR_CHECK(ndr_pull_lsa_DefaultQuotaInfo(ndr, NDR_BUFFERS, &r->quota));
+ break;
+
+ case 9:
+ NDR_CHECK(ndr_pull_lsa_ModificationInfo(ndr, NDR_BUFFERS, &r->db));
+ break;
+
+ case 10:
+ NDR_CHECK(ndr_pull_lsa_AuditFullSetInfo(ndr, NDR_BUFFERS, &r->auditfullset));
+ break;
+
+ case 11:
+ NDR_CHECK(ndr_pull_lsa_AuditFullQueryInfo(ndr, NDR_BUFFERS, &r->auditfullquery));
+ break;
+
+ case 12:
+ NDR_CHECK(ndr_pull_lsa_DnsDomainInfo(ndr, NDR_BUFFERS, &r->dns));
break;
default:
@@ -503,7 +772,43 @@ void ndr_print_lsa_PolicyInformation(struct ndr_print *ndr, const char *name, ui
break;
case 3:
- ndr_print_lsa_PrimaryDomainInfo(ndr, "domain", &r->domain);
+ ndr_print_lsa_DomainInfo(ndr, "domain", &r->domain);
+ break;
+
+ case 4:
+ ndr_print_lsa_PDAccountInfo(ndr, "pd", &r->pd);
+ break;
+
+ case 5:
+ ndr_print_lsa_DomainInfo(ndr, "account_domain", &r->account_domain);
+ break;
+
+ case 6:
+ ndr_print_lsa_ServerRole(ndr, "role", &r->role);
+ break;
+
+ case 7:
+ ndr_print_lsa_ReplicaSourceInfo(ndr, "replica", &r->replica);
+ break;
+
+ case 8:
+ ndr_print_lsa_DefaultQuotaInfo(ndr, "quota", &r->quota);
+ break;
+
+ case 9:
+ ndr_print_lsa_ModificationInfo(ndr, "db", &r->db);
+ break;
+
+ case 10:
+ ndr_print_lsa_AuditFullSetInfo(ndr, "auditfullset", &r->auditfullset);
+ break;
+
+ case 11:
+ ndr_print_lsa_AuditFullQueryInfo(ndr, "auditfullquery", &r->auditfullquery);
+ break;
+
+ case 12:
+ ndr_print_lsa_DnsDomainInfo(ndr, "dns", &r->dns);
break;
default:
diff --git a/source4/librpc/ndr/ndr_lsa.h b/source4/librpc/ndr/ndr_lsa.h
index 21060b6058..bf642872e2 100644
--- a/source4/librpc/ndr/ndr_lsa.h
+++ b/source4/librpc/ndr/ndr_lsa.h
@@ -133,15 +133,68 @@ struct lsa_AuditEventsInfo {
struct lsa_AuditSettings *settings;
};
-struct lsa_PrimaryDomainInfo {
+struct lsa_DomainInfo {
struct lsa_Name name;
struct dom_sid2 *sid;
};
+struct lsa_PDAccountInfo {
+ struct lsa_Name name;
+};
+
+struct lsa_ServerRole {
+ uint16 role;
+};
+
+struct lsa_ReplicaSourceInfo {
+ struct lsa_Name source;
+ struct lsa_Name account;
+};
+
+struct lsa_DefaultQuotaInfo {
+ uint32 paged_pool;
+ uint32 non_paged_pool;
+ uint32 min_wss;
+ uint32 max_wss;
+ uint32 pagefile;
+ HYPER_T unknown;
+};
+
+struct lsa_ModificationInfo {
+ HYPER_T modified_id;
+ NTTIME db_create_time;
+};
+
+struct lsa_AuditFullSetInfo {
+ uint32 shutdown_on_full;
+};
+
+struct lsa_AuditFullQueryInfo {
+ uint32 shutdown_on_full;
+ uint32 log_is_full;
+};
+
+struct lsa_DnsDomainInfo {
+ struct lsa_Name name;
+ struct lsa_Name dns_domain;
+ struct lsa_Name dns_forest;
+ struct GUID domain_guid;
+ struct dom_sid2 *sid;
+};
+
union lsa_PolicyInformation {
/* [case(1)] */ struct lsa_AuditLogInfo audit_log;
/* [case(2)] */ struct lsa_AuditEventsInfo audit_events;
-/* [case(3)] */ struct lsa_PrimaryDomainInfo domain;
+/* [case(3)] */ struct lsa_DomainInfo domain;
+/* [case(4)] */ struct lsa_PDAccountInfo pd;
+/* [case(5)] */ struct lsa_DomainInfo account_domain;
+/* [case(6)] */ struct lsa_ServerRole role;
+/* [case(7)] */ struct lsa_ReplicaSourceInfo replica;
+/* [case(8)] */ struct lsa_DefaultQuotaInfo quota;
+/* [case(9)] */ struct lsa_ModificationInfo db;
+/* [case(10)] */ struct lsa_AuditFullSetInfo auditfullset;
+/* [case(11)] */ struct lsa_AuditFullQueryInfo auditfullquery;
+/* [case(12)] */ struct lsa_DnsDomainInfo dns;
};
struct lsa_QueryInfoPolicy {
diff --git a/source4/librpc/ndr/ndr_sec.c b/source4/librpc/ndr/ndr_sec.c
index 98f40e0ea3..989de5b658 100644
--- a/source4/librpc/ndr/ndr_sec.c
+++ b/source4/librpc/ndr/ndr_sec.c
@@ -45,10 +45,10 @@ NTSTATUS ndr_pull_security_ace(struct ndr_pull *ndr, struct security_ace *ace)
NDR_ALLOC(ndr, ace->obj);
NDR_CHECK(ndr_pull_uint32(ndr, &ace->obj->flags));
if (ace->obj->flags & SEC_ACE_OBJECT_PRESENT) {
- NDR_CHECK(ndr_pull_guid(ndr, &ace->obj->object_guid));
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &ace->obj->object_guid));
}
if (ace->obj->flags & SEC_ACE_OBJECT_INHERITED_PRESENT) {
- NDR_CHECK(ndr_pull_guid(ndr, &ace->obj->inherit_guid));
+ NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &ace->obj->inherit_guid));
}
}
@@ -203,10 +203,10 @@ NTSTATUS ndr_push_security_ace(struct ndr_push *ndr, struct security_ace *ace)
if (sec_ace_object(ace->type)) {
NDR_CHECK(ndr_push_uint32(ndr, ace->obj->flags));
if (ace->obj->flags & SEC_ACE_OBJECT_PRESENT) {
- NDR_CHECK(ndr_push_guid(ndr, &ace->obj->object_guid));
+ NDR_CHECK(ndr_push_GUID(ndr, &ace->obj->object_guid));
}
if (ace->obj->flags & SEC_ACE_OBJECT_INHERITED_PRESENT) {
- NDR_CHECK(ndr_push_guid(ndr, &ace->obj->inherit_guid));
+ NDR_CHECK(ndr_push_GUID(ndr, &ace->obj->inherit_guid));
}
}
@@ -361,9 +361,8 @@ void ndr_print_security_descriptor(struct ndr_print *ndr,
const char *name,
struct security_descriptor *sd)
{
- ndr->print(ndr->depth, "%-25s: ndr_print_security_descriptor not implemented",
+ ndr->print(ndr, "%-25s: ndr_print_security_descriptor not implemented",
name);
}
-