aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/grp.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2019-01-24 21:19:40 +0100
committerCorinna Vinschen <corinna@vinschen.de>2019-01-24 21:20:09 +0100
commit02373d8bec71abcd46421f0ce952ad4e8cfc1422 (patch)
tree0309a073f373b198f269f2a5718c678e23cb3cc3 /winsup/cygwin/grp.cc
parent2c12a2c32a6fe43f8a74e2792ad15c65116c6e2c (diff)
downloadnewlib-02373d8bec71abcd46421f0ce952ad4e8cfc1422.zip
newlib-02373d8bec71abcd46421f0ce952ad4e8cfc1422.tar.gz
newlib-02373d8bec71abcd46421f0ce952ad4e8cfc1422.tar.bz2
Cygwin: seteuid: work with password-less user switch as well
The previous patch failed with password-less auth because in that case the return code from get_server_groups wasn't tested. Fix that. Also make sure that get_server_groups does not check if the account is disabled or locked out when just fetching the group list for initgroups or getgrouplist. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/grp.cc')
-rw-r--r--winsup/cygwin/grp.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/grp.cc b/winsup/cygwin/grp.cc
index ca35a4b..a126bff 100644
--- a/winsup/cygwin/grp.cc
+++ b/winsup/cygwin/grp.cc
@@ -738,7 +738,7 @@ get_groups (const char *user, gid_t gid, cygsidlist &gsids)
struct group *grp = internal_getgrgid (gid, &cldap);
cygsid usersid, grpsid;
if (usersid.getfrompw (pw))
- get_server_groups (gsids, usersid);
+ get_server_groups (gsids, usersid, NO_CHK_DISABLED);
if (gid != ILLEGAL_GID && grpsid.getfromgr (grp))
gsids += grpsid;
cygheap->user.reimpersonate ();