summaryrefslogtreecommitdiff
path: root/source/nsswitch/winbindd_cache.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-06-13 14:06:08 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-06-13 14:06:08 +0000
commit04f9a8ff4c7982f6597c0f6748f85d66d4784901 (patch)
tree94aa07cea7fceab918def14f55ff25a22569f7cd /source/nsswitch/winbindd_cache.c
parent7c035d473c7175163ad5db0373ed2fe6c739b968 (diff)
downloadsamba-04f9a8ff4c7982f6597c0f6748f85d66d4784901.tar.gz
Latest patch from metze <metze@metzemix.de> to move most of samba across
to using SIDs instead of RIDs. The new funciton sid_peek_check_rid() takes an 'expected domain sid' argument. The idea here is to prevent mistakes where the SID is implict, but isn't the same one that we have in the struct. Andrew Bartlett
Diffstat (limited to 'source/nsswitch/winbindd_cache.c')
-rw-r--r--source/nsswitch/winbindd_cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c
index dcb93fa3b59..d9ed63baf8d 100644
--- a/source/nsswitch/winbindd_cache.c
+++ b/source/nsswitch/winbindd_cache.c
@@ -658,7 +658,8 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
NTSTATUS status;
uint32 rid = 0;
- sid_peek_rid(sid, &rid);
+ if (!sid_peek_check_rid(&domain->sid, sid, &rid))
+ return NT_STATUS_INVALID_PARAMETER;
if (!cache->tdb) goto do_query;