aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorChris Wright <chrisw@osdl.org>2005-05-11 05:52:45 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-11 05:52:45 -0400
commit804a6a49d874841a98ebea3247ad2e672812ad6a (patch)
tree84bd717927666811d55f31346387f8cb99dff346 /kernel
parent5a241d77039a2632e81070619d5733258728f8bd (diff)
Audit requires CONFIG_NET
Audit now actually requires netlink. So make it depend on CONFIG_NET, and remove the inline dependencies on CONFIG_NET. Signed-off-by: Chris Wright <chrisw@osdl.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/audit.c30
-rw-r--r--kernel/auditsc.c2
2 files changed, 0 insertions, 32 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index a5f03cb2c0f5..dc4aba21f30a 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -283,7 +283,6 @@ static int audit_set_failure(int state, uid_t loginuid)
283 return old; 283 return old;
284} 284}
285 285
286#ifdef CONFIG_NET
287void audit_send_reply(int pid, int seq, int type, int done, int multi, 286void audit_send_reply(int pid, int seq, int type, int done, int multi,
288 void *payload, int size) 287 void *payload, int size)
289{ 288{
@@ -531,35 +530,6 @@ static int __init audit_init(void)
531 audit_log(NULL, "initialized"); 530 audit_log(NULL, "initialized");
532 return 0; 531 return 0;
533} 532}
534
535#else
536/* Without CONFIG_NET, we have no skbuffs. For now, print what we have
537 * in the buffer. */
538static void audit_log_move(struct audit_buffer *ab)
539{
540 printk(KERN_ERR "%*.*s\n", ab->len, ab->len, ab->tmp);
541 ab->len = 0;
542}
543
544static inline int audit_log_drain(struct audit_buffer *ab)
545{
546 return 0;
547}
548
549/* Initialize audit support at boot time. */
550int __init audit_init(void)
551{
552 printk(KERN_INFO "audit: initializing WITHOUT netlink support\n");
553 audit_sock = NULL;
554 audit_pid = 0;
555
556 audit_initialized = 1;
557 audit_enabled = audit_default;
558 audit_log(NULL, "initialized");
559 return 0;
560}
561#endif
562
563__initcall(audit_init); 533__initcall(audit_init);
564 534
565/* Process kernel command-line parameter at boot time. audit=0 or audit=1. */ 535/* Process kernel command-line parameter at boot time. audit=0 or audit=1. */
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index f1bf66510cd3..680bb928343b 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -226,7 +226,6 @@ static inline int audit_del_rule(struct audit_rule *rule,
226 return -EFAULT; /* No matching rule */ 226 return -EFAULT; /* No matching rule */
227} 227}
228 228
229#ifdef CONFIG_NET
230/* Copy rule from user-space to kernel-space. Called during 229/* Copy rule from user-space to kernel-space. Called during
231 * AUDIT_ADD. */ 230 * AUDIT_ADD. */
232static int audit_copy_rule(struct audit_rule *d, struct audit_rule *s) 231static int audit_copy_rule(struct audit_rule *d, struct audit_rule *s)
@@ -305,7 +304,6 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data,
305 304
306 return err; 305 return err;
307} 306}
308#endif
309 307
310/* Compare a task_struct with an audit_rule. Return 1 on match, 0 308/* Compare a task_struct with an audit_rule. Return 1 on match, 0
311 * otherwise. */ 309 * otherwise. */