summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2003-02-18 07:15:52 +0000
committerMartin Pool <mbp@samba.org>2003-02-18 07:15:52 +0000
commit185d858dd2161a42cc35d318415844561531f4a4 (patch)
tree3a3aec6f9b08cfcb68c1c6ff8e85135bc80e0ba3 /source3/nsswitch
parent188c5195ede9825f30845f4aab549390ac67887e (diff)
downloadsamba-185d858dd2161a42cc35d318415844561531f4a4.tar.gz
samba-185d858dd2161a42cc35d318415844561531f4a4.tar.bz2
samba-185d858dd2161a42cc35d318415844561531f4a4.zip
Check return code of string_to_sid. (Merge from HEAD)
(This used to be commit 606bb47f241d2916d039b38f48b50474a3e0dadc)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/wb_client.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/nsswitch/wb_client.c b/source3/nsswitch/wb_client.c
index 9ac1515d7d..62c9686960 100644
--- a/source3/nsswitch/wb_client.c
+++ b/source3/nsswitch/wb_client.c
@@ -56,7 +56,8 @@ BOOL winbind_lookup_name(const char *dom_name, const char *name, DOM_SID *sid,
if ((result = winbindd_request(WINBINDD_LOOKUPNAME, &request,
&response)) == NSS_STATUS_SUCCESS) {
- string_to_sid(sid, response.data.sid.sid);
+ if (!string_to_sid(sid, response.data.sid.sid))
+ return False;
*name_type = (enum SID_NAME_USE)response.data.sid.type;
}
@@ -158,7 +159,8 @@ BOOL winbind_uid_to_sid(DOM_SID *sid, uid_t uid)
/* Copy out result */
if (result == NSS_STATUS_SUCCESS) {
- string_to_sid(sid, response.data.sid.sid);
+ if (!string_to_sid(sid, response.data.sid.sid))
+ return False;
} else {
sid_copy(sid, &global_sid_NULL);
}
@@ -224,7 +226,8 @@ BOOL winbind_gid_to_sid(DOM_SID *sid, gid_t gid)
/* Copy out result */
if (result == NSS_STATUS_SUCCESS) {
- string_to_sid(sid, response.data.sid.sid);
+ if (!string_to_sid(sid, response.data.sid.sid))
+ return False;
} else {
sid_copy(sid, &global_sid_NULL);
}