allow SID with 0 in subauthority to be converted properly
authorHerb Lewis <herb@samba.org>
Thu, 17 Jul 2008 16:23:30 +0000 (09:23 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 17 Jul 2008 16:38:08 +0000 (09:38 -0700)
from string representation.
(This used to be commit 23f338d1da96fd4ea3283bc96ca7d496b23bf854)

source3/nsswitch/libwbclient/wbc_sid.c

index f3d58960f2a0125620db18e40c814e07bd42f852..475c9947e0000368fed2a602644958d7ad69061f 100644 (file)
@@ -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;