mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
LSM: Remove unused arguments from security_path_truncate().
When commit be6d3e56a6 "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 <[email protected]>
Acked-by: Nick Piggin <[email protected]>
Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
3e62cbb843
commit
ea0d3ab239
6 changed files with 10 additions and 20 deletions
|
|
@ -110,7 +110,7 @@ static long do_sys_truncate(const char __user *pathname, loff_t length)
|
|||
|
||||
error = locks_verify_truncate(inode, NULL, length);
|
||||
if (!error)
|
||||
error = security_path_truncate(&path, length, 0);
|
||||
error = security_path_truncate(&path);
|
||||
if (!error)
|
||||
error = do_truncate(path.dentry, length, 0, NULL);
|
||||
|
||||
|
|
@ -165,8 +165,7 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
|
|||
|
||||
error = locks_verify_truncate(inode, file, length);
|
||||
if (!error)
|
||||
error = security_path_truncate(&file->f_path, length,
|
||||
ATTR_MTIME|ATTR_CTIME);
|
||||
error = security_path_truncate(&file->f_path);
|
||||
if (!error)
|
||||
error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, file);
|
||||
out_putf:
|
||||
|
|
|
|||
Loading…
Reference in a new issue