From 31b806b5df0f2aeb7776c6b964a3b7e9acacf611 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 10 Apr 2005 14:20:29 +0000 Subject: [PATCH] r6273: Remove some unused code, minor cleanup (This used to be commit b451434e378e52e8ab6b932d7b26657ea9d0353c) --- source3/nsswitch/winbindd_group.c | 7 +-- source3/nsswitch/winbindd_util.c | 8 +-- source3/sam/idmap_util.c | 103 -------------------------------------- 3 files changed, 3 insertions(+), 115 deletions(-) diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index 9c81aef4477..f0d3bc43ea6 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -924,7 +924,6 @@ static BOOL enum_alias_memberships(const DOM_SID *member_sid, DOM_SID **aliases, int *num_aliases) { TALLOC_CTX *mem_ctx = talloc_init("enum_alias_memberships"); - DOM_SID builtin_sid; uint32 *rids = NULL; int i, num_rids = 0; @@ -948,15 +947,13 @@ static BOOL enum_alias_memberships(const DOM_SID *member_sid, add_sid_to_array(NULL, &alias_sid, aliases, num_aliases); } - string_to_sid(&builtin_sid, "S-1-5-32"); - - if (!pdb_enum_alias_memberships(mem_ctx, &builtin_sid, + if (!pdb_enum_alias_memberships(mem_ctx, &global_sid_Builtin, member_sid, 1, &rids, &num_rids)) goto done; for (i=0; ipw_uid; - sid_copy(&sid, get_global_sam_sid()); - sid_append_rid(&sid, DOMAIN_USER_RID_GUEST); - - if (!NT_STATUS_IS_OK(wellknown_id_init(&sid, id, ID_USERID))) { - DEBUG(0, ("Failed to setup UID mapping for GUEST (%s) to (%u)\n", - sid_to_string(sid_string, &sid), (unsigned int)id.uid)); - passwd_free(&pass); - return False; - } - - /* check if DOMAIN_GROUP_RID_GUESTS SID is set, if not store the - * guest account gid as mapping */ - id.gid = pass->pw_gid; - sid_copy(&sid, get_global_sam_sid()); - sid_append_rid(&sid, DOMAIN_GROUP_RID_GUESTS); - if (!NT_STATUS_IS_OK(wellknown_id_init(&sid, id, ID_GROUPID))) { - DEBUG(0, ("Failed to setup GID mapping for Group DOMAIN GUESTS (%s) to (%u)\n", - sid_to_string(sid_string, &sid), (unsigned int)id.gid)); - passwd_free(&pass); - return False; - } - - passwd_free(&pass); - /* now fill in group mappings */ - if(pdb_enum_group_mapping(SID_NAME_UNKNOWN, &map, &num_entries, ENUM_ONLY_MAPPED)) { - int i; - - for (i = 0; i < num_entries; i++) { - id.gid = map[i].gid; - wellknown_id_init(&map[i].sid, id, ID_GROUPID); - } - SAFE_FREE(map); - } - - /* Fill in the SID for the administrator account. */ - id.uid = 0; - sid_copy(&sid, get_global_sam_sid()); - sid_append_rid(&sid, DOMAIN_USER_RID_ADMIN); - - if (!NT_STATUS_IS_OK(wellknown_id_init(&sid, id, ID_USERID))) { - DEBUG(0, ("Failed to setup UID mapping for ADMINISTRATOR (%s) to (%u)\n", - sid_to_string(sid_string, &sid), (unsigned int)id.uid)); - return False; - } - - return True; -} -- 2.11.4.GIT