summaryrefslogtreecommitdiff
path: root/src/rofiles-fuse
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-06-26 10:23:56 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2016-06-27 13:08:46 +0000
commitda989b473dc6b812646b65437f96ff5b9e3af3a4 (patch)
tree3799081628a9d4baa488919495e173615028d173 /src/rofiles-fuse
parent0ed9f520daca0dbb58bd278e709aff4b298e238f (diff)
downloadostree-da989b473dc6b812646b65437f96ff5b9e3af3a4.tar.gz
rofiles-fuse: Do allow fchmod/fchown on directories
The program is called ro*files* and ostree creates physical copies of directories, so changing them is fine. I hit this when trying to do a copy checkout onto an rofiles-fuse mount. Closes: #368 Approved by: jlebon
Diffstat (limited to 'src/rofiles-fuse')
-rw-r--r--src/rofiles-fuse/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rofiles-fuse/main.c b/src/rofiles-fuse/main.c
index bdf7ffb8..8468276d 100644
--- a/src/rofiles-fuse/main.c
+++ b/src/rofiles-fuse/main.c
@@ -261,8 +261,11 @@ can_write (const char *path)
else
return -errno;
}
- if (!devino_set_contains (stbuf.st_dev, stbuf.st_ino))
- return -EROFS;
+ if (!S_ISDIR (stbuf.st_mode))
+ {
+ if (!devino_set_contains (stbuf.st_dev, stbuf.st_ino))
+ return -EROFS;
+ }
return 0;
}