From: Herb Lewis Date: Thu, 17 Jul 2008 16:23:30 +0000 (-0700) Subject: allow SID with 0 in subauthority to be converted properly X-Git-Tag: samba-3.3.0pre1~523 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23f338d1da96fd4ea3283bc96ca7d496b23bf854;p=thirdparty%2Fsamba.git allow SID with 0 in subauthority to be converted properly from string representation. --- diff --git a/source/nsswitch/libwbclient/wbc_sid.c b/source/nsswitch/libwbclient/wbc_sid.c index f3d58960f2a..475c9947e00 100644 --- a/source/nsswitch/libwbclient/wbc_sid.c +++ b/source/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;