selinux: Remove audit dependency
Auditing comes with a lot of overhead due to string assembly via vsnprintf. It isn't actually needed to make SELinux work, so remove SELinux's artificial dependency on it to make it possible to use SELinux without the unneeded overhead. Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> (cherry picked from commit f87568fb4a75fbc9e0de7cc8ce66a28e36993c40)
This commit is contained in:
parent
f82ad4823f
commit
7d815e0f67
2 changed files with 13 additions and 0 deletions
|
@ -572,6 +572,11 @@ static inline bool audit_loginuid_set(struct task_struct *tsk)
|
|||
return uid_valid(audit_get_loginuid(tsk));
|
||||
}
|
||||
|
||||
static inline int audit_update_lsm_rules(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void audit_log_string(struct audit_buffer *ab, const char *buf)
|
||||
{
|
||||
audit_log_n_string(ab, buf, strlen(buf));
|
||||
|
|
|
@ -101,8 +101,16 @@ int ipv4_skb_to_auditdata(struct sk_buff *skb,
|
|||
int ipv6_skb_to_auditdata(struct sk_buff *skb,
|
||||
struct common_audit_data *ad, u8 *proto);
|
||||
|
||||
#ifdef CONFIG_AUDIT
|
||||
void common_lsm_audit(struct common_audit_data *a,
|
||||
void (*pre_audit)(struct audit_buffer *, void *),
|
||||
void (*post_audit)(struct audit_buffer *, void *));
|
||||
#else
|
||||
static inline void common_lsm_audit(struct common_audit_data *a,
|
||||
void (*pre_audit)(struct audit_buffer *, void *),
|
||||
void (*post_audit)(struct audit_buffer *, void *))
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue