From b296acb27dfa1167c755433877e4d99194bd9204 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 21 Mar 2007 17:59:29 +0000 Subject: r21915: grab the sid_peek_check_rid() fix from 3.0.25 and the release notes --- WHATSNEW.txt | 2 ++ source/nsswitch/winbindd_util.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 9c6bccc33d7..a7f02cbf7f0 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -82,6 +82,8 @@ smb.conf changes Parameter Name Description Default -------------- ----------- ------- debug prefix timestamp New No + idmap cache time Renamed 900 + idmap negative cache time Renamed 120 lock spin count Removed n/a diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c index 72c85a9c6a4..cbd76754bbd 100644 --- a/source/nsswitch/winbindd_util.c +++ b/source/nsswitch/winbindd_util.c @@ -603,8 +603,13 @@ struct winbindd_domain *find_domain_from_sid_noinit(const DOM_SID *sid) /* 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)) { return domain; + } } /* Not found */ -- cgit