diff options
author | Michael I. Bushnell <mib@gnu.org> | 1996-04-02 16:23:38 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1996-04-02 16:23:38 +0000 |
commit | 94e7f872772fe00e82142c6935fb53fb6ebd5234 (patch) | |
tree | 361bdce6bf61b2a8ecdfaddbf3dd4505ae876f07 /nfs | |
parent | 1686ccfe45e5afc2d7eaf2d986b7b52172a37532 (diff) |
(netfs_report_access): Oops.
Diffstat (limited to 'nfs')
-rw-r--r-- | nfs/ops.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -959,21 +959,21 @@ netfs_report_access (struct netcred *cred, here we err on the side of denying access, and that we always have to check everything. */ + *types = 0; + len = 1; err = netfs_attempt_read (cred, np, 0, &len, &byte); if (err) - { - *types = 0; - return; - } - + return; assert (len == 1 || len == 0); + *types |= O_READ | O_EXEC; + if (len == 1) { err = netfs_attempt_write (cred, np, 0, &len, &byte); - if (err) - *types &= ~O_WRITE; + if (!err) + *types |= O_WRITE; } else { @@ -984,8 +984,8 @@ netfs_report_access (struct netcred *cred, check this and not just return a presumptive error. */ byte = 0; err = netfs_attempt_write (cred, np, 0, &len, &byte); - if (err) - *types &= ~O_WRITE; + if (!err) + *types |= O_WRITE; netfs_attempt_set_size (cred, np, 0); } } |