patch-2.3.41 linux/fs/open.c
Next file: linux/fs/partitions/Config.in
Previous file: linux/fs/nfsd/nfsfh.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Fri Jan 28 08:05:02 2000
- Orig file:
v2.3.40/linux/fs/open.c
- Orig date:
Fri Jan 7 19:13:22 2000
diff -u --recursive --new-file v2.3.40/linux/fs/open.c linux/fs/open.c
@@ -306,11 +306,12 @@
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 @@
current->fsuid = old_fsuid;
current->fsgid = old_fsgid;
current->cap_effective = old_cap;
-out:
+
unlock_kernel();
return res;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)