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 2016-06-26 10:23:56 -04:00 committed by Atomic Bot
parent 0ed9f520da
commit da989b473d
1 changed files with 5 additions and 2 deletions

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;
}