diff options
Diffstat (limited to 'libfshelp')
-rw-r--r-- | libfshelp/exec-reauth.c | 2 | ||||
-rw-r--r-- | libfshelp/perms-access.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libfshelp/exec-reauth.c b/libfshelp/exec-reauth.c index 3df375d5..d9a82974 100644 --- a/libfshelp/exec-reauth.c +++ b/libfshelp/exec-reauth.c @@ -108,7 +108,7 @@ fshelp_exec_reauth (int suid, uid_t uid, int sgid, gid_t gid, if (suid && !err) err = idvec_setid (eff_uids, avail_uids, uid, &_secure); if (sgid && !err) - err = idvec_setid (eff_uids, avail_uids, gid, &_secure); + err = idvec_setid (eff_gids, avail_gids, gid, &_secure); if (err) goto abandon_suid; diff --git a/libfshelp/perms-access.c b/libfshelp/perms-access.c index fdca0b7b..67e52812 100644 --- a/libfshelp/perms-access.c +++ b/libfshelp/perms-access.c @@ -30,7 +30,7 @@ fshelp_access (struct stat *st, int op, struct iouser *user) { int gotit; if (idvec_contains (user->uids, 0)) - gotit = (op != S_IEXEC) || (st->st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)); + gotit = (op != S_IEXEC) || !S_ISREG(st->st_mode) || (st->st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)); else if (user->uids->num == 0 && (st->st_mode & S_IUSEUNK)) gotit = st->st_mode & (op << S_IUNKSHIFT); else if (!fshelp_isowner (st, user)) |