mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 18:11:20 +00:00
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>
This commit is contained in:
parent
5a241d7703
commit
804a6a49d8
3 changed files with 1 additions and 32 deletions
|
@ -164,6 +164,7 @@ config SYSCTL
|
||||||
|
|
||||||
config AUDIT
|
config AUDIT
|
||||||
bool "Auditing support"
|
bool "Auditing support"
|
||||||
|
depends on NET
|
||||||
default y if SECURITY_SELINUX
|
default y if SECURITY_SELINUX
|
||||||
help
|
help
|
||||||
Enable auditing infrastructure that can be used with another
|
Enable auditing infrastructure that can be used with another
|
||||||
|
|
|
@ -283,7 +283,6 @@ static int audit_set_failure(int state, uid_t loginuid)
|
||||||
return old;
|
return old;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NET
|
|
||||||
void audit_send_reply(int pid, int seq, int type, int done, int multi,
|
void audit_send_reply(int pid, int seq, int type, int done, int multi,
|
||||||
void *payload, int size)
|
void *payload, int size)
|
||||||
{
|
{
|
||||||
|
@ -531,35 +530,6 @@ static int __init audit_init(void)
|
||||||
audit_log(NULL, "initialized");
|
audit_log(NULL, "initialized");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
/* Without CONFIG_NET, we have no skbuffs. For now, print what we have
|
|
||||||
* in the buffer. */
|
|
||||||
static void audit_log_move(struct audit_buffer *ab)
|
|
||||||
{
|
|
||||||
printk(KERN_ERR "%*.*s\n", ab->len, ab->len, ab->tmp);
|
|
||||||
ab->len = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline int audit_log_drain(struct audit_buffer *ab)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize audit support at boot time. */
|
|
||||||
int __init audit_init(void)
|
|
||||||
{
|
|
||||||
printk(KERN_INFO "audit: initializing WITHOUT netlink support\n");
|
|
||||||
audit_sock = NULL;
|
|
||||||
audit_pid = 0;
|
|
||||||
|
|
||||||
audit_initialized = 1;
|
|
||||||
audit_enabled = audit_default;
|
|
||||||
audit_log(NULL, "initialized");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
__initcall(audit_init);
|
__initcall(audit_init);
|
||||||
|
|
||||||
/* Process kernel command-line parameter at boot time. audit=0 or audit=1. */
|
/* Process kernel command-line parameter at boot time. audit=0 or audit=1. */
|
||||||
|
|
|
@ -226,7 +226,6 @@ static inline int audit_del_rule(struct audit_rule *rule,
|
||||||
return -EFAULT; /* No matching rule */
|
return -EFAULT; /* No matching rule */
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NET
|
|
||||||
/* Copy rule from user-space to kernel-space. Called during
|
/* Copy rule from user-space to kernel-space. Called during
|
||||||
* AUDIT_ADD. */
|
* AUDIT_ADD. */
|
||||||
static int audit_copy_rule(struct audit_rule *d, struct audit_rule *s)
|
static 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,
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Compare a task_struct with an audit_rule. Return 1 on match, 0
|
/* Compare a task_struct with an audit_rule. Return 1 on match, 0
|
||||||
* otherwise. */
|
* otherwise. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue