summaryrefslogtreecommitdiff
path: root/debian/patches/dir_acces_fix.patch
blob: 964b39a5ad06932be478e8e8b28b2ac0c689ea71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
 libfshelp/perms-access.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/libfshelp/perms-access.c
+++ b/libfshelp/perms-access.c
@@ -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))