Revert "libcli/security: Prohibit SID formats like S-1-5-32-+545"
authorVolker Lendecke <vl@samba.org>
Mon, 25 Jan 2010 11:39:47 +0000 (12:39 +0100)
committerVolker Lendecke <vl@samba.org>
Mon, 25 Jan 2010 11:40:51 +0000 (12:40 +0100)
This reverts commit 1fbeae41655b8305834f2149b1268077eba8633d.

Apparently this breaks the build of Samba4

libcli/security/dom_sid.c

index 8a2ed1fccc9862d4dbc93f589de9aa39243a98d6..6a046cd8061b5142f05d32c56fa69599abe777e1 100644 (file)
@@ -96,20 +96,12 @@ bool dom_sid_parse(const char *sidstr, struct dom_sid *ret)
 
        sidstr += 2;
 
-       if (!isdigit(sidstr[0])) {
-               return false;
-       }
-
        rev = strtoul(sidstr, &p, 10);
        if (*p != '-') {
                return false;
        }
        sidstr = p+1;
 
-       if (!isdigit(sidstr[0])) {
-               return false;
-       }
-
        ia = strtoul(sidstr, &p, 10);
        if (p == sidstr) {
                return false;
@@ -139,11 +131,6 @@ bool dom_sid_parse(const char *sidstr, struct dom_sid *ret)
                        return false;
                }
                sidstr++;
-
-               if (!isdigit(sidstr[0])) {
-                       return false;
-               }
-
                ret->sub_auths[i] = strtoul(sidstr, &p, 10);
                if (p == sidstr) {
                        return false;