r5058: Due to the fragileness how windows reacts on unmapped sids sometimes,
authorGünther Deschner <gd@samba.org>
Fri, 28 Jan 2005 17:05:55 +0000 (17:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:55:13 +0000 (10:55 -0500)
don't leave administator-sid unmapped. Simply return "Administrator"

Guenther
(This used to be commit 168ddf31d1af49d52d17dd09c9653d3deafb9442)

source3/passdb/passdb.c

index 9d56cc29c8b20d772faa19efd9f039a7ab7ad9af..815b7f95f0f75431dff11b7d2f729890510573ed 100644 (file)
@@ -794,6 +794,12 @@ BOOL local_lookup_sid(const DOM_SID *sid, char *name, enum SID_NAME_USE *psid_na
                return True;
        }
 
+       if (rid == DOMAIN_USER_RID_ADMIN) {
+               *psid_name_use = SID_NAME_USER;
+               fstrcpy(name, "Administrator");
+               return True;
+       }
+
        if (algorithmic_pdb_rid_is_user(rid)) {
                uid_t uid;
                struct passwd *pw = NULL;