git.samba.org
/
kai
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8686d47
)
wbinfo: use wbcGetgrnam()
author
Stefan Metzmacher
<metze@samba.org>
Mon, 24 Mar 2008 19:44:34 +0000
(20:44 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Fri, 28 Mar 2008 14:11:42 +0000
(15:11 +0100)
metze
(This used to be commit
8945dce4a18874bdf1a57f1ff8116a66a6f699a0
)
source3/nsswitch/wbinfo.c
patch
|
blob
|
history
diff --git
a/source3/nsswitch/wbinfo.c
b/source3/nsswitch/wbinfo.c
index f8d77cec60e30a46ed48e95113f8180fd7f8fb45..fad13d292b99604567c646ab5ace0dba5238db3f 100644
(file)
--- a/
source3/nsswitch/wbinfo.c
+++ b/
source3/nsswitch/wbinfo.c
@@
-174,29
+174,22
@@
static bool wbinfo_get_uidinfo(int uid)
}
/* pull grent for a given group */
}
/* pull grent for a given group */
-static bool wbinfo_get_groupinfo(char *group)
+static bool wbinfo_get_groupinfo(c
onst c
har *group)
{
{
- struct winbindd_request request;
- struct winbindd_response response;
- NSS_STATUS result;
-
- ZERO_STRUCT(request);
- ZERO_STRUCT(response);
-
- /* Send request */
-
- fstrcpy(request.data.groupname, group);
-
- result = winbindd_request_response(WINBINDD_GETGRNAM, &request,
- &response);
+ wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
+ struct group *grp;
- if ( result != NSS_STATUS_SUCCESS)
+ wbc_status = wbcGetgrnam(group, &grp);
+ if (!WBC_ERROR_IS_OK(wbc_status)) {
return false;
return false;
+ }
+
+ d_printf("%s:%s:%d\n",
+ grp->gr_name,
+ grp->gr_passwd,
+ grp->gr_gid);
- d_printf( "%s:%s:%d\n",
- response.data.gr.gr_name,
- response.data.gr.gr_passwd,
- response.data.gr.gr_gid );
+ wbcFreeMemory(grp);
return true;
}
return true;
}