summaryrefslogtreecommitdiffstats
path: root/source/passdb/pdb_unix.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/passdb/pdb_unix.c
parent7c035d473c7175163ad5db0373ed2fe6c739b968 (diff)
downloadsamba-04f9a8ff4c7982f6597c0f6748f85d66d4784901.tar.gz
samba-04f9a8ff4c7982f6597c0f6748f85d66d4784901.tar.xz
samba-04f9a8ff4c7982f6597c0f6748f85d66d4784901.zip
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/passdb/pdb_unix.c')
-rw-r--r--source/passdb/pdb_unix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/passdb/pdb_unix.c b/source/passdb/pdb_unix.c
index 85ff5bd9338..b4092b88f8a 100644
--- a/source/passdb/pdb_unix.c
+++ b/source/passdb/pdb_unix.c
@@ -68,7 +68,8 @@ static BOOL unixsam_getsampwrid (struct pdb_methods *methods,
static BOOL unixsam_getsampwsid(struct pdb_methods *my_methods, SAM_ACCOUNT * user, DOM_SID *sid)
{
uint32 rid;
- sid_peek_rid(sid, &rid);
+ if (!sid_peek_check_rid(get_global_sam_sid(), sid, &rid))
+ return False;
return unixsam_getsampwrid(my_methods, user, rid);
}