[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 11/15: Cope with scripts which chmod -x directories
From: |
Samuel Thibault |
Subject: |
[hurd] 11/15: Cope with scripts which chmod -x directories |
Date: |
Sun, 05 Jul 2015 00:42:00 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit f57ed76faed9e9e922ba93dd3bf8740974eb718a
Author: Svante Signell <address@hidden>
Date: Wed Jun 17 00:12:49 2015 +0200
Cope with scripts which chmod -x directories
As well as other potential mode changes which are indeed supposed to still
work as root.
* trans/fakeroot.c (netfs_attempt_chmod): Always set S_IRUSR and S_IWUSR in
real_mode, and set S_IXUSR also when this is a directory.
---
trans/fakeroot.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 63303a0..4275152 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -554,13 +554,11 @@ netfs_attempt_chmod (struct iouser *cred, struct node
*np, mode_t mode)
/* Make sure that `check_openmodes' will still always be able to reopen
it. */
- real_mode = mode;
nn = netfs_node_netnode (np);
- if (nn->openmodes & O_READ)
- real_mode |= S_IRUSR;
- if (nn->openmodes & O_WRITE)
- real_mode |= S_IWUSR;
- if (nn->openmodes & O_EXEC)
+ real_mode = mode;
+ real_mode |= S_IRUSR;
+ real_mode |= S_IWUSR;
+ if (S_ISDIR (mode) || (nn->openmodes & O_EXEC))
real_mode |= S_IXUSR;
/* We don't bother with error checking since the fake mode change should
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 01/15: console-client: fix build with -O0, (continued)
- [hurd] 01/15: console-client: fix build with -O0, Samuel Thibault, 2015/07/04
- [hurd] 02/15: console-client: avoid nested function, Samuel Thibault, 2015/07/04
- [hurd] 09/15: libdiskfs: do not print a message on ENOMEM, Samuel Thibault, 2015/07/04
- [hurd] 15/15: Merge remote-tracking branch 'upstream/master' into upstream, Samuel Thibault, 2015/07/04
- [hurd] 08/15: Check AWK usability when XKB is enabled, Samuel Thibault, 2015/07/04
- [hurd] 07/15: console-client: Fix lower range of binary search, Samuel Thibault, 2015/07/04
- [hurd] 04/15: utils/rpctrace: fix build with -O0, Samuel Thibault, 2015/07/04
- [hurd] 06/15: console-client: assert precondition, Samuel Thibault, 2015/07/04
- [hurd] 05/15: utils/vmstat: fix integer overflow, Samuel Thibault, 2015/07/04
- [hurd] 03/15: console-client: fix binary search, Samuel Thibault, 2015/07/04
- [hurd] 11/15: Cope with scripts which chmod -x directories,
Samuel Thibault <=
- [hurd] 10/15: Fix ps -o %r infinite loop, Samuel Thibault, 2015/07/04
- [hurd] 14/15: Do not keep mutex locked while waiting for authenticate loop, Samuel Thibault, 2015/07/04
- [hurd] 13/15: utils/rpcscan: new utility, Samuel Thibault, 2015/07/04
- [hurd] 12/15: utils: split-off the message id parsing, Samuel Thibault, 2015/07/04