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
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2016-06-27 13:08:46 +00:00
1 parent 0ed9f520da
commit da989b473d
1 file changed
+5 -2
+5 -2
View File
@@ -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;
}