winbindd_group: sanely handle NULL domain in add_member().
authorMichael Adam <obnox@samba.org>
Sun, 21 Sep 2008 00:06:44 +0000 (02:06 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 21 Nov 2008 23:31:00 +0000 (00:31 +0100)
Michael

source/winbindd/winbindd_group.c

index 897795ae46e4ab32cc0c3bc20028758dbef5948c..8c32e336a0ac5160b7a22d61bc21dd14aedad7ca 100644 (file)
@@ -35,7 +35,11 @@ static void add_member(const char *domain, const char *user,
 {
        fstring name;
 
-       fill_domain_username(name, domain, user, True);
+       if (domain != NULL) {
+               fill_domain_username(name, domain, user, True);
+       } else {
+               fstrcpy(name, user);
+       }
        safe_strcat(name, ",", sizeof(name)-1);
        string_append(pp_members, name);
        *p_num_members += 1;