As noted by Metzy, it makes no sense here to check id->sid.
What is worse, this might even be passed in uninitialized.
This still fixes the bug for me (of course), but we might need
to check, if another special handling of passdb is needed
(possibly changing from constant return code NT_STATUS_OK...)
Michael
(cherry picked from commit
651b5d6deaab4fb3cb726fafd98171c79777631c)
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
3d22b77f1ac5e8f83d1063d87c68e60655a3ed6b)
maps[0] = id;
maps[1] = NULL;
- if (sid_check_is_in_builtin(id->sid)
- || (sid_check_is_in_our_domain(id->sid))) {
- dom = idmap_init_passdb_domain(NULL);
- if (dom == NULL) {
- return NT_STATUS_NONE_MAPPED;
- }
- return dom->methods->unixids_to_sids(dom, maps);
- }
-
dom = idmap_find_domain(domname);
if (dom == NULL) {
return NT_STATUS_NONE_MAPPED;