From d4a2c3958c79b9582b6541585ad2a72aca7a734a Mon Sep 17 00:00:00 2001 From: Svante Signell Date: Tue, 20 Oct 2015 20:45:48 +0200 Subject: 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. --- trans/fakeroot.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'trans') 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 -- cgit v1.2.3