From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amy Griffis Subject: [PATCH 1/4] initialize name osid Date: Tue, 13 Feb 2007 14:14:09 -0500 Message-ID: <20070213191409.GB7536@fc.hp.com> References: <20070213191308.GA7536@fc.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Received: from mx2.redhat.com (mx2.redhat.com [10.255.15.25]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l1DJHgvn030300 for ; Tue, 13 Feb 2007 14:17:42 -0500 Received: from atlrel9.hp.com (atlrel9.hp.com [156.153.255.214]) by mx2.redhat.com (8.13.1/8.13.1) with ESMTP id l1DJHaNR016508 for ; Tue, 13 Feb 2007 14:17:36 -0500 Received: from smtp2.fc.hp.com (smtp.fc.hp.com [15.11.136.114]) by atlrel9.hp.com (Postfix) with ESMTP id 6A77F351C7 for ; Tue, 13 Feb 2007 14:17:31 -0500 (EST) Received: from ldl.fc.hp.com (ldl.fc.hp.com [15.11.146.30]) by smtp2.fc.hp.com (Postfix) with ESMTP id 45EBE170333 for ; Tue, 13 Feb 2007 19:17:31 +0000 (UTC) Received: from localhost (ldl.lart [127.0.0.1]) by ldl.fc.hp.com (Postfix) with ESMTP id 56B1039C062 for ; Tue, 13 Feb 2007 12:17:30 -0700 (MST) Received: from ldl.fc.hp.com ([127.0.0.1]) by localhost (ldl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 31561-08 for ; Tue, 13 Feb 2007 12:17:25 -0700 (MST) Content-Disposition: inline In-Reply-To: <20070213191308.GA7536@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 3599558..b3f5cd6 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -1228,6 +1228,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