summaryrefslogtreecommitdiff
path: root/debian/patches/dir_acces_fix.patch
blob: d40a5a11e445b022b2ca928b53c5b271af6fbb03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Index: libfshelp/perms-access.c
===================================================================
RCS file: /cvsroot/hurd/hurd/libfshelp/perms-access.c,v
retrieving revision 1.2
diff -u -p -r1.2 perms-access.c
--- libfshelp/perms-access.c	14 Jul 2008 22:38:13 -0000	1.2
+++ libfshelp/perms-access.c	18 Apr 2009 15:28:45 -0000
@@ -30,7 +30,7 @@ fshelp_access (struct stat *st, int op, 
 {
   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))