diff options
author | Svante Signell <svante.signell@gmail.com> | 2015-10-20 20:45:48 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-10-20 20:45:48 +0200 |
commit | d4a2c3958c79b9582b6541585ad2a72aca7a734a (patch) | |
tree | 77aeccfb3c2100b7ee82427c5f5c4c11a81774ef /trans | |
parent | a6185e280c1e9ca17e9bd24eff169671fe28fb1b (diff) |
Make fakerooted access() return real access
Various realworld tests would otherwise think they can write to /, while
they actually can't.
* trans/fakeroot.c (netfs_report_access): Call file_check_access instead of
returning O_RDWR|O_EXEC when faking mode too.
Diffstat (limited to 'trans')
-rw-r--r-- | trans/fakeroot.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/trans/fakeroot.c b/trans/fakeroot.c index 6962810b..84b4efcb 100644 --- a/trans/fakeroot.c +++ b/trans/fakeroot.c @@ -780,12 +780,7 @@ netfs_attempt_write (struct iouser *cred, struct node *np, error_t netfs_report_access (struct iouser *cred, struct node *np, int *types) { - struct netnode *nn = netfs_node_netnode (np); - if (!(nn->faked & FAKE_MODE)) - return file_check_access (nn->file, types); - else - *types = O_RDWR|O_EXEC; - return 0; + return file_check_access (netfs_node_netnode (np)->file, types); } error_t |