aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>2010-06-02 00:24:43 -0400
committerJames Morris <jmorris@namei.org>2010-08-02 01:33:40 -0400
commitea0d3ab239fba48d6e998b19c28d78f765963007 (patch)
treec1e20273bf121a4f404ca7ac2a012161b0e0201e /security
parent3e62cbb8436f6c0cb799c8b7f106de7f662a7b8d (diff)
LSM: Remove unused arguments from security_path_truncate().
When commit be6d3e56a6b9b3a4ee44a0685e39e595073c6f0d "introduce new LSM hooks where vfsmount is available." was proposed, regarding security_path_truncate(), only "struct file *" argument (which AppArmor wanted to use) was removed. But length and time_attrs arguments are not used by TOMOYO nor AppArmor. Thus, let's remove these arguments. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Nick Piggin <npiggin@suse.de> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r--security/capability.c3
-rw-r--r--security/security.c5
-rw-r--r--security/tomoyo/tomoyo.c3
3 files changed, 4 insertions, 7 deletions
diff --git a/security/capability.c b/security/capability.c
index 8168e3ecd5bf..4aeb699da1b3 100644
--- a/security/capability.c
+++ b/security/capability.c
@@ -268,8 +268,7 @@ static int cap_path_rename(struct path *old_path, struct dentry *old_dentry,
268 return 0; 268 return 0;
269} 269}
270 270
271static int cap_path_truncate(struct path *path, loff_t length, 271static int cap_path_truncate(struct path *path)
272 unsigned int time_attrs)
273{ 272{
274 return 0; 273 return 0;
275} 274}
diff --git a/security/security.c b/security/security.c
index 351942a4ca0e..e8c87b8601b4 100644
--- a/security/security.c
+++ b/security/security.c
@@ -417,12 +417,11 @@ int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
417 new_dentry); 417 new_dentry);
418} 418}
419 419
420int security_path_truncate(struct path *path, loff_t length, 420int security_path_truncate(struct path *path)
421 unsigned int time_attrs)
422{ 421{
423 if (unlikely(IS_PRIVATE(path->dentry->d_inode))) 422 if (unlikely(IS_PRIVATE(path->dentry->d_inode)))
424 return 0; 423 return 0;
425 return security_ops->path_truncate(path, length, time_attrs); 424 return security_ops->path_truncate(path);
426} 425}
427 426
428int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt, 427int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt,
diff --git a/security/tomoyo/tomoyo.c b/security/tomoyo/tomoyo.c
index 57d442e7339b..7be732cadd47 100644
--- a/security/tomoyo/tomoyo.c
+++ b/security/tomoyo/tomoyo.c
@@ -93,8 +93,7 @@ static int tomoyo_bprm_check_security(struct linux_binprm *bprm)
93 return tomoyo_check_open_permission(domain, &bprm->file->f_path, O_RDONLY); 93 return tomoyo_check_open_permission(domain, &bprm->file->f_path, O_RDONLY);
94} 94}
95 95
96static int tomoyo_path_truncate(struct path *path, loff_t length, 96static int tomoyo_path_truncate(struct path *path)
97 unsigned int time_attrs)
98{ 97{
99 return tomoyo_path_perm(TOMOYO_TYPE_TRUNCATE, path); 98 return tomoyo_path_perm(TOMOYO_TYPE_TRUNCATE, path);
100} 99}