commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 05/07: trans/fakeroot: fix chmod


From: Samuel Thibault
Subject: [hurd] 05/07: trans/fakeroot: fix chmod
Date: Thu, 06 Feb 2014 02:05:11 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 4edd4887541eeff2970c27aa16328a42051e20f4
Author: Richard Braun <address@hidden>
Date:   Wed Feb 5 23:57:40 2014 +0100

    trans/fakeroot: fix chmod
    
    Unconditionally relay chmod requests instead of filtering those that
    don't change the executable bit.
    
    * trans/fakeroot.c (netfs_attempt_chmod): Unconditionally call file_chmod
    with an unaltered mode.
---
 trans/fakeroot.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index b79a37d..c2847c5 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -511,16 +511,10 @@ netfs_attempt_chmod (struct iouser *cred, struct node 
*np, mode_t mode)
     mode |= np->nn_stat.st_mode & S_IFMT;
   if ((mode & S_IFMT) != (np->nn_stat.st_mode & S_IFMT))
     return EOPNOTSUPP;
-  if (((mode | (mode << 3) | (mode << 6))
-       ^ (np->nn_stat.st_mode | (np->nn_stat.st_mode << 3)
-         | (np->nn_stat.st_mode << 6)))
-      & S_IEXEC)
-    {
-      /* We are changing the executable bit, so this is not all fake.  We
-        don't bother with error checking since the fake mode change should
-        always succeed--worst case a later open will get EACCES.  */
-      (void) file_chmod (np->nn->file, real_from_fake_mode (mode));
-    }
+
+  /* We don't bother with error checking since the fake mode change should
+     always succeed--worst case a later open will get EACCES.  */
+  (void) file_chmod (np->nn->file, mode);
   np->nn->faked |= FAKE_MODE;
   np->nn_stat.st_mode = mode;
   return 0;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]