* [PATCH] initialize name osid in audit_getname()
@ 2007-01-24 0:02 Amy Griffis
0 siblings, 0 replies; only message in thread
From: Amy Griffis @ 2007-01-24 0:02 UTC (permalink / raw)
To: linux-audit
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.
Untested patch against lspp.63 kernel.
Signed-off-by: Amy Griffis <amy.griffis@hp.com>
---
diff -Nrup linux-2.6.18.x86_64/kernel/auditsc.c linux-2.6.18.x86_64-amg/kernel/auditsc.c
--- linux-2.6.18.x86_64/kernel/auditsc.c 2007-01-23 17:17:07.000000000 -0500
+++ linux-2.6.18.x86_64-amg/kernel/auditsc.c 2007-01-23 17:20:35.000000000 -0500
@@ -1215,6 +1215,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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-24 0:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-24 0:02 [PATCH] initialize name osid in audit_getname() Amy Griffis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox