Commit 4547b3bc43c64389ca4368be0edf1f90ae1b938d
Committed by
Eric Paris
1 parent
b6c50fe0be
Exists in
master
and in
16 other branches
audit: use old_lock in audit_set_feature
we already have old_lock, no need to calculate it again. Acked-by: Eric Paris <eparis@redhat.com> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Signed-off-by: Eric Paris <eparis@redhat.com>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
kernel/audit.c
... | ... | @@ -714,7 +714,7 @@ |
714 | 714 | old_lock = af.lock & feature; |
715 | 715 | |
716 | 716 | /* are we changing a locked feature? */ |
717 | - if ((af.lock & feature) && (new_feature != old_feature)) { | |
717 | + if (old_lock && (new_feature != old_feature)) { | |
718 | 718 | audit_log_feature_change(i, old_feature, new_feature, |
719 | 719 | old_lock, new_lock, 0); |
720 | 720 | return -EPERM; |