summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/passdb.c18
-rw-r--r--source3/passdb/util_sam_sid.c2
2 files changed, 10 insertions, 10 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 8313a259bd..75f8171a25 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -814,13 +814,13 @@ BOOL local_lookup_sid(const DOM_SID *sid, char *name, enum SID_NAME_USE *psid_na
BOOL local_lookup_name(const char *c_user, DOM_SID *psid, enum SID_NAME_USE *psid_name_use)
{
- extern DOM_SID global_sid_World_Domain;
DOM_SID local_sid;
+ DOM_SID sid;
fstring user;
SAM_ACCOUNT *sam_account = NULL;
struct group *grp;
GROUP_MAP map;
-
+
*psid_name_use = SID_NAME_UNKNOWN;
/*
@@ -832,14 +832,12 @@ BOOL local_lookup_name(const char *c_user, DOM_SID *psid, enum SID_NAME_USE *psi
sid_copy(&local_sid, get_global_sam_sid());
- /*
- * Special case for MACHINE\Everyone. Map to the world_sid.
- */
-
- if(strequal(user, "Everyone")) {
- sid_copy( psid, &global_sid_World_Domain);
- sid_append_rid(psid, 0);
- *psid_name_use = SID_NAME_ALIAS;
+ if (map_name_to_wellknown_sid(&sid, psid_name_use, user)){
+ fstring sid_str;
+ sid_copy( psid, &sid);
+ sid_to_string(sid_str, &sid);
+ DEBUG(10,("lookup_name: name %s = SID %s, type = %u\n", user, sid_str,
+ (unsigned int)*psid_name_use ));
return True;
}
diff --git a/source3/passdb/util_sam_sid.c b/source3/passdb/util_sam_sid.c
index 45ffe2460b..c13159e47f 100644
--- a/source3/passdb/util_sam_sid.c
+++ b/source3/passdb/util_sam_sid.c
@@ -294,6 +294,8 @@ BOOL map_name_to_wellknown_sid(DOM_SID *sid, enum SID_NAME_USE *use, const char
if (!sid_name_map_initialized)
init_sid_name_map();
+ DEBUG(10,("map_name_to_wellknown_sid: looking up %s\n", name));
+
for (i=0; sid_name_map[i].sid != NULL; i++) {
const known_sid_users *users = sid_name_map[i].known_users;