diff options
author | Michael Adam <obnox@samba.org> | 2012-12-03 08:34:43 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-12-03 08:48:31 +0100 |
commit | 93c0c0749a2c3cbb1bc85e18b7dd77989a3eada8 (patch) | |
tree | 4f519fdab09471dc8c516366f140ab3fcdc1d629 /source3/passdb | |
parent | 5fbdc5f35a122ff040c6120e2aa2cf5485e32097 (diff) | |
download | samba-93c0c0749a2c3cbb1bc85e18b7dd77989a3eada8.tar.gz samba-93c0c0749a2c3cbb1bc85e18b7dd77989a3eada8.tar.bz2 samba-93c0c0749a2c3cbb1bc85e18b7dd77989a3eada8.zip |
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 <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/passdb')
-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; } |