From 43cf5609cef66c92a0da7ad66122de0a184e4e30 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 13 May 2002 21:34:07 +0000 Subject: 2002-05-13 Roland McGrath * fakeroot.c (netfs_attempt_chmod): Handle a MODE argument with no S_IFMT bits set. --- trans/fakeroot.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'trans') 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)) -- cgit v1.2.3