summaryrefslogtreecommitdiffstats
path: root/security/tomoyo/tomoyo.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-02-15 22:20:18 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-02-15 22:20:18 +0100
commit56012808f4d5606e401539f663d92009d964425b (patch)
treef3736a97725647393a2db7c95462d857115197ca /security/tomoyo/tomoyo.c
parentMerge branch 'for-rmk/samsung3' of git://git.fluff.org/bjdooks/linux into dev... (diff)
parent[ARM] orion5x: D-link DNS-323 revision A1 power LED (diff)
downloadlinux-56012808f4d5606e401539f663d92009d964425b.tar.xz
linux-56012808f4d5606e401539f663d92009d964425b.zip
Merge branch 'for-rmk' of git://git.marvell.com/orion into devel-stable
Conflicts: arch/arm/Makefile
Diffstat (limited to 'security/tomoyo/tomoyo.c')
-rw-r--r--security/tomoyo/tomoyo.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c
index 8a00ade85166..2aceebf5f354 100644
--- a/security/tomoyo/tomoyo.c
+++ b/security/tomoyo/tomoyo.c
@@ -80,9 +80,8 @@ static int tomoyo_bprm_check_security(struct linux_binprm *bprm)
return tomoyo_find_next_domain(bprm);
/*
* Read permission is checked against interpreters using next domain.
- * '1' is the result of open_to_namei_flags(O_RDONLY).
*/
- return tomoyo_check_open_permission(domain, &bprm->file->f_path, 1);
+ return tomoyo_check_open_permission(domain, &bprm->file->f_path, O_RDONLY);
}
static int tomoyo_path_truncate(struct path *path, loff_t length,
@@ -184,10 +183,6 @@ static int tomoyo_file_fcntl(struct file *file, unsigned int cmd,
static int tomoyo_dentry_open(struct file *f, const struct cred *cred)
{
int flags = f->f_flags;
-
- if ((flags + 1) & O_ACCMODE)
- flags++;
- flags |= f->f_flags & (O_APPEND | O_TRUNC);
/* Don't check read permission here if called from do_execve(). */
if (current->in_execve)
return 0;