summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-08-23 12:38:35 +0200
committerVolker Lendecke <vl@samba.org>2009-08-29 10:44:12 +0200
commitffd9d41be93984b6a139818184716e709fbfa1ef (patch)
treecbda033406c331e14dc2de0d2aed91b4886edf84 /source3
parent23abcd2318c69753aa2a144e1dc0f9cf9efdb705 (diff)
downloadsamba-ffd9d41be93984b6a139818184716e709fbfa1ef.tar.gz
samba-ffd9d41be93984b6a139818184716e709fbfa1ef.tar.bz2
samba-ffd9d41be93984b6a139818184716e709fbfa1ef.zip
s3:winbind: Rename wbint_GroupMember to wbint_Principal
Diffstat (limited to 'source3')
-rw-r--r--source3/librpc/gen_ndr/ndr_wbint.c24
-rw-r--r--source3/librpc/gen_ndr/ndr_wbint.h6
-rw-r--r--source3/librpc/gen_ndr/wbint.h6
-rw-r--r--source3/librpc/idl/wbint.idl6
-rw-r--r--source3/winbindd/wb_group_members.c35
-rw-r--r--source3/winbindd/winbindd_dual_srv.c4
-rw-r--r--source3/winbindd/winbindd_group.c8
7 files changed, 44 insertions, 45 deletions
diff --git a/source3/librpc/gen_ndr/ndr_wbint.c b/source3/librpc/gen_ndr/ndr_wbint.c
index bb0d01b0b7..c976ed407b 100644
--- a/source3/librpc/gen_ndr/ndr_wbint.c
+++ b/source3/librpc/gen_ndr/ndr_wbint.c
@@ -290,13 +290,13 @@ _PUBLIC_ void ndr_print_wbint_RidArray(struct ndr_print *ndr, const char *name,
ndr->depth--;
}
-_PUBLIC_ enum ndr_err_code ndr_push_wbint_GroupMember(struct ndr_push *ndr, int ndr_flags, const struct wbint_GroupMember *r)
+_PUBLIC_ enum ndr_err_code ndr_push_wbint_Principal(struct ndr_push *ndr, int ndr_flags, const struct wbint_Principal *r)
{
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sid));
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
NDR_CHECK(ndr_push_lsa_SidType(ndr, NDR_SCALARS, r->type));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
}
if (ndr_flags & NDR_BUFFERS) {
if (r->name) {
@@ -309,20 +309,20 @@ _PUBLIC_ enum ndr_err_code ndr_push_wbint_GroupMember(struct ndr_push *ndr, int
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ enum ndr_err_code ndr_pull_wbint_GroupMember(struct ndr_pull *ndr, int ndr_flags, struct wbint_GroupMember *r)
+_PUBLIC_ enum ndr_err_code ndr_pull_wbint_Principal(struct ndr_pull *ndr, int ndr_flags, struct wbint_Principal *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_dom_sid(ndr, NDR_SCALARS, &r->sid));
+ NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->type));
NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
if (_ptr_name) {
NDR_PULL_ALLOC(ndr, r->name);
} else {
r->name = NULL;
}
- NDR_CHECK(ndr_pull_lsa_SidType(ndr, NDR_SCALARS, &r->type));
}
if (ndr_flags & NDR_BUFFERS) {
if (r->name) {
@@ -341,18 +341,18 @@ _PUBLIC_ enum ndr_err_code ndr_pull_wbint_GroupMember(struct ndr_pull *ndr, int
return NDR_ERR_SUCCESS;
}
-_PUBLIC_ void ndr_print_wbint_GroupMember(struct ndr_print *ndr, const char *name, const struct wbint_GroupMember *r)
+_PUBLIC_ void ndr_print_wbint_Principal(struct ndr_print *ndr, const char *name, const struct wbint_Principal *r)
{
- ndr_print_struct(ndr, name, "wbint_GroupMember");
+ ndr_print_struct(ndr, name, "wbint_Principal");
ndr->depth++;
ndr_print_dom_sid(ndr, "sid", &r->sid);
+ ndr_print_lsa_SidType(ndr, "type", r->type);
ndr_print_ptr(ndr, "name", r->name);
ndr->depth++;
if (r->name) {
ndr_print_string(ndr, "name", r->name);
}
ndr->depth--;
- ndr_print_lsa_SidType(ndr, "type", r->type);
ndr->depth--;
}
@@ -364,12 +364,12 @@ _PUBLIC_ enum ndr_err_code ndr_push_wbint_GroupMembers(struct ndr_push *ndr, int
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_GroupMember(ndr, NDR_SCALARS, &r->members[cntr_members_0]));
+ NDR_CHECK(ndr_push_wbint_Principal(ndr, NDR_SCALARS, &r->members[cntr_members_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_GroupMember(ndr, NDR_BUFFERS, &r->members[cntr_members_0]));
+ NDR_CHECK(ndr_push_wbint_Principal(ndr, NDR_BUFFERS, &r->members[cntr_members_0]));
}
}
return NDR_ERR_SUCCESS;
@@ -387,7 +387,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_wbint_GroupMembers(struct ndr_pull *ndr, int
_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_GroupMember(ndr, NDR_SCALARS, &r->members[cntr_members_0]));
+ NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_SCALARS, &r->members[cntr_members_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_members_0, 0);
if (r->members) {
@@ -398,7 +398,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_wbint_GroupMembers(struct ndr_pull *ndr, int
_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_GroupMember(ndr, NDR_BUFFERS, &r->members[cntr_members_0]));
+ NDR_CHECK(ndr_pull_wbint_Principal(ndr, NDR_BUFFERS, &r->members[cntr_members_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_members_0, 0);
}
@@ -416,7 +416,7 @@ _PUBLIC_ void ndr_print_wbint_GroupMembers(struct ndr_print *ndr, const char *na
for (cntr_members_0=0;cntr_members_0<r->num_members;cntr_members_0++) {
char *idx_0=NULL;
if (asprintf(&idx_0, "[%d]", cntr_members_0) != -1) {
- ndr_print_wbint_GroupMember(ndr, "members", &r->members[cntr_members_0]);
+ ndr_print_wbint_Principal(ndr, "members", &r->members[cntr_members_0]);
free(idx_0);
}
}
diff --git a/source3/librpc/gen_ndr/ndr_wbint.h b/source3/librpc/gen_ndr/ndr_wbint.h
index f6871ada6b..04a40be6b1 100644
--- a/source3/librpc/gen_ndr/ndr_wbint.h
+++ b/source3/librpc/gen_ndr/ndr_wbint.h
@@ -45,9 +45,9 @@ void ndr_print_wbint_SidArray(struct ndr_print *ndr, const char *name, const str
enum ndr_err_code ndr_push_wbint_RidArray(struct ndr_push *ndr, int ndr_flags, const struct wbint_RidArray *r);
enum ndr_err_code ndr_pull_wbint_RidArray(struct ndr_pull *ndr, int ndr_flags, struct wbint_RidArray *r);
void ndr_print_wbint_RidArray(struct ndr_print *ndr, const char *name, const struct wbint_RidArray *r);
-enum ndr_err_code ndr_push_wbint_GroupMember(struct ndr_push *ndr, int ndr_flags, const struct wbint_GroupMember *r);
-enum ndr_err_code ndr_pull_wbint_GroupMember(struct ndr_pull *ndr, int ndr_flags, struct wbint_GroupMember *r);
-void ndr_print_wbint_GroupMember(struct ndr_print *ndr, const char *name, const struct wbint_GroupMember *r);
+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);
diff --git a/source3/librpc/gen_ndr/wbint.h b/source3/librpc/gen_ndr/wbint.h
index 7ed1fb2753..825b7e4068 100644
--- a/source3/librpc/gen_ndr/wbint.h
+++ b/source3/librpc/gen_ndr/wbint.h
@@ -28,15 +28,15 @@ struct wbint_RidArray {
uint32_t *rids;/* [size_is(num_rids)] */
}/* [public] */;
-struct wbint_GroupMember {
+struct wbint_Principal {
struct dom_sid sid;
- const char *name;/* [unique,charset(UTF8)] */
enum lsa_SidType type;
+ const char *name;/* [unique,charset(UTF8)] */
}/* [public] */;
struct wbint_GroupMembers {
int32_t num_members;
- struct wbint_GroupMember *members;/* [size_is(num_members)] */
+ struct wbint_Principal *members;/* [size_is(num_members)] */
}/* [public] */;
diff --git a/source3/librpc/idl/wbint.idl b/source3/librpc/idl/wbint.idl
index b7a1ce37ad..613b12a88f 100644
--- a/source3/librpc/idl/wbint.idl
+++ b/source3/librpc/idl/wbint.idl
@@ -95,13 +95,13 @@ interface wbint
typedef [public] struct {
dom_sid sid;
- [string,charset(UTF8)] char *name;
lsa_SidType type;
- } wbint_GroupMember;
+ [string,charset(UTF8)] char *name;
+ } wbint_Principal;
typedef [public] struct {
int num_members;
- [size_is(num_members)] wbint_GroupMember members[];
+ [size_is(num_members)] wbint_Principal members[];
} wbint_GroupMembers;
NTSTATUS wbint_LookupGroupMembers(
diff --git a/source3/winbindd/wb_group_members.c b/source3/winbindd/wb_group_members.c
index f37641bd0d..57c3707b5d 100644
--- a/source3/winbindd/wb_group_members.c
+++ b/source3/winbindd/wb_group_members.c
@@ -100,7 +100,7 @@ static void wb_lookupgroupmem_done(struct tevent_req *subreq)
static NTSTATUS wb_lookupgroupmem_recv(struct tevent_req *req,
TALLOC_CTX *mem_ctx,
int *num_members,
- struct wbint_GroupMember **members)
+ struct wbint_Principal **members)
{
struct wb_lookupgroupmem_state *state = tevent_req_data(
req, struct wb_lookupgroupmem_state);
@@ -121,10 +121,10 @@ static NTSTATUS wb_lookupgroupmem_recv(struct tevent_req *req,
struct wb_groups_members_state {
struct tevent_context *ev;
- struct wbint_GroupMember *groups;
+ struct wbint_Principal *groups;
int num_groups;
int next_group;
- struct wbint_GroupMember *all_members;
+ struct wbint_Principal *all_members;
};
static NTSTATUS wb_groups_members_next_subreq(
@@ -135,7 +135,7 @@ static void wb_groups_members_done(struct tevent_req *subreq);
static struct tevent_req *wb_groups_members_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
int num_groups,
- struct wbint_GroupMember *groups)
+ struct wbint_Principal *groups)
{
struct tevent_req *req, *subreq;
struct wb_groups_members_state *state;
@@ -170,7 +170,7 @@ static NTSTATUS wb_groups_members_next_subreq(
TALLOC_CTX *mem_ctx, struct tevent_req **psubreq)
{
struct tevent_req *subreq;
- struct wbint_GroupMember *g;
+ struct wbint_Principal *g;
if (state->next_group >= state->num_groups) {
*psubreq = NULL;
@@ -180,8 +180,7 @@ static NTSTATUS wb_groups_members_next_subreq(
g = &state->groups[state->next_group];
state->next_group += 1;
- subreq = wb_lookupgroupmem_send(mem_ctx, state->ev, &g->sid,
- g->type);
+ subreq = wb_lookupgroupmem_send(mem_ctx, state->ev, &g->sid, g->type);
if (subreq == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -197,7 +196,7 @@ static void wb_groups_members_done(struct tevent_req *subreq)
req, struct wb_groups_members_state);
int i, num_all_members;
int num_members = 0;
- struct wbint_GroupMember *members = NULL;
+ struct wbint_Principal *members = NULL;
NTSTATUS status;
status = wb_lookupgroupmem_recv(subreq, state, &num_members,
@@ -217,14 +216,14 @@ static void wb_groups_members_done(struct tevent_req *subreq)
num_all_members = talloc_array_length(state->all_members);
state->all_members = talloc_realloc(
- state, state->all_members, struct wbint_GroupMember,
+ state, state->all_members, struct wbint_Principal,
num_all_members + num_members);
if ((num_all_members + num_members != 0)
&& tevent_req_nomem(state->all_members, req)) {
return;
}
for (i=0; i<num_members; i++) {
- struct wbint_GroupMember *src, *dst;
+ struct wbint_Principal *src, *dst;
src = &members[i];
dst = &state->all_members[num_all_members + i];
sid_copy(&dst->sid, &src->sid);
@@ -248,7 +247,7 @@ static void wb_groups_members_done(struct tevent_req *subreq)
static NTSTATUS wb_groups_members_recv(struct tevent_req *req,
TALLOC_CTX *mem_ctx,
int *num_members,
- struct wbint_GroupMember **members)
+ struct wbint_Principal **members)
{
struct wb_groups_members_state *state = tevent_req_data(
req, struct wb_groups_members_state);
@@ -273,7 +272,7 @@ struct wb_group_members_state {
struct tevent_context *ev;
int depth;
struct talloc_dict *users;
- struct wbint_GroupMember *groups;
+ struct wbint_Principal *groups;
};
static NTSTATUS wb_group_members_next_subreq(
@@ -303,7 +302,7 @@ struct tevent_req *wb_group_members_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
- state->groups = talloc(state, struct wbint_GroupMember);
+ state->groups = talloc(state, struct wbint_Principal);
if (tevent_req_nomem(state->groups, req)) {
return tevent_req_post(req, ev);
}
@@ -355,7 +354,7 @@ static void wb_group_members_done(struct tevent_req *subreq)
req, struct wb_group_members_state);
int i, num_groups, new_users, new_groups;
int num_members = 0;
- struct wbint_GroupMember *members = NULL;
+ struct wbint_Principal *members = NULL;
NTSTATUS status;
status = wb_groups_members_recv(subreq, state, &num_members, &members);
@@ -381,7 +380,7 @@ static void wb_group_members_done(struct tevent_req *subreq)
num_groups = 0;
TALLOC_FREE(state->groups);
- state->groups = talloc_array(state, struct wbint_GroupMember,
+ state->groups = talloc_array(state, struct wbint_Principal,
new_groups);
/*
@@ -396,11 +395,11 @@ static void wb_group_members_done(struct tevent_req *subreq)
/*
* Add a copy of members[i] to state->users
*/
- struct wbint_GroupMember *m;
+ struct wbint_Principal *m;
struct dom_sid *sid;
DATA_BLOB key;
- m = talloc(talloc_tos(), struct wbint_GroupMember);
+ m = talloc(talloc_tos(), struct wbint_Principal);
if (tevent_req_nomem(m, req)) {
return;
}
@@ -421,7 +420,7 @@ static void wb_group_members_done(struct tevent_req *subreq)
case SID_NAME_DOM_GRP:
case SID_NAME_ALIAS:
case SID_NAME_WKN_GRP: {
- struct wbint_GroupMember *g;
+ struct wbint_Principal *g;
/*
* Save members[i] for the next round
*/
diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
index 6e69cce86d..f0c9690837 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -181,13 +181,13 @@ NTSTATUS _wbint_LookupGroupMembers(pipes_struct *p,
r->out.members->num_members = num_names;
r->out.members->members = talloc_array(
- r->out.members, struct wbint_GroupMember, num_names);
+ r->out.members, struct wbint_Principal, num_names);
if (r->out.members->members == NULL) {
return NT_STATUS_NO_MEMORY;
}
for (i=0; i<num_names; i++) {
- struct wbint_GroupMember *m = &r->out.members->members[i];
+ struct wbint_Principal *m = &r->out.members->members[i];
sid_copy(&m->sid, &sid_mem[i]);
m->name = talloc_move(r->out.members->members, &names[i]);
m->type = (enum lsa_SidType)name_types[i];
diff --git a/source3/winbindd/winbindd_group.c b/source3/winbindd/winbindd_group.c
index 16defc793d..e914f0e753 100644
--- a/source3/winbindd/winbindd_group.c
+++ b/source3/winbindd/winbindd_group.c
@@ -1391,8 +1391,8 @@ struct getgr_countmem {
static int getgr_calc_memberlen(DATA_BLOB key, void *data, void *priv)
{
- struct wbint_GroupMember *m = talloc_get_type_abort(
- data, struct wbint_GroupMember);
+ struct wbint_Principal *m = talloc_get_type_abort(
+ data, struct wbint_Principal);
struct getgr_countmem *buf = (struct getgr_countmem *)priv;
buf->num += 1;
@@ -1407,8 +1407,8 @@ struct getgr_stringmem {
static int getgr_unparse_members(DATA_BLOB key, void *data, void *priv)
{
- struct wbint_GroupMember *m = talloc_get_type_abort(
- data, struct wbint_GroupMember);
+ struct wbint_Principal *m = talloc_get_type_abort(
+ data, struct wbint_Principal);
struct getgr_stringmem *buf = (struct getgr_stringmem *)priv;
int len;