diff options
Diffstat (limited to 'source3/winbindd/idmap.c')
-rw-r--r-- | source3/winbindd/idmap.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c index 07295e757a..065b7e67db 100644 --- a/source3/winbindd/idmap.c +++ b/source3/winbindd/idmap.c @@ -422,6 +422,22 @@ struct idmap_domain *idmap_find_domain(const char *domname) return result; } +struct idmap_domain *idmap_find_domain_with_sid(const char *domname, + const struct dom_sid *sid) +{ + idmap_init(); + + if (sid_check_is_in_builtin(sid) || + sid_check_is_builtin(sid) || + sid_check_is_in_our_sam(sid) || + sid_check_is_our_sam(sid)) + { + return idmap_passdb_domain(NULL); + } + + return idmap_find_domain(domname); +} + void idmap_close(void) { TALLOC_FREE(default_idmap_domain); |