summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2008-06-27 22:21:09 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2008-06-27 22:21:09 +0000
commit19aba17b4d4be411fc6c65eaf560ca98a5eba22c (patch)
tree0936303aed0ff89a353408ed6d9790b014176f7f
parentb90aba268109e524f4378fe30923a66fd403844d (diff)
2008-06-27 Flávio Cruz <flaviocruz@gmail.com>
* parms-iscontroller.c (fshelp_iscontroller): Replace duplicate check for st->ts_uid in user->uids by check for 0 in user->uids.
-rw-r--r--libfshelp/ChangeLog5
-rw-r--r--libfshelp/perms-iscontroller.c2
2 files changed, 6 insertions, 1 deletions
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 <flaviocruz@gmail.com>
+
+ * 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 <tschwinge@gnu.org>
* 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;