diff options
Diffstat (limited to 'security/tomoyo')
-rw-r--r-- | security/tomoyo/tomoyo.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c index c94e35c3c75..dedd97d0c16 100644 --- a/security/tomoyo/tomoyo.c +++ b/security/tomoyo/tomoyo.c @@ -92,9 +92,8 @@ static int tomoyo_bprm_check_security(struct linux_binprm *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, @@ -181,10 +180,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; |