diff options
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 72c85a9c6a..b0529be4fb 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -599,12 +599,18 @@ struct winbindd_domain *find_domain_from_name(const char *domain_name) struct winbindd_domain *find_domain_from_sid_noinit(const DOM_SID *sid) { struct winbindd_domain *domain; + uint32 discard; /* Search through list */ for (domain = domain_list(); domain != NULL; domain = domain->next) { - if (sid_compare_domain(sid, &domain->sid) == 0) + /* We need to use sid_peek_check_rid, because we want + * to make sure that the SIDs we send to the backends are + * as specific as possible. + */ + if (sid_peek_check_rid(&domain->sid, sid, &discard) == 0) { return domain; + } } /* Not found */ |