summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_user.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-05-14 03:58:49 +0000
committerTim Potter <tpot@samba.org>2001-05-14 03:58:49 +0000
commit5bcd434e6e1e5c5ab4d567e2a4c2bdaf4806ff1f (patch)
treeabed68c8e4fc26fb2f95f384313f7270e7d573b6 /source3/nsswitch/winbindd_user.c
parentc24bf6d8ab293ec449659ea6b128a246f0dcb281 (diff)
downloadsamba-5bcd434e6e1e5c5ab4d567e2a4c2bdaf4806ff1f.tar.gz
samba-5bcd434e6e1e5c5ab4d567e2a4c2bdaf4806ff1f.tar.bz2
samba-5bcd434e6e1e5c5ab4d567e2a4c2bdaf4806ff1f.zip
Compile fixes for dynamic samr_query_userinfo() stuff.
(This used to be commit a92a0d061bd322b9d3a1fe13c6ce2d2e1f070ef7)
Diffstat (limited to 'source3/nsswitch/winbindd_user.c')
-rw-r--r--source3/nsswitch/winbindd_user.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/source3/nsswitch/winbindd_user.c b/source3/nsswitch/winbindd_user.c
index 43227b9dc1..30416e76d7 100644
--- a/source3/nsswitch/winbindd_user.c
+++ b/source3/nsswitch/winbindd_user.c
@@ -95,7 +95,7 @@ enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state
*state)
{
uint32 name_type, user_rid, group_rid;
- SAM_USERINFO_CTR user_info;
+ SAM_USERINFO_CTR *user_info;
DOM_SID user_sid;
fstring name_domain, name_user, name, gecos_name;
struct winbindd_domain *domain;
@@ -157,20 +157,16 @@ enum winbindd_result winbindd_getpwnam_from_user(struct winbindd_cli_state
/* The following costs 3 packets */
- ZERO_STRUCT(user_info);
-
if (!winbindd_lookup_userinfo(domain, user_rid, &user_info)) {
DEBUG(1, ("pwnam_from_user(): error getting user info for "
"user '%s'\n", name_user));
return WINBINDD_ERROR;
}
- group_rid = user_info.info.id21->group_rid;
- unistr2_to_ascii(gecos_name, &user_info.info.id21->uni_full_name,
+ group_rid = user_info->info.id21->group_rid;
+ unistr2_to_ascii(gecos_name, &user_info->info.id21->uni_full_name,
sizeof(gecos_name) - 1);
- wb_free_samr_userinfo_ctr(&user_info);
-
/* Now take all this information and fill in a passwd structure */
if (!winbindd_fill_pwent(domain->name, state->request.data.username,
@@ -195,7 +191,7 @@ enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state
uint32 user_rid, group_rid;
fstring user_name, gecos_name;
enum SID_NAME_USE name_type;
- SAM_USERINFO_CTR user_info;
+ SAM_USERINFO_CTR *user_info;
gid_t gid;
/* Bug out if the uid isn't in the winbind range */
@@ -255,12 +251,10 @@ enum winbindd_result winbindd_getpwnam_from_uid(struct winbindd_cli_state
return WINBINDD_ERROR;
}
- group_rid = user_info.info.id21->group_rid;
- unistr2_to_ascii(gecos_name, &user_info.info.id21->uni_full_name,
+ group_rid = user_info->info.id21->group_rid;
+ unistr2_to_ascii(gecos_name, &user_info->info.id21->uni_full_name,
sizeof(gecos_name) - 1);
- wb_free_samr_userinfo_ctr(&user_info);
-
/* Resolve gid number */
if (!winbindd_idmap_get_gid_from_rid(domain->name, group_rid, &gid)) {