[PATCH 3/3] audit: use old_lock in audit_set_feature

Gao feng gaofeng at cn.fujitsu.com
Thu Oct 31 08:27:58 UTC 2013


Signed-off-by: Gao feng <gaofeng at cn.fujitsu.com>
---
 kernel/audit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/audit.c b/kernel/audit.c
index c307786..19f21ae 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -697,7 +697,7 @@ static int audit_set_feature(struct sk_buff *skb)
 		old_lock = af.lock & feature;
 
 		/* are we changing a locked feature? */
-		if ((af.lock & feature) && (new_feature != old_feature)) {
+		if (old_lock && (new_feature != old_feature)) {
 			audit_log_feature_change(i, old_feature, new_feature,
 						 old_lock, new_lock, 0);
 			return -EPERM;
-- 
1.8.3.1




More information about the Linux-audit mailing list