add_initial_entry should fail if string_to_sid fails.
authorMartin Pool <mbp@samba.org>
Tue, 18 Feb 2003 01:05:56 +0000 (01:05 +0000)
committerMartin Pool <mbp@samba.org>
Tue, 18 Feb 2003 01:05:56 +0000 (01:05 +0000)
(This used to be commit bb095dc28d8369457286225ac63e03070889f394)

source3/groupdb/mapping.c

index 3809abc37a9dc903d2c083c5c3bfcaa29260f8f9..272783608c52b49c0c96ebb4cbd6f8ac3e925c42 100644 (file)
@@ -304,7 +304,11 @@ BOOL add_initial_entry(gid_t gid, const char *sid, enum SID_NAME_USE sid_name_us
        }
        
        map.gid=gid;
-       string_to_sid(&map.sid, sid);
+       if (!string_to_sid(&map.sid, sid)) {
+               DEBUG(0, ("string_to_sid failed: %s", sid));
+               return False;
+       }
+       
        map.sid_name_use=sid_name_use;
        fstrcpy(map.nt_name, nt_name);
        fstrcpy(map.comment, comment);