summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_util.c
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-03-20 00:13:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:43 -0500
commitb4f19aea18fd6406c56b00c1410ef842720ca4d2 (patch)
tree6373c093892dbdb94a62be5ab484df0eb8b74bb3 /source3/nsswitch/winbindd_util.c
parent7ccf45684a1f83d7d48a4227aa56c53081d68283 (diff)
downloadsamba-b4f19aea18fd6406c56b00c1410ef842720ca4d2.tar.gz
samba-b4f19aea18fd6406c56b00c1410ef842720ca4d2.tar.bz2
samba-b4f19aea18fd6406c56b00c1410ef842720ca4d2.zip
r21881: Make sure we are very specific when testing whether a backand can handle a
particular SID. Make sure that the passdb backend will accept the same set range of local SIDs that the idmap system sends it. Simo, Jerry - this is a 3_0_25 candidate. Can you please review? (This used to be commit 86a70adb6a2d277f235857451bbee7d530d15310)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r--source3/nsswitch/winbindd_util.c8
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 */