diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2015-08-17 20:24:49 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-08-17 20:24:49 +0200 |
commit | 88dce3abd82c49ef879e6babcd91c1977dc212d9 (patch) | |
tree | 9658b7fff4afcb9759197932ecee6961368f3ae7 /winsup/cygwin/sec_helper.cc | |
parent | 37b6936f8b6860cda5881127b8ac272ed528ac34 (diff) | |
download | cygnal-88dce3abd82c49ef879e6babcd91c1977dc212d9.tar.gz cygnal-88dce3abd82c49ef879e6babcd91c1977dc212d9.tar.bz2 cygnal-88dce3abd82c49ef879e6babcd91c1977dc212d9.zip |
Try harder to avoid LDAP access for RFC2307 mapping
* fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Rearrange
to fall back to myself uid/gid in case we don't utilize Windows
account DBs, just as prior to 1.7.34.
* sec_helper.cc (cygpsid::get_id): Disable Samba user/group mapping per
RFC2307 if we're not utilizing Windows account DBs.
* security.cc (convert_samba_sd): Revert previous patch.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/sec_helper.cc')
-rw-r--r-- | winsup/cygwin/sec_helper.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc index 679f3a858..0c3a51c7e 100644 --- a/winsup/cygwin/sec_helper.cc +++ b/winsup/cygwin/sec_helper.cc @@ -112,7 +112,7 @@ cygpsid::get_id (BOOL search_grp, int *type, cyg_ldap *pldap) struct group *gr; if (cygheap->user.groups.pgsid == psid) id = myself->gid; - else if (sid_id_auth (psid) == 22) + else if (sid_id_auth (psid) == 22 && cygheap->pg.nss_grp_db ()) { /* Samba UNIX group. Try to map to Cygwin gid. If there's no mapping in the cache, try to fetch it from the configured @@ -144,7 +144,7 @@ cygpsid::get_id (BOOL search_grp, int *type, cyg_ldap *pldap) struct passwd *pw; if (*this == cygheap->user.sid ()) id = myself->uid; - else if (sid_id_auth (psid) == 22) + else if (sid_id_auth (psid) == 22 && cygheap->pg.nss_pwd_db ()) { /* Samba UNIX user. See comment above. */ uid_t uid = sid_sub_auth_rid (psid); |