mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
audit: Fix wrong task in comparison of session ID
The audit_filter_rules() function in auditsc.c compared the session ID
with the credentials of the current task, while it should use the
credentials of the task given to audit_filter_rules() as a parameter
(tsk).
GitHub issue:
https://github.com/linux-audit/audit-kernel/issues/82
Fixes: 8fae477056 ("audit: add support for session ID user filter")
Signed-off-by: Ondrej Mosnacek <[email protected]>
Reviewed-by: Richard Guy Briggs <[email protected]>
[PM: not user visible, dropped stable]
Signed-off-by: Paul Moore <[email protected]>
This commit is contained in:
parent
5c5b8d8beb
commit
5b71388663
1 changed files with 1 additions and 1 deletions
|
|
@ -517,7 +517,7 @@ static int audit_filter_rules(struct task_struct *tsk,
|
|||
result = audit_gid_comparator(cred->fsgid, f->op, f->gid);
|
||||
break;
|
||||
case AUDIT_SESSIONID:
|
||||
sessionid = audit_get_sessionid(current);
|
||||
sessionid = audit_get_sessionid(tsk);
|
||||
result = audit_comparator(sessionid, f->op, f->val);
|
||||
break;
|
||||
case AUDIT_PERS:
|
||||
|
|
|
|||
Loading…
Reference in a new issue