From 93c0c0749a2c3cbb1bc85e18b7dd77989a3eada8 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 3 Dec 2012 08:34:43 +0100 Subject: [PATCH] s3:passdb: don't look into group mappings in legacy_sid_to_unixid() The backends (tdbsam and ldapsam) do this. Signed-off-by: Michael Adam Reviewed-by: Stefan Metzmacher --- source3/passdb/lookup_sid.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index e48420dc5c3..6ec6ce8e47e 100644 --- a/source3/passdb/lookup_sid.c +++ b/source3/passdb/lookup_sid.c @@ -1083,45 +1083,18 @@ static void legacy_gid_to_sid(struct dom_sid *psid, gid_t gid) static bool legacy_sid_to_unixid(const struct dom_sid *psid, struct unixid *id) { - GROUP_MAP *map; bool ret; become_root(); ret = pdb_sid_to_id(psid, id); unbecome_root(); - if (ret) { - goto done; - } - - if ((sid_check_is_in_builtin(psid) || - sid_check_is_in_wellknown_domain(psid))) { - map = talloc_zero(NULL, GROUP_MAP); - if (!map) { - return false; - } - - become_root(); - ret = pdb_getgrsid(map, *psid); - unbecome_root(); - - if (ret) { - id->id = map->gid; - id->type = ID_TYPE_GID; - TALLOC_FREE(map); - goto done; - } - TALLOC_FREE(map); + if (!ret) { DEBUG(10,("LEGACY: mapping failed for sid %s\n", sid_string_dbg(psid))); return false; } - DEBUG(10,("LEGACY: mapping failed for sid %s\n", - sid_string_dbg(psid))); - return false; - -done: return true; } -- 2.11.4.GIT