aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAmy Griffis <amy.griffis@hp.com>2006-03-06 22:40:05 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2006-03-20 14:08:55 -0500
commit71e1c784b24a026a490b3de01541fc5ee14ebc09 (patch)
tree7ee3aebf84b5bd1759b2b1925e09de37cb21d97f /kernel
parentbf45da97a45f634422559ec61429dddf4d2fffb9 (diff)
[PATCH] fix audit_init failure path
Make audit_init() failure path handle situations where the audit_panic() action is not AUDIT_FAIL_PANIC (default is AUDIT_FAIL_PRINTK). Other uses of audit_sock are not reached unless audit's netlink message handler is properly registered. Bug noticed by Peter Staubach. Signed-off-by: Amy Griffis <amy.griffis@hp.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index c9345d3e8ada..04fe2e301b61 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -558,8 +558,9 @@ static int __init audit_init(void)
558 THIS_MODULE); 558 THIS_MODULE);
559 if (!audit_sock) 559 if (!audit_sock)
560 audit_panic("cannot initialize netlink socket"); 560 audit_panic("cannot initialize netlink socket");
561 else
562 audit_sock->sk_sndtimeo = MAX_SCHEDULE_TIMEOUT;
561 563
562 audit_sock->sk_sndtimeo = MAX_SCHEDULE_TIMEOUT;
563 skb_queue_head_init(&audit_skb_queue); 564 skb_queue_head_init(&audit_skb_queue);
564 audit_initialized = 1; 565 audit_initialized = 1;
565 audit_enabled = audit_default; 566 audit_enabled = audit_default;