aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmy Griffis <amy.griffis@hp.com>2007-02-13 14:14:09 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2007-05-11 05:38:25 -0400
commite41e8bde43026d5d2e41464e6105a50b31e34102 (patch)
tree1ba5c647ce69db81d327b0024294445a449cf1c0
parente54dc2431d740a79a6bd013babade99d71b1714f (diff)
[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 <amy.griffis@hp.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--kernel/auditsc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 6aff0df75568..41d129a78793 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1289,6 +1289,7 @@ void __audit_getname(const char *name)
1289 context->names[context->name_count].name_len = AUDIT_NAME_FULL; 1289 context->names[context->name_count].name_len = AUDIT_NAME_FULL;
1290 context->names[context->name_count].name_put = 1; 1290 context->names[context->name_count].name_put = 1;
1291 context->names[context->name_count].ino = (unsigned long)-1; 1291 context->names[context->name_count].ino = (unsigned long)-1;
1292 context->names[context->name_count].osid = 0;
1292 ++context->name_count; 1293 ++context->name_count;
1293 if (!context->pwd) { 1294 if (!context->pwd) {
1294 read_lock(&current->fs->lock); 1295 read_lock(&current->fs->lock);