diff options
Diffstat (limited to 'source3/passdb/lookup_sid.c')
-rw-r--r-- | source3/passdb/lookup_sid.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index e48420dc5c..6ec6ce8e47 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; } |