1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3:winbind: Rename wbint_GroupMembers to wbint_Principals

This commit is contained in:
Volker Lendecke 2009-08-23 12:43:43 +02:00
parent ffd9d41be9
commit 58feaa7947
9 changed files with 62 additions and 62 deletions

View File

@ -1816,7 +1816,7 @@ struct tevent_req *rpccli_wbint_LookupGroupMembers_send(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client *cli,
struct dom_sid *_sid /* [in] [ref] */,
enum lsa_SidType _type /* [in] */,
struct wbint_GroupMembers *_members /* [out] [ref] */)
struct wbint_Principals *_members /* [out] [ref] */)
{
struct tevent_req *req;
struct rpccli_wbint_LookupGroupMembers_state *state;
@ -1929,7 +1929,7 @@ NTSTATUS rpccli_wbint_LookupGroupMembers(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct dom_sid *sid /* [in] [ref] */,
enum lsa_SidType type /* [in] */,
struct wbint_GroupMembers *members /* [out] [ref] */)
struct wbint_Principals *members /* [out] [ref] */)
{
struct wbint_LookupGroupMembers r;
NTSTATUS status;

View File

@ -153,7 +153,7 @@ struct tevent_req *rpccli_wbint_LookupGroupMembers_send(TALLOC_CTX *mem_ctx,
struct rpc_pipe_client *cli,
struct dom_sid *_sid /* [in] [ref] */,
enum lsa_SidType _type /* [in] */,
struct wbint_GroupMembers *_members /* [out] [ref] */);
struct wbint_Principals *_members /* [out] [ref] */);
NTSTATUS rpccli_wbint_LookupGroupMembers_recv(struct tevent_req *req,
TALLOC_CTX *mem_ctx,
NTSTATUS *result);
@ -161,5 +161,5 @@ NTSTATUS rpccli_wbint_LookupGroupMembers(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct dom_sid *sid /* [in] [ref] */,
enum lsa_SidType type /* [in] */,
struct wbint_GroupMembers *members /* [out] [ref] */);
struct wbint_Principals *members /* [out] [ref] */);
#endif /* __CLI_WBINT__ */

View File

@ -356,67 +356,67 @@ _PUBLIC_ void ndr_print_wbint_Principal(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
_PUBLIC_ enum ndr_err_code ndr_push_wbint_GroupMembers(struct ndr_push *ndr, int ndr_flags, const struct wbint_GroupMembers *r)
_PUBLIC_ enum ndr_err_code ndr_push_wbint_Principals(struct ndr_push *ndr, int ndr_flags, const struct wbint_Principals *r)
{
uint32_t cntr_members_0;
uint32_t cntr_principals_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_members));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_principals));
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->num_members));
for (cntr_members_0 = 0; cntr_members_0 < r->num_members; cntr_members_0++) {
NDR_CHECK(ndr_push_wbint_Principal(ndr, NDR_SCALARS, &r->members[cntr_members_0]));
NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->num_principals));
for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
NDR_CHECK(ndr_push_wbint_Principal(ndr, NDR_SCALARS, &r->principals[cntr_principals_0]));
}
}
if (ndr_flags & NDR_BUFFERS) {
for (cntr_members_0 = 0; cntr_members_0 < r->num_members; cntr_members_0++) {
NDR_CHECK(ndr_push_wbint_Principal(ndr, NDR_BUFFERS, &r->members[cntr_members_0]));
for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
NDR_CHECK(ndr_push_wbint_Principal(ndr, NDR_BUFFERS, &r->principals[cntr_principals_0]));
}
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ enum ndr_err_code ndr_pull_wbint_GroupMembers(struct ndr_pull *ndr, int ndr_flags, struct wbint_GroupMembers *r)
_PUBLIC_ enum ndr_err_code ndr_pull_wbint_Principals(struct ndr_pull *ndr, int ndr_flags, struct wbint_Principals *r)
{
uint32_t cntr_members_0;
TALLOC_CTX *_mem_save_members_0;
uint32_t cntr_principals_0;
TALLOC_CTX *_mem_save_principals_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_array_size(ndr, &r->members));
NDR_CHECK(ndr_pull_array_size(ndr, &r->principals));
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->num_members));
NDR_PULL_ALLOC_N(ndr, r->members, ndr_get_array_size(ndr, &r->members));
_mem_save_members_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->members, 0);
for (cntr_members_0 = 0; cntr_members_0 < r->num_members; cntr_members_0++) {
NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_SCALARS, &r->members[cntr_members_0]));
NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->num_principals));
NDR_PULL_ALLOC_N(ndr, r->principals, ndr_get_array_size(ndr, &r->principals));
_mem_save_principals_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->principals, 0);
for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_SCALARS, &r->principals[cntr_principals_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_members_0, 0);
if (r->members) {
NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->members, r->num_members));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_principals_0, 0);
if (r->principals) {
NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->principals, r->num_principals));
}
}
if (ndr_flags & NDR_BUFFERS) {
_mem_save_members_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->members, 0);
for (cntr_members_0 = 0; cntr_members_0 < r->num_members; cntr_members_0++) {
NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_BUFFERS, &r->members[cntr_members_0]));
_mem_save_principals_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->principals, 0);
for (cntr_principals_0 = 0; cntr_principals_0 < r->num_principals; cntr_principals_0++) {
NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_BUFFERS, &r->principals[cntr_principals_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_members_0, 0);
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_principals_0, 0);
}
return NDR_ERR_SUCCESS;
}
_PUBLIC_ void ndr_print_wbint_GroupMembers(struct ndr_print *ndr, const char *name, const struct wbint_GroupMembers *r)
_PUBLIC_ void ndr_print_wbint_Principals(struct ndr_print *ndr, const char *name, const struct wbint_Principals *r)
{
uint32_t cntr_members_0;
ndr_print_struct(ndr, name, "wbint_GroupMembers");
uint32_t cntr_principals_0;
ndr_print_struct(ndr, name, "wbint_Principals");
ndr->depth++;
ndr_print_int32(ndr, "num_members", r->num_members);
ndr->print(ndr, "%s: ARRAY(%d)", "members", (int)r->num_members);
ndr_print_int32(ndr, "num_principals", r->num_principals);
ndr->print(ndr, "%s: ARRAY(%d)", "principals", (int)r->num_principals);
ndr->depth++;
for (cntr_members_0=0;cntr_members_0<r->num_members;cntr_members_0++) {
for (cntr_principals_0=0;cntr_principals_0<r->num_principals;cntr_principals_0++) {
char *idx_0=NULL;
if (asprintf(&idx_0, "[%d]", cntr_members_0) != -1) {
ndr_print_wbint_Principal(ndr, "members", &r->members[cntr_members_0]);
if (asprintf(&idx_0, "[%d]", cntr_principals_0) != -1) {
ndr_print_wbint_Principal(ndr, "principals", &r->principals[cntr_principals_0]);
free(idx_0);
}
}
@ -1495,7 +1495,7 @@ static enum ndr_err_code ndr_push_wbint_LookupGroupMembers(struct ndr_push *ndr,
if (r->out.members == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_wbint_GroupMembers(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.members));
NDR_CHECK(ndr_push_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.members));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@ -1525,7 +1525,7 @@ static enum ndr_err_code ndr_pull_wbint_LookupGroupMembers(struct ndr_pull *ndr,
}
_mem_save_members_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.members, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_wbint_GroupMembers(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.members));
NDR_CHECK(ndr_pull_wbint_Principals(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.members));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_members_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
@ -1554,7 +1554,7 @@ _PUBLIC_ void ndr_print_wbint_LookupGroupMembers(struct ndr_print *ndr, const ch
ndr->depth++;
ndr_print_ptr(ndr, "members", r->out.members);
ndr->depth++;
ndr_print_wbint_GroupMembers(ndr, "members", r->out.members);
ndr_print_wbint_Principals(ndr, "members", r->out.members);
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;

View File

@ -48,9 +48,9 @@ void ndr_print_wbint_RidArray(struct ndr_print *ndr, const char *name, const str
enum ndr_err_code ndr_push_wbint_Principal(struct ndr_push *ndr, int ndr_flags, const struct wbint_Principal *r);
enum ndr_err_code ndr_pull_wbint_Principal(struct ndr_pull *ndr, int ndr_flags, struct wbint_Principal *r);
void ndr_print_wbint_Principal(struct ndr_print *ndr, const char *name, const struct wbint_Principal *r);
enum ndr_err_code ndr_push_wbint_GroupMembers(struct ndr_push *ndr, int ndr_flags, const struct wbint_GroupMembers *r);
enum ndr_err_code ndr_pull_wbint_GroupMembers(struct ndr_pull *ndr, int ndr_flags, struct wbint_GroupMembers *r);
void ndr_print_wbint_GroupMembers(struct ndr_print *ndr, const char *name, const struct wbint_GroupMembers *r);
enum ndr_err_code ndr_push_wbint_Principals(struct ndr_push *ndr, int ndr_flags, const struct wbint_Principals *r);
enum ndr_err_code ndr_pull_wbint_Principals(struct ndr_pull *ndr, int ndr_flags, struct wbint_Principals *r);
void ndr_print_wbint_Principals(struct ndr_print *ndr, const char *name, const struct wbint_Principals *r);
void ndr_print_wbint_Ping(struct ndr_print *ndr, const char *name, int flags, const struct wbint_Ping *r);
void ndr_print_wbint_LookupSid(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupSid *r);
void ndr_print_wbint_LookupName(struct ndr_print *ndr, const char *name, int flags, const struct wbint_LookupName *r);

View File

@ -943,7 +943,7 @@ static bool api_wbint_LookupGroupMembers(pipes_struct *p)
}
ZERO_STRUCT(r->out);
r->out.members = talloc_zero(r, struct wbint_GroupMembers);
r->out.members = talloc_zero(r, struct wbint_Principals);
if (r->out.members == NULL) {
talloc_free(r);
return false;
@ -1166,7 +1166,7 @@ NTSTATUS rpc_wbint_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, co
case NDR_WBINT_LOOKUPGROUPMEMBERS: {
struct wbint_LookupGroupMembers *r = (struct wbint_LookupGroupMembers *)_r;
ZERO_STRUCT(r->out);
r->out.members = talloc_zero(mem_ctx, struct wbint_GroupMembers);
r->out.members = talloc_zero(mem_ctx, struct wbint_Principals);
if (r->out.members == NULL) {
return NT_STATUS_NO_MEMORY;
}

View File

@ -34,9 +34,9 @@ struct wbint_Principal {
const char *name;/* [unique,charset(UTF8)] */
}/* [public] */;
struct wbint_GroupMembers {
int32_t num_members;
struct wbint_Principal *members;/* [size_is(num_members)] */
struct wbint_Principals {
int32_t num_principals;
struct wbint_Principal *principals;/* [size_is(num_principals)] */
}/* [public] */;
@ -194,7 +194,7 @@ struct wbint_LookupGroupMembers {
} in;
struct {
struct wbint_GroupMembers *members;/* [ref] */
struct wbint_Principals *members;/* [ref] */
NTSTATUS result;
} out;

View File

@ -100,13 +100,13 @@ interface wbint
} wbint_Principal;
typedef [public] struct {
int num_members;
[size_is(num_members)] wbint_Principal members[];
} wbint_GroupMembers;
int num_principals;
[size_is(num_principals)] wbint_Principal principals[];
} wbint_Principals;
NTSTATUS wbint_LookupGroupMembers(
[in] dom_sid *sid,
[in] lsa_SidType type,
[out] wbint_GroupMembers *members
[out] wbint_Principals *members
);
}

View File

@ -39,7 +39,7 @@
struct wb_lookupgroupmem_state {
struct dom_sid sid;
struct wbint_GroupMembers members;
struct wbint_Principals members;
};
static void wb_lookupgroupmem_done(struct tevent_req *subreq);
@ -110,8 +110,8 @@ static NTSTATUS wb_lookupgroupmem_recv(struct tevent_req *req,
return status;
}
*num_members = state->members.num_members;
*members = talloc_move(mem_ctx, &state->members.members);
*num_members = state->members.num_principals;
*members = talloc_move(mem_ctx, &state->members.principals);
return NT_STATUS_OK;
}

View File

@ -179,17 +179,17 @@ NTSTATUS _wbint_LookupGroupMembers(pipes_struct *p,
return status;
}
r->out.members->num_members = num_names;
r->out.members->members = talloc_array(
r->out.members->num_principals = num_names;
r->out.members->principals = talloc_array(
r->out.members, struct wbint_Principal, num_names);
if (r->out.members->members == NULL) {
if (r->out.members->principals == NULL) {
return NT_STATUS_NO_MEMORY;
}
for (i=0; i<num_names; i++) {
struct wbint_Principal *m = &r->out.members->members[i];
struct wbint_Principal *m = &r->out.members->principals[i];
sid_copy(&m->sid, &sid_mem[i]);
m->name = talloc_move(r->out.members->members, &names[i]);
m->name = talloc_move(r->out.members->principals, &names[i]);
m->type = (enum lsa_SidType)name_types[i];
}