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)
committerHerb Lewis <herb@samba.org>
Thu, 17 Jul 2008 16:23:30 +0000 (09:23 -0700)
from string representation.

source/nsswitch/libwbclient/wbc_sid.c

index b0909263fcb6bc3661948ba869835e3678f51e94..4bfd62caecf1ef12a81956c8dc6a6e5d30cd2976 100644 (file)
@@ -140,7 +140,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;
                sid->sub_auths[sid->num_auths++] = x;