From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amy Griffis Subject: [PATCH 1/4] initialize name osid Date: Mon, 19 Mar 2007 16:43:05 -0400 Message-ID: <20070319204305.GB13931@fc.hp.com> References: <20070319204234.GA13931@fc.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l2JKqPO2026370 for ; Mon, 19 Mar 2007 16:52:25 -0400 Received: from atlrel7.hp.com (atlrel7.hp.com [156.153.255.213]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l2JKqPHK008403 for ; Mon, 19 Mar 2007 16:52:25 -0400 Received: from smtp1.fc.hp.com (smtp.fc.hp.com [15.15.136.127]) by atlrel7.hp.com (Postfix) with ESMTP id 0CA1735294 for ; Mon, 19 Mar 2007 16:52:19 -0400 (EDT) Received: from ldl.fc.hp.com (ldl.fc.hp.com [15.11.146.30]) by smtp1.fc.hp.com (Postfix) with ESMTP id C5081136871 for ; Mon, 19 Mar 2007 20:52:19 +0000 (UTC) Content-Disposition: inline In-Reply-To: <20070319204234.GA13931@fc.hp.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 List-Id: linux-audit@redhat.com Audit contexts can be reused, so initialize a name's osid to the default in audit_getname(). This ensures we don't log a bogus object label when no inode data is collected for a name. Signed-off-by: Amy Griffis --- kernel/auditsc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 628c7ac..863479c 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -1226,6 +1226,7 @@ void __audit_getname(const char *name) context->names[context->name_count].name_len = AUDIT_NAME_FULL; context->names[context->name_count].name_put = 1; context->names[context->name_count].ino = (unsigned long)-1; + context->names[context->name_count].osid = 0; ++context->name_count; if (!context->pwd) { read_lock(¤t->fs->lock); -- 1.4.4.4