From 02e25b2a43ae02205a3412f862a1482d24b70aa4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 21 Aug 2012 14:56:45 +1000 Subject: s3-passdb: Allow pdb_sid_to_id to work on any SID This is needed so that pdb_samba4 can map any SID during a provision. At runtime, winbindd will be asked first, but this shortcut direct to the ldb file makes it possible to set the permissions on the sysvol share at provision time. Andrew Bartlett --- source3/passdb/lookup_sid.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'source3/passdb/lookup_sid.c') diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c index a2d793feb3..26ce41cc09 100644 --- a/source3/passdb/lookup_sid.c +++ b/source3/passdb/lookup_sid.c @@ -1084,20 +1084,16 @@ static void legacy_gid_to_sid(struct dom_sid *psid, gid_t gid) static bool legacy_sid_to_unixid(const struct dom_sid *psid, struct unixid *id) { GROUP_MAP *map; - if (sid_check_is_in_our_sam(psid)) { - bool ret; - - become_root(); - ret = pdb_sid_to_id(psid, id); - unbecome_root(); - - if (ret) { - goto done; - } - - /* This was ours, but it was not mapped. Fail */ + bool ret; + + become_root(); + ret = pdb_sid_to_id(psid, id); + unbecome_root(); + + if (ret) { + goto done; } - + if ((sid_check_is_in_builtin(psid) || sid_check_is_in_wellknown_domain(psid))) { bool ret; -- cgit