summaryrefslogtreecommitdiff
path: root/trans/fakeroot.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-05-13 21:34:07 +0000
committerRoland McGrath <roland@gnu.org>2002-05-13 21:34:07 +0000
commit43cf5609cef66c92a0da7ad66122de0a184e4e30 (patch)
treeb202a210d4f3cafdef3ab873b60797f1b8362698 /trans/fakeroot.c
parent3e743b155c29e7b13ac6f70b949b2e0ecc2ed0c2 (diff)
2002-05-13 Roland McGrath <roland@frob.com>
* fakeroot.c (netfs_attempt_chmod): Handle a MODE argument with no S_IFMT bits set.
Diffstat (limited to 'trans/fakeroot.c')
-rw-r--r--trans/fakeroot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 4e9bdd91..f1bd024e 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -210,6 +210,8 @@ real_from_fake_mode (mode_t mode)
error_t
netfs_attempt_chmod (struct iouser *cred, struct node *np, mode_t mode)
{
+ if ((mode & S_IFMT) == 0)
+ 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))