summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-07-13 09:43:58 +0000
committerVolker Lendecke <vlendec@samba.org>2003-07-13 09:43:58 +0000
commit9bcc3886d08c8a506c69c866c7ba4cdfb84a8bdd (patch)
treec49b2610800be03cee6d0dcd18eab276816ae6e7 /source3/passdb
parente9681cc65897b466675e40f2fcf13a65a92d0435 (diff)
downloadsamba-9bcc3886d08c8a506c69c866c7ba4cdfb84a8bdd.tar.gz
samba-9bcc3886d08c8a506c69c866c7ba4cdfb84a8bdd.tar.bz2
samba-9bcc3886d08c8a506c69c866c7ba4cdfb84a8bdd.zip
Argl. Thinking twice and looking at the rest of callers of sid_compare_domain
proved the last patch wrong. Sorry. Volker (This used to be commit d8695eccc7acdee69ca0d0593b56a417f1f89167)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/passdb.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index d974cdf576..ae52b3d4f1 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -1089,17 +1089,22 @@ 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_compare_domain(get_global_sam_sid(), psid) )
+ if ( !sid_equal(get_global_sam_sid(), &dom_sid) )
return False;