diff options
author | Volker Lendecke <vlendec@samba.org> | 2003-07-13 09:38:55 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2003-07-13 09:38:55 +0000 |
commit | e9681cc65897b466675e40f2fcf13a65a92d0435 (patch) | |
tree | 085567f04eeffb146c48e0dfc7fa21a94dd67ad6 | |
parent | 9c15a65dc30894bae29dfea3af29beb5caf35883 (diff) | |
download | samba-e9681cc65897b466675e40f2fcf13a65a92d0435.tar.gz samba-e9681cc65897b466675e40f2fcf13a65a92d0435.tar.bz2 samba-e9681cc65897b466675e40f2fcf13a65a92d0435.zip |
We have an API to compare the domain parts of two SIDs, so use it.
Volker
(This used to be commit 39308ff138da88c1a4c0958cd4c7a9090261d3d5)
-rw-r--r-- | source3/passdb/passdb.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index ae52b3d4f1..d974cdf576 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -1089,22 +1089,17 @@ DOM_SID *local_uid_to_sid(DOM_SID *psid, uid_t uid) BOOL local_sid_to_uid(uid_t *puid, const DOM_SID *psid, enum SID_NAME_USE *name_type) { - DOM_SID dom_sid; - uint32 rid; SAM_ACCOUNT *sampw = NULL; struct passwd *unix_pw; const char *user_name; *name_type = SID_NAME_UNKNOWN; - sid_copy(&dom_sid, psid); - sid_split_rid(&dom_sid, &rid); - /* * We can only convert to a uid if this is our local * Domain SID (ie. we are the controling authority). */ - if ( !sid_equal(get_global_sam_sid(), &dom_sid) ) + if ( !sid_compare_domain(get_global_sam_sid(), psid) ) return False; |