summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_group.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-04-17 17:16:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:23 -0500
commita3fdf8ac21a8cbb95c336177a4d32c8c5dec09b7 (patch)
tree2d9d1f9d393030e3074f33ccfa82f208a310e1e2 /source3/nsswitch/winbindd_group.c
parent30832e95dc47acf70ab9f18e80d7a28e73e212c8 (diff)
downloadsamba-a3fdf8ac21a8cbb95c336177a4d32c8c5dec09b7.tar.gz
samba-a3fdf8ac21a8cbb95c336177a4d32c8c5dec09b7.tar.bz2
samba-a3fdf8ac21a8cbb95c336177a4d32c8c5dec09b7.zip
r15107: 64 bit fixes. size_t on a 64-bit box is not uint32.
Jeremy. (This used to be commit 634e0dc3c73968da8f1f50186ca15f8873f380ce)
Diffstat (limited to 'source3/nsswitch/winbindd_group.c')
-rw-r--r--source3/nsswitch/winbindd_group.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index 96308a31a7..7219292724 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -208,6 +208,7 @@ void winbindd_getgrnam(struct winbindd_cli_state *state)
fstring name_domain, name_group;
char *tmp, *gr_mem;
size_t gr_mem_len;
+ size_t num_gr_mem;
gid_t gid;
union unid_t id;
NTSTATUS status;
@@ -311,12 +312,14 @@ void winbindd_getgrnam(struct winbindd_cli_state *state)
if (!fill_grent(&state->response.data.gr, name_domain,
name_group, gid) ||
!fill_grent_mem(domain, &group_sid, name_type,
- &state->response.data.gr.num_gr_mem,
+ &num_gr_mem,
&gr_mem, &gr_mem_len)) {
request_error(state);
return;
}
+ state->response.data.gr.num_gr_mem = (uint32)num_gr_mem;
+
/* Group membership lives at start of extra data */
state->response.data.gr.gr_mem_ofs = 0;
@@ -336,6 +339,7 @@ void winbindd_getgrgid(struct winbindd_cli_state *state)
fstring dom_name;
fstring group_name;
size_t gr_mem_len;
+ size_t num_gr_mem;
char *gr_mem;
NTSTATUS status;
@@ -405,12 +409,14 @@ void winbindd_getgrgid(struct winbindd_cli_state *state)
if (!fill_grent(&state->response.data.gr, dom_name, group_name,
state->request.data.gid) ||
!fill_grent_mem(domain, &group_sid, name_type,
- &state->response.data.gr.num_gr_mem,
+ &num_gr_mem,
&gr_mem, &gr_mem_len)) {
request_error(state);
return;
}
+ state->response.data.gr.num_gr_mem = (uint32)num_gr_mem;
+
/* Group membership lives at start of extra data */
state->response.data.gr.gr_mem_ofs = 0;
@@ -756,6 +762,7 @@ void winbindd_getgrent(struct winbindd_cli_state *state)
/* Fill in group membership entry */
if (result) {
+ size_t num_gr_mem = 0;
DOM_SID member_sid;
group_list[group_list_ndx].num_gr_mem = 0;
gr_mem = NULL;
@@ -771,8 +778,10 @@ void winbindd_getgrent(struct winbindd_cli_state *state)
domain,
&member_sid,
SID_NAME_DOM_GRP,
- &group_list[group_list_ndx].num_gr_mem,
+ &num_gr_mem,
&gr_mem, &gr_mem_len);
+
+ group_list[group_list_ndx].num_gr_mem = (uint32)num_gr_mem;
}
}