From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gao feng Subject: [PATCH 3/3] audit: use old_lock in audit_set_feature Date: Thu, 31 Oct 2013 16:27:58 +0800 Message-ID: <1383208078-22117-3-git-send-email-gaofeng@cn.fujitsu.com> References: <1383208078-22117-1-git-send-email-gaofeng@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383208078-22117-1-git-send-email-gaofeng@cn.fujitsu.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com Cc: rgb@redhat.com List-Id: linux-audit@redhat.com Signed-off-by: Gao feng --- 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