summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-09-14 14:51:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:51:46 -0500
commit71453ab90dbda7f335a3c7119eb8d404e85a0131 (patch)
tree98389567efb132cd9bdec96e7ae1ce77800ee03c /source3/librpc/gen_ndr
parent1e811453620ea35bcc1f2b481d1ebdc0778b282f (diff)
downloadsamba-71453ab90dbda7f335a3c7119eb8d404e85a0131.tar.gz
samba-71453ab90dbda7f335a3c7119eb8d404e85a0131.tar.bz2
samba-71453ab90dbda7f335a3c7119eb8d404e85a0131.zip
r18526: Use generated server for unixinfo RPC interface.
(This used to be commit a5c0606d7667506fdc64776e32d4b3508195a199)
Diffstat (limited to 'source3/librpc/gen_ndr')
-rw-r--r--source3/librpc/gen_ndr/ndr_unixinfo.c43
-rw-r--r--source3/librpc/gen_ndr/srv_dfs.c12
-rw-r--r--source3/librpc/gen_ndr/srv_lsa.c200
-rw-r--r--source3/librpc/gen_ndr/srv_lsa.h2
-rw-r--r--source3/librpc/gen_ndr/srv_unixinfo.c32
-rw-r--r--source3/librpc/gen_ndr/srv_unixinfo.h2
-rw-r--r--source3/librpc/gen_ndr/unixinfo.h2
7 files changed, 262 insertions, 31 deletions
diff --git a/source3/librpc/gen_ndr/ndr_unixinfo.c b/source3/librpc/gen_ndr/ndr_unixinfo.c
index 4a5a2c70d6..bbf76a368b 100644
--- a/source3/librpc/gen_ndr/ndr_unixinfo.c
+++ b/source3/librpc/gen_ndr/ndr_unixinfo.c
@@ -327,7 +327,7 @@ _PUBLIC_ void ndr_print_unixinfo_GidToSid(struct ndr_print *ndr, const char *nam
NTSTATUS ndr_push_unixinfo_GetPWUid(struct ndr_push *ndr, int flags, const struct unixinfo_GetPWUid *r)
{
uint32_t cntr_uids_0;
- uint32_t cntr_infos_1;
+ uint32_t cntr_infos_0;
if (flags & NDR_IN) {
if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.count));
@@ -339,10 +339,9 @@ NTSTATUS ndr_push_unixinfo_GetPWUid(struct ndr_push *ndr, int flags, const struc
if (flags & NDR_OUT) {
if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
- if (r->out.infos == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
- for (cntr_infos_1 = 0; cntr_infos_1 < *r->out.count; cntr_infos_1++) {
- NDR_CHECK(ndr_push_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_1]));
+ for (cntr_infos_0 = 0; cntr_infos_0 < *r->out.count; cntr_infos_0++) {
+ NDR_CHECK(ndr_push_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_0]));
}
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
@@ -352,10 +351,10 @@ NTSTATUS ndr_push_unixinfo_GetPWUid(struct ndr_push *ndr, int flags, const struc
NTSTATUS ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unixinfo_GetPWUid *r)
{
uint32_t cntr_uids_0;
- uint32_t cntr_infos_1;
+ uint32_t cntr_infos_0;
TALLOC_CTX *_mem_save_count_0;
TALLOC_CTX *_mem_save_uids_0;
- TALLOC_CTX *_mem_save_infos_1;
+ TALLOC_CTX *_mem_save_infos_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -379,9 +378,6 @@ NTSTATUS ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unix
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_uids_0, 0);
NDR_PULL_ALLOC(ndr, r->out.count);
*r->out.count = *r->in.count;
- if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
- NDR_PULL_ALLOC_N(ndr, r->out.infos, *r->in.count);
- memset(r->out.infos, 0, *r->in.count * sizeof(*r->out.infos));
if (r->in.uids) {
if (r->in.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.uids, *r->in.count));
@@ -399,15 +395,13 @@ NTSTATUS ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unix
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_array_size(ndr, &r->out.infos));
- if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
- NDR_PULL_ALLOC_N(ndr, r->out.infos, ndr_get_array_size(ndr, &r->out.infos));
- }
- _mem_save_infos_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_ALLOC_N(ndr, r->out.infos, ndr_get_array_size(ndr, &r->out.infos));
+ _mem_save_infos_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.infos, 0);
- for (cntr_infos_1 = 0; cntr_infos_1 < *r->out.count; cntr_infos_1++) {
- NDR_CHECK(ndr_pull_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_1]));
+ for (cntr_infos_0 = 0; cntr_infos_0 < *r->out.count; cntr_infos_0++) {
+ NDR_CHECK(ndr_pull_unixinfo_GetPWUidInfo(ndr, NDR_SCALARS, &r->out.infos[cntr_infos_0]));
}
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_infos_1, 0);
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_infos_0, 0);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
if (r->out.infos) {
if (r->out.count == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
@@ -420,7 +414,7 @@ NTSTATUS ndr_pull_unixinfo_GetPWUid(struct ndr_pull *ndr, int flags, struct unix
_PUBLIC_ void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *name, int flags, const struct unixinfo_GetPWUid *r)
{
uint32_t cntr_uids_0;
- uint32_t cntr_infos_1;
+ uint32_t cntr_infos_0;
ndr_print_struct(ndr, name, "unixinfo_GetPWUid");
ndr->depth++;
if (flags & NDR_SET_VALUES) {
@@ -453,20 +447,17 @@ _PUBLIC_ void ndr_print_unixinfo_GetPWUid(struct ndr_print *ndr, const char *nam
ndr->depth++;
ndr_print_uint32(ndr, "count", *r->out.count);
ndr->depth--;
- ndr_print_ptr(ndr, "infos", r->out.infos);
- ndr->depth++;
ndr->print(ndr, "%s: ARRAY(%d)", "infos", *r->out.count);
ndr->depth++;
- for (cntr_infos_1=0;cntr_infos_1<*r->out.count;cntr_infos_1++) {
- char *idx_1=NULL;
- asprintf(&idx_1, "[%d]", cntr_infos_1);
- if (idx_1) {
- ndr_print_unixinfo_GetPWUidInfo(ndr, "infos", &r->out.infos[cntr_infos_1]);
- free(idx_1);
+ for (cntr_infos_0=0;cntr_infos_0<*r->out.count;cntr_infos_0++) {
+ char *idx_0=NULL;
+ asprintf(&idx_0, "[%d]", cntr_infos_0);
+ if (idx_0) {
+ ndr_print_unixinfo_GetPWUidInfo(ndr, "infos", &r->out.infos[cntr_infos_0]);
+ free(idx_0);
}
}
ndr->depth--;
- ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
}
diff --git a/source3/librpc/gen_ndr/srv_dfs.c b/source3/librpc/gen_ndr/srv_dfs.c
index 75f3cd3949..bd4503248d 100644
--- a/source3/librpc/gen_ndr/srv_dfs.c
+++ b/source3/librpc/gen_ndr/srv_dfs.c
@@ -31,6 +31,12 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p)
return False;
}
+ r.out.exist_flag = talloc_size(mem_ctx, sizeof(*r.out.exist_flag));
+ if (r.out.exist_flag == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
_dfs_GetManagerVersion(p, r.out.exist_flag);
push = ndr_push_init_ctx(mem_ctx);
@@ -231,6 +237,12 @@ static BOOL api_dfs_GetInfo(pipes_struct *p)
return False;
}
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _dfs_GetInfo(p, r.in.path, r.in.server, r.in.share, r.in.level, r.out.info);
push = ndr_push_init_ctx(mem_ctx);
diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c
index 20d564b65f..c9780580d6 100644
--- a/source3/librpc/gen_ndr/srv_lsa.c
+++ b/source3/librpc/gen_ndr/srv_lsa.c
@@ -133,6 +133,12 @@ static BOOL api_lsa_EnumPrivs(pipes_struct *p)
}
r.out.resume_handle = r.in.resume_handle;
+ r.out.privs = talloc_size(mem_ctx, sizeof(*r.out.privs));
+ if (r.out.privs == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_EnumPrivs(p, r.in.handle, r.in.resume_handle, r.in.max_count, r.out.privs);
push = ndr_push_init_ctx(mem_ctx);
@@ -183,6 +189,12 @@ static BOOL api_lsa_QuerySecurity(pipes_struct *p)
return False;
}
+ r.out.sdbuf = talloc_size(mem_ctx, sizeof(*r.out.sdbuf));
+ if (r.out.sdbuf == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_QuerySecurity(p, r.in.handle, r.in.sec_info, r.out.sdbuf);
push = ndr_push_init_ctx(mem_ctx);
@@ -333,6 +345,12 @@ static BOOL api_lsa_OpenPolicy(pipes_struct *p)
return False;
}
+ r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
+ if (r.out.handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_OpenPolicy(p, r.in.system_name, r.in.attr, r.in.access_mask, r.out.handle);
push = ndr_push_init_ctx(mem_ctx);
@@ -383,6 +401,12 @@ static BOOL api_lsa_QueryInfoPolicy(pipes_struct *p)
return False;
}
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_QueryInfoPolicy(p, r.in.handle, r.in.level, r.out.info);
push = ndr_push_init_ctx(mem_ctx);
@@ -533,6 +557,12 @@ static BOOL api_lsa_CreateAccount(pipes_struct *p)
return False;
}
+ r.out.acct_handle = talloc_size(mem_ctx, sizeof(*r.out.acct_handle));
+ if (r.out.acct_handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_CreateAccount(p, r.in.handle, r.in.sid, r.in.access_mask, r.out.acct_handle);
push = ndr_push_init_ctx(mem_ctx);
@@ -584,6 +614,12 @@ static BOOL api_lsa_EnumAccounts(pipes_struct *p)
}
r.out.resume_handle = r.in.resume_handle;
+ r.out.sids = talloc_size(mem_ctx, sizeof(*r.out.sids));
+ if (r.out.sids == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_EnumAccounts(p, r.in.handle, r.in.resume_handle, r.in.num_entries, r.out.sids);
push = ndr_push_init_ctx(mem_ctx);
@@ -634,6 +670,12 @@ static BOOL api_lsa_CreateTrustedDomain(pipes_struct *p)
return False;
}
+ r.out.trustdom_handle = talloc_size(mem_ctx, sizeof(*r.out.trustdom_handle));
+ if (r.out.trustdom_handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_CreateTrustedDomain(p, r.in.handle, r.in.info, r.in.access_mask, r.out.trustdom_handle);
push = ndr_push_init_ctx(mem_ctx);
@@ -685,6 +727,12 @@ static BOOL api_lsa_EnumTrustDom(pipes_struct *p)
}
r.out.resume_handle = r.in.resume_handle;
+ r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains));
+ if (r.out.domains == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_EnumTrustDom(p, r.in.handle, r.in.resume_handle, r.in.max_size, r.out.domains);
push = ndr_push_init_ctx(mem_ctx);
@@ -735,6 +783,12 @@ static BOOL api_lsa_LookupNames(pipes_struct *p)
return False;
}
+ r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains));
+ if (r.out.domains == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.sids = r.in.sids;
r.out.count = r.in.count;
r.out.result = _lsa_LookupNames(p, r.in.handle, r.in.num_names, r.in.names, r.out.domains, r.in.sids, r.in.level, r.in.count);
@@ -787,6 +841,12 @@ static BOOL api_lsa_LookupSids(pipes_struct *p)
return False;
}
+ r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains));
+ if (r.out.domains == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.names = r.in.names;
r.out.count = r.in.count;
r.out.result = _lsa_LookupSids(p, r.in.handle, r.in.sids, r.out.domains, r.in.names, r.in.level, r.in.count);
@@ -839,6 +899,12 @@ static BOOL api_lsa_CreateSecret(pipes_struct *p)
return False;
}
+ r.out.sec_handle = talloc_size(mem_ctx, sizeof(*r.out.sec_handle));
+ if (r.out.sec_handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_CreateSecret(p, r.in.handle, r.in.name, r.in.access_mask, r.out.sec_handle);
push = ndr_push_init_ctx(mem_ctx);
@@ -889,6 +955,12 @@ static BOOL api_lsa_OpenAccount(pipes_struct *p)
return False;
}
+ r.out.acct_handle = talloc_size(mem_ctx, sizeof(*r.out.acct_handle));
+ if (r.out.acct_handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_OpenAccount(p, r.in.handle, r.in.sid, r.in.access_mask, r.out.acct_handle);
push = ndr_push_init_ctx(mem_ctx);
@@ -939,6 +1011,12 @@ static BOOL api_lsa_EnumPrivsAccount(pipes_struct *p)
return False;
}
+ r.out.privs = talloc_size(mem_ctx, sizeof(*r.out.privs));
+ if (r.out.privs == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_EnumPrivsAccount(p, r.in.handle, r.out.privs);
push = ndr_push_init_ctx(mem_ctx);
@@ -1289,6 +1367,12 @@ static BOOL api_lsa_OpenTrustedDomain(pipes_struct *p)
return False;
}
+ r.out.trustdom_handle = talloc_size(mem_ctx, sizeof(*r.out.trustdom_handle));
+ if (r.out.trustdom_handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_OpenTrustedDomain(p, r.in.handle, r.in.sid, r.in.access_mask, r.out.trustdom_handle);
push = ndr_push_init_ctx(mem_ctx);
@@ -1339,6 +1423,12 @@ static BOOL api_lsa_QueryTrustedDomainInfo(pipes_struct *p)
return False;
}
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_QueryTrustedDomainInfo(p, r.in.trustdom_handle, r.in.level, r.out.info);
push = ndr_push_init_ctx(mem_ctx);
@@ -1439,6 +1529,12 @@ static BOOL api_lsa_OpenSecret(pipes_struct *p)
return False;
}
+ r.out.sec_handle = talloc_size(mem_ctx, sizeof(*r.out.sec_handle));
+ if (r.out.sec_handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_OpenSecret(p, r.in.handle, r.in.name, r.in.access_mask, r.out.sec_handle);
push = ndr_push_init_ctx(mem_ctx);
@@ -1593,6 +1689,12 @@ static BOOL api_lsa_LookupPrivValue(pipes_struct *p)
return False;
}
+ r.out.luid = talloc_size(mem_ctx, sizeof(*r.out.luid));
+ if (r.out.luid == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_LookupPrivValue(p, r.in.handle, r.in.name, r.out.luid);
push = ndr_push_init_ctx(mem_ctx);
@@ -1643,6 +1745,12 @@ static BOOL api_lsa_LookupPrivName(pipes_struct *p)
return False;
}
+ r.out.name = talloc_size(mem_ctx, sizeof(*r.out.name));
+ if (r.out.name == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_LookupPrivName(p, r.in.handle, r.in.luid, r.out.name);
push = ndr_push_init_ctx(mem_ctx);
@@ -1693,6 +1801,12 @@ static BOOL api_lsa_LookupPrivDisplayName(pipes_struct *p)
return False;
}
+ r.out.disp_name = talloc_size(mem_ctx, sizeof(*r.out.disp_name));
+ if (r.out.disp_name == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.language_id = r.in.language_id;
r.out.result = _lsa_LookupPrivDisplayName(p, r.in.handle, r.in.name, r.out.disp_name, r.in.language_id, r.in.unknown);
@@ -1794,6 +1908,12 @@ static BOOL api_lsa_EnumAccountsWithUserRight(pipes_struct *p)
return False;
}
+ r.out.sids = talloc_size(mem_ctx, sizeof(*r.out.sids));
+ if (r.out.sids == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_EnumAccountsWithUserRight(p, r.in.handle, r.in.name, r.out.sids);
push = ndr_push_init_ctx(mem_ctx);
@@ -1844,6 +1964,12 @@ static BOOL api_lsa_EnumAccountRights(pipes_struct *p)
return False;
}
+ r.out.rights = talloc_size(mem_ctx, sizeof(*r.out.rights));
+ if (r.out.rights == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_EnumAccountRights(p, r.in.handle, r.in.sid, r.out.rights);
push = ndr_push_init_ctx(mem_ctx);
@@ -1994,6 +2120,12 @@ static BOOL api_lsa_QueryTrustedDomainInfoBySid(pipes_struct *p)
return False;
}
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_QueryTrustedDomainInfoBySid(p, r.in.handle, r.in.dom_sid, r.in.level, r.out.info);
push = ndr_push_init_ctx(mem_ctx);
@@ -2244,6 +2376,12 @@ static BOOL api_lsa_OpenPolicy2(pipes_struct *p)
return False;
}
+ r.out.handle = talloc_size(mem_ctx, sizeof(*r.out.handle));
+ if (r.out.handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_OpenPolicy2(p, r.in.system_name, r.in.attr, r.in.access_mask, r.out.handle);
push = ndr_push_init_ctx(mem_ctx);
@@ -2346,6 +2484,12 @@ static BOOL api_lsa_QueryInfoPolicy2(pipes_struct *p)
return False;
}
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_QueryInfoPolicy2(p, r.in.handle, r.in.level, r.out.info);
push = ndr_push_init_ctx(mem_ctx);
@@ -2446,6 +2590,12 @@ static BOOL api_lsa_QueryTrustedDomainInfoByName(pipes_struct *p)
return False;
}
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_QueryTrustedDomainInfoByName(p, r.in.handle, r.in.trusted_domain, r.in.level, r.out.info);
push = ndr_push_init_ctx(mem_ctx);
@@ -2547,6 +2697,12 @@ static BOOL api_lsa_EnumTrustedDomainsEx(pipes_struct *p)
}
r.out.resume_handle = r.in.resume_handle;
+ r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains));
+ if (r.out.domains == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_EnumTrustedDomainsEx(p, r.in.handle, r.in.resume_handle, r.out.domains, r.in.max_size);
push = ndr_push_init_ctx(mem_ctx);
@@ -2698,6 +2854,12 @@ static BOOL api_lsa_QueryDomainInformationPolicy(pipes_struct *p)
return False;
}
+ r.out.info = talloc_size(mem_ctx, sizeof(*r.out.info));
+ if (r.out.info == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_QueryDomainInformationPolicy(p, r.in.handle, r.in.level, r.out.info);
push = ndr_push_init_ctx(mem_ctx);
@@ -2798,6 +2960,12 @@ static BOOL api_lsa_OpenTrustedDomainByName(pipes_struct *p)
return False;
}
+ r.out.trustdom_handle = talloc_size(mem_ctx, sizeof(*r.out.trustdom_handle));
+ if (r.out.trustdom_handle == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _lsa_OpenTrustedDomainByName(p, r.in.handle, r.in.name, r.in.access_mask, r.out.trustdom_handle);
push = ndr_push_init_ctx(mem_ctx);
@@ -2898,6 +3066,12 @@ static BOOL api_lsa_LookupSids2(pipes_struct *p)
return False;
}
+ r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains));
+ if (r.out.domains == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.names = r.in.names;
r.out.count = r.in.count;
r.out.result = _lsa_LookupSids2(p, r.in.handle, r.in.sids, r.out.domains, r.in.names, r.in.level, r.in.count, r.in.unknown1, r.in.unknown2);
@@ -2950,6 +3124,12 @@ static BOOL api_lsa_LookupNames2(pipes_struct *p)
return False;
}
+ r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains));
+ if (r.out.domains == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.sids = r.in.sids;
r.out.count = r.in.count;
r.out.result = _lsa_LookupNames2(p, r.in.handle, r.in.num_names, r.in.names, r.out.domains, r.in.sids, r.in.level, r.in.count, r.in.unknown1, r.in.unknown2);
@@ -3452,6 +3632,12 @@ static BOOL api_lsa_LookupNames3(pipes_struct *p)
return False;
}
+ r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains));
+ if (r.out.domains == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.sids = r.in.sids;
r.out.count = r.in.count;
r.out.result = _lsa_LookupNames3(p, r.in.handle, r.in.num_names, r.in.names, r.out.domains, r.in.sids, r.in.level, r.in.count, r.in.unknown1, r.in.unknown2);
@@ -3854,6 +4040,12 @@ static BOOL api_lsa_LookupSids3(pipes_struct *p)
return False;
}
+ r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains));
+ if (r.out.domains == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.names = r.in.names;
r.out.count = r.in.count;
r.out.result = _lsa_LookupSids3(p, r.in.sids, r.out.domains, r.in.names, r.in.level, r.in.count, r.in.unknown1, r.in.unknown2);
@@ -3906,6 +4098,12 @@ static BOOL api_lsa_LookupNames4(pipes_struct *p)
return False;
}
+ r.out.domains = talloc_size(mem_ctx, sizeof(*r.out.domains));
+ if (r.out.domains == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.sids = r.in.sids;
r.out.count = r.in.count;
r.out.result = _lsa_LookupNames4(p, r.in.num_names, r.in.names, r.out.domains, r.in.sids, r.in.level, r.in.count, r.in.unknown1, r.in.unknown2);
@@ -4227,7 +4425,7 @@ void lsarpc_get_pipe_fns(struct api_struct **fns, int *n_fns)
*n_fns = sizeof(api_lsarpc_cmds) / sizeof(struct api_struct);
}
-NTSTATUS rpc_netdfs_init(void)
+NTSTATUS rpc_lsarpc_init(void)
{
return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "lsarpc", "lsarpc", api_lsarpc_cmds, sizeof(api_lsarpc_cmds) / sizeof(struct api_struct));
}
diff --git a/source3/librpc/gen_ndr/srv_lsa.h b/source3/librpc/gen_ndr/srv_lsa.h
index b6fdf5f1d3..4dd3c75415 100644
--- a/source3/librpc/gen_ndr/srv_lsa.h
+++ b/source3/librpc/gen_ndr/srv_lsa.h
@@ -84,5 +84,5 @@ NTSTATUS _lsa_LSARADTREGISTERSECURITYEVENTSOURCE(pipes_struct *p);
NTSTATUS _lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(pipes_struct *p);
NTSTATUS _lsa_LSARADTREPORTSECURITYEVENT(pipes_struct *p);
void lsarpc_get_pipe_fns(struct api_struct **fns, int *n_fns);
-NTSTATUS rpc_netdfs_init(void);
+NTSTATUS rpc_lsarpc_init(void);
#endif /* __SRV_LSARPC__ */
diff --git a/source3/librpc/gen_ndr/srv_unixinfo.c b/source3/librpc/gen_ndr/srv_unixinfo.c
index 1c58e94405..e992330866 100644
--- a/source3/librpc/gen_ndr/srv_unixinfo.c
+++ b/source3/librpc/gen_ndr/srv_unixinfo.c
@@ -31,6 +31,12 @@ static BOOL api_unixinfo_SidToUid(pipes_struct *p)
return False;
}
+ r.out.uid = talloc_size(mem_ctx, sizeof(*r.out.uid));
+ if (r.out.uid == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _unixinfo_SidToUid(p, r.in.sid, r.out.uid);
push = ndr_push_init_ctx(mem_ctx);
@@ -81,6 +87,12 @@ static BOOL api_unixinfo_UidToSid(pipes_struct *p)
return False;
}
+ r.out.sid = talloc_size(mem_ctx, sizeof(*r.out.sid));
+ if (r.out.sid == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _unixinfo_UidToSid(p, r.in.uid, r.out.sid);
push = ndr_push_init_ctx(mem_ctx);
@@ -131,6 +143,12 @@ static BOOL api_unixinfo_SidToGid(pipes_struct *p)
return False;
}
+ r.out.gid = talloc_size(mem_ctx, sizeof(*r.out.gid));
+ if (r.out.gid == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _unixinfo_SidToGid(p, r.in.sid, r.out.gid);
push = ndr_push_init_ctx(mem_ctx);
@@ -181,6 +199,12 @@ static BOOL api_unixinfo_GidToSid(pipes_struct *p)
return False;
}
+ r.out.sid = talloc_size(mem_ctx, sizeof(*r.out.sid));
+ if (r.out.sid == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _unixinfo_GidToSid(p, r.in.gid, r.out.sid);
push = ndr_push_init_ctx(mem_ctx);
@@ -232,6 +256,12 @@ static BOOL api_unixinfo_GetPWUid(pipes_struct *p)
}
r.out.count = r.in.count;
+ r.out.infos = talloc_array_size(mem_ctx, sizeof(*r.out.infos), *r.in.count);
+ if (r.out.infos == NULL) {
+ talloc_free(mem_ctx);
+ return False;
+ }
+
r.out.result = _unixinfo_GetPWUid(p, r.in.count, r.in.uids, r.out.infos);
push = ndr_push_init_ctx(mem_ctx);
@@ -274,7 +304,7 @@ void unixinfo_get_pipe_fns(struct api_struct **fns, int *n_fns)
*n_fns = sizeof(api_unixinfo_cmds) / sizeof(struct api_struct);
}
-NTSTATUS rpc_netdfs_init(void)
+NTSTATUS rpc_unixinfo_init(void)
{
return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "unixinfo", "unixinfo", api_unixinfo_cmds, sizeof(api_unixinfo_cmds) / sizeof(struct api_struct));
}
diff --git a/source3/librpc/gen_ndr/srv_unixinfo.h b/source3/librpc/gen_ndr/srv_unixinfo.h
index 751b85162d..d21fb839ad 100644
--- a/source3/librpc/gen_ndr/srv_unixinfo.h
+++ b/source3/librpc/gen_ndr/srv_unixinfo.h
@@ -7,5 +7,5 @@ NTSTATUS _unixinfo_SidToGid(pipes_struct *p, struct dom_sid sid, uint64_t *gid);
NTSTATUS _unixinfo_GidToSid(pipes_struct *p, uint64_t gid, struct dom_sid *sid);
NTSTATUS _unixinfo_GetPWUid(pipes_struct *p, uint32_t *count, uint64_t *uids, struct unixinfo_GetPWUidInfo *infos);
void unixinfo_get_pipe_fns(struct api_struct **fns, int *n_fns);
-NTSTATUS rpc_netdfs_init(void);
+NTSTATUS rpc_unixinfo_init(void);
#endif /* __SRV_UNIXINFO__ */
diff --git a/source3/librpc/gen_ndr/unixinfo.h b/source3/librpc/gen_ndr/unixinfo.h
index 78914daebe..8f8984963f 100644
--- a/source3/librpc/gen_ndr/unixinfo.h
+++ b/source3/librpc/gen_ndr/unixinfo.h
@@ -71,7 +71,7 @@ struct unixinfo_GetPWUid {
struct {
uint32_t *count;/* [keepref,ref,range(0 1023)] */
- struct unixinfo_GetPWUidInfo *infos;/* [keepref,ref,size_is(*count)] */
+ struct unixinfo_GetPWUidInfo *infos;/* [keepref,size_is(*count)] */
NTSTATUS result;
} out;