aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo
diff options
context:
space:
mode:
Diffstat (limited to 'security/tomoyo')
-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 c94e35c3c759..dedd97d0c163 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)
92 } 92 }
93 /* 93 /*
94 * Read permission is checked against interpreters using next domain. 94 * Read permission is checked against interpreters using next domain.
95 * '1' is the result of open_to_namei_flags(O_RDONLY).
96 */ 95 */
97 return tomoyo_check_open_permission(domain, &bprm->file->f_path, 1); 96 return tomoyo_check_open_permission(domain, &bprm->file->f_path, O_RDONLY);
98} 97}
99 98
100static int tomoyo_path_truncate(struct path *path, loff_t length, 99static 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,
181static int tomoyo_dentry_open(struct file *f, const struct cred *cred) 180static int tomoyo_dentry_open(struct file *f, const struct cred *cred)
182{ 181{
183 int flags = f->f_flags; 182 int flags = f->f_flags;
184
185 if ((flags + 1) & O_ACCMODE)
186 flags++;
187 flags |= f->f_flags & (O_APPEND | O_TRUNC);
188 /* Don't check read permission here if called from do_execve(). */ 183 /* Don't check read permission here if called from do_execve(). */
189 if (current->in_execve) 184 if (current->in_execve)
190 return 0; 185 return 0;