summaryrefslogtreecommitdiff
path: root/trans
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-08-14 15:17:37 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-08-14 15:21:41 +0200
commit8b14af6546d542878a8ea6ca08e49e0cba2e34ef (patch)
treefe64c71b7ec45368adff1eb48ef247e4c65e937b /trans
parent8d862231a0016dcf40f269e73d5b189606038490 (diff)
Make fakeroot return file types from underly fs
Fakeroot does not support faking them anyway, and they may change on the underlying fs, e.g. when creating a local socket. * trans/fakeroot.c (netfs_validate_stat): Return S_IFMT part of st_mode as provided by underlying filesystem.
Diffstat (limited to 'trans')
-rw-r--r--trans/fakeroot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trans/fakeroot.c b/trans/fakeroot.c
index 4275152d..3c84ce70 100644
--- a/trans/fakeroot.c
+++ b/trans/fakeroot.c
@@ -482,7 +482,7 @@ netfs_validate_stat (struct node *np, struct iouser *cred)
if (netfs_node_netnode (np)->faked & FAKE_AUTHOR)
st.st_author = np->nn_stat.st_author;
if (netfs_node_netnode (np)->faked & FAKE_MODE)
- st.st_mode = np->nn_stat.st_mode;
+ st.st_mode = (st.st_mode & S_IFMT) | (np->nn_stat.st_mode & ~S_IFMT);
np->nn_stat = st;
np->nn_translated = S_ISLNK (st.st_mode) ? S_IFLNK : 0;