mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
security: remove dead hook acct
Unused hook. Remove. Signed-off-by: Eric Paris <[email protected]> Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
3011a344cd
commit
05b90496f2
4 changed files with 5 additions and 40 deletions
|
|
@ -216,7 +216,6 @@ static int acct_on(char *name)
|
|||
{
|
||||
struct file *file;
|
||||
struct vfsmount *mnt;
|
||||
int error;
|
||||
struct pid_namespace *ns;
|
||||
struct bsd_acct_struct *acct = NULL;
|
||||
|
||||
|
|
@ -244,13 +243,6 @@ static int acct_on(char *name)
|
|||
}
|
||||
}
|
||||
|
||||
error = security_acct(file);
|
||||
if (error) {
|
||||
kfree(acct);
|
||||
filp_close(file, NULL);
|
||||
return error;
|
||||
}
|
||||
|
||||
spin_lock(&acct_lock);
|
||||
if (ns->bacct == NULL) {
|
||||
ns->bacct = acct;
|
||||
|
|
@ -281,7 +273,7 @@ static int acct_on(char *name)
|
|||
*/
|
||||
SYSCALL_DEFINE1(acct, const char __user *, name)
|
||||
{
|
||||
int error;
|
||||
int error = 0;
|
||||
|
||||
if (!capable(CAP_SYS_PACCT))
|
||||
return -EPERM;
|
||||
|
|
@ -299,13 +291,11 @@ SYSCALL_DEFINE1(acct, const char __user *, name)
|
|||
if (acct == NULL)
|
||||
return 0;
|
||||
|
||||
error = security_acct(NULL);
|
||||
if (!error) {
|
||||
spin_lock(&acct_lock);
|
||||
acct_file_reopen(acct, NULL, NULL);
|
||||
spin_unlock(&acct_lock);
|
||||
}
|
||||
spin_lock(&acct_lock);
|
||||
acct_file_reopen(acct, NULL, NULL);
|
||||
spin_unlock(&acct_lock);
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue