summaryrefslogtreecommitdiff
path: root/source3/nsswitch/libwbclient
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2008-07-17 09:23:30 -0700
committerJeremy Allison <jra@samba.org>2008-07-17 09:38:08 -0700
commita935b1b6d61a05595cf126fbb51b4363026e56a5 (patch)
tree9656e49f0a580e48759c27b7c6106a3b444e112d /source3/nsswitch/libwbclient
parent41b4637a8426665ae6968380eb6c305017896a5d (diff)
downloadsamba-a935b1b6d61a05595cf126fbb51b4363026e56a5.tar.gz
samba-a935b1b6d61a05595cf126fbb51b4363026e56a5.tar.bz2
samba-a935b1b6d61a05595cf126fbb51b4363026e56a5.zip
allow SID with 0 in subauthority to be converted properly
from string representation. (This used to be commit 23f338d1da96fd4ea3283bc96ca7d496b23bf854)
Diffstat (limited to 'source3/nsswitch/libwbclient')
-rw-r--r--source3/nsswitch/libwbclient/wbc_sid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/nsswitch/libwbclient/wbc_sid.c b/source3/nsswitch/libwbclient/wbc_sid.c
index f3d58960f2..475c9947e0 100644
--- a/source3/nsswitch/libwbclient/wbc_sid.c
+++ b/source3/nsswitch/libwbclient/wbc_sid.c
@@ -139,7 +139,8 @@ wbcErr wbcStringToSid(const char *str,
p = q +1;
sid->num_auths = 0;
while (sid->num_auths < WBC_MAXSUBAUTHS) {
- if ((x=(uint32_t)strtoul(p, &q, 10)) == 0)
+ x=(uint32_t)strtoul(p, &q, 10);
+ if (p == q)
break;
if (q == NULL) {
wbc_status = WBC_ERR_INVALID_SID;