From 19aba17b4d4be411fc6c65eaf560ca98a5eba22c Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 27 Jun 2008 22:21:09 +0000 Subject: 2008-06-27 Flávio Cruz MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * parms-iscontroller.c (fshelp_iscontroller): Replace duplicate check for st->ts_uid in user->uids by check for 0 in user->uids. --- libfshelp/ChangeLog | 5 +++++ libfshelp/perms-iscontroller.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'libfshelp') diff --git a/libfshelp/ChangeLog b/libfshelp/ChangeLog index 67b418e8..1c4f115c 100644 --- a/libfshelp/ChangeLog +++ b/libfshelp/ChangeLog @@ -1,3 +1,8 @@ +2008-06-27 Flávio Cruz + + * parms-iscontroller.c (fshelp_iscontroller): Replace duplicate check + for st->ts_uid in user->uids by check for 0 in user->uids. + 2007-11-13 Thomas Schwinge * touch.c (fshelp_touch): Adapt to ``struct stat'' changes. diff --git a/libfshelp/perms-iscontroller.c b/libfshelp/perms-iscontroller.c index 456da2a2..555a23db 100644 --- a/libfshelp/perms-iscontroller.c +++ b/libfshelp/perms-iscontroller.c @@ -30,7 +30,7 @@ fshelp_iscontroller (struct stat *st, struct iouser *user) { /* Permitted if USER has the superuser uid, the owner uid or if the USER has authority over the process's effective id. */ - if (idvec_contains (user->uids, st->st_uid) + if (idvec_contains (user->uids, 0) || idvec_contains (user->uids, st->st_uid) || idvec_contains (user->uids, geteuid ())) return 0; -- cgit v1.2.3