diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-18 00:24:27 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-18 00:24:27 +0000 |
commit | b9558d5f86c471a125abf1fb3a3882fb053b1f8c (patch) | |
tree | 707b53ec64e740a7da87d5f36485e3cd9b1c794e /fs/open.c | |
parent | b3ac367c7a3e6047abe74817db27e34e759f279f (diff) |
Merge with Linux 2.3.41.
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -306,11 +306,12 @@ asmlinkage long sys_access(const char * filename, int mode) struct dentry * dentry; int old_fsuid, old_fsgid; kernel_cap_t old_cap; - int res = -EINVAL; + int res; + + if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */ + return -EINVAL; lock_kernel(); - if (mode != (mode & S_IRWXO)) /* where's F_OK, X_OK, W_OK, R_OK? */ - goto out; old_fsuid = current->fsuid; old_fsgid = current->fsgid; old_cap = current->cap_effective; @@ -337,7 +338,7 @@ asmlinkage long sys_access(const char * filename, int mode) current->fsuid = old_fsuid; current->fsgid = old_fsgid; current->cap_effective = old_cap; -out: + unlock_kernel(); return res; } |