]> err.no Git - linux-2.6/commitdiff
[PATCH] initialize name osid
authorAmy Griffis <amy.griffis@hp.com>
Tue, 13 Feb 2007 19:14:09 +0000 (14:14 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 11 May 2007 09:38:25 +0000 (05:38 -0400)
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 <amy.griffis@hp.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
kernel/auditsc.c

index 6aff0df7556833c6a0f1f797dbbc3047355f6480..41d129a787936308e1ec569da0b8ac12f73e6854 100644 (file)
@@ -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(&current->fs->lock);