aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/tomoyo.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-01-23 03:31:06 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-23 03:31:06 -0500
commit51c24aaacaea90c8e87f1dec75a2ac7622b593f8 (patch)
tree9f54936c87764bef75e97395cb56b7d1e0df24c6 /security/tomoyo/tomoyo.c
parent4276e47e2d1c85a2477caf0d22b91c4f2377fba8 (diff)
parent6be325719b3e54624397e413efd4b33a997e55a3 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
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)
80 return tomoyo_find_next_domain(bprm); 80 return tomoyo_find_next_domain(bprm);
81 /* 81 /*
82 * Read permission is checked against interpreters using next domain. 82 * Read permission is checked against interpreters using next domain.
83 * '1' is the result of open_to_namei_flags(O_RDONLY).
84 */ 83 */
85 return tomoyo_check_open_permission(domain, &bprm->file->f_path, 1); 84 return tomoyo_check_open_permission(domain, &bprm->file->f_path, O_RDONLY);
86} 85}
87 86
88static int tomoyo_path_truncate(struct path *path, loff_t length, 87static 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,
184static int tomoyo_dentry_open(struct file *f, const struct cred *cred) 183static int tomoyo_dentry_open(struct file *f, const struct cred *cred)
185{ 184{
186 int flags = f->f_flags; 185 int flags = f->f_flags;
187
188 if ((flags + 1) & O_ACCMODE)
189 flags++;
190 flags |= f->f_flags & (O_APPEND | O_TRUNC);
191 /* Don't check read permission here if called from do_execve(). */ 186 /* Don't check read permission here if called from do_execve(). */
192 if (current->in_execve) 187 if (current->in_execve)
193 return 0; 188 return 0;