From: Amy Griffis Date: Tue, 13 Feb 2007 19:14:09 +0000 (-0500) Subject: [PATCH] initialize name osid X-Git-Tag: v2.6.22-rc1~32^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e41e8bde43026d5d2e41464e6105a50b31e34102;p=linux-2.6 [PATCH] initialize name osid 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 Signed-off-by: Al Viro --- diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 6aff0df755..41d129a787 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -1289,6 +1289,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);