summaryrefslogtreecommitdiff
path: root/nsswitch/libwbclient/wbc_pwd.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-04 05:44:23 +0100
committerVolker Lendecke <vl@samba.org>2011-03-05 14:29:32 +0100
commit7ffa7e4bcae0c4e55c91a7a4466eae596d982770 (patch)
treeba3b50af86e544654b696a25d26ac9f902e9bf67 /nsswitch/libwbclient/wbc_pwd.c
parentafb6752fa7903a63c2a1cef704bb9da9bab4b251 (diff)
downloadsamba-7ffa7e4bcae0c4e55c91a7a4466eae596d982770.tar.gz
samba-7ffa7e4bcae0c4e55c91a7a4466eae596d982770.tar.bz2
samba-7ffa7e4bcae0c4e55c91a7a4466eae596d982770.zip
libwbclient: Use wbcSidToStringBuf
Diffstat (limited to 'nsswitch/libwbclient/wbc_pwd.c')
-rw-r--r--nsswitch/libwbclient/wbc_pwd.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/nsswitch/libwbclient/wbc_pwd.c b/nsswitch/libwbclient/wbc_pwd.c
index abd03d7455..6df694dcac 100644
--- a/nsswitch/libwbclient/wbc_pwd.c
+++ b/nsswitch/libwbclient/wbc_pwd.c
@@ -236,22 +236,18 @@ wbcErr wbcGetpwsid(struct wbcDomainSid *sid, struct passwd **pwd)
wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
struct winbindd_request request;
struct winbindd_response response;
- char * sid_string = NULL;
if (!pwd) {
wbc_status = WBC_ERR_INVALID_PARAM;
BAIL_ON_WBC_ERROR(wbc_status);
}
- wbc_status = wbcSidToString(sid, &sid_string);
- BAIL_ON_WBC_ERROR(wbc_status);
-
/* Initialize request */
ZERO_STRUCT(request);
ZERO_STRUCT(response);
- strncpy(request.data.sid, sid_string, sizeof(request.data.sid));
+ wbcSidToStringBuf(sid, request.data.sid, sizeof(request.data.sid));
wbc_status = wbcRequestResponse(WINBINDD_GETPWSID,
&request,
@@ -262,7 +258,6 @@ wbcErr wbcGetpwsid(struct wbcDomainSid *sid, struct passwd **pwd)
BAIL_ON_PTR_ERROR(*pwd, wbc_status);
done:
- wbcFreeMemory(sid_string);
return wbc_status;
}