2019-05-27 08:55:05 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2005-04-29 16:23:29 +01:00
|
|
|
/* audit.h -- Auditing support
|
2005-04-16 15:20:36 -07:00
|
|
|
*
|
|
|
|
|
* Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
|
|
|
|
|
* All Rights Reserved.
|
|
|
|
|
*
|
|
|
|
|
* Written by Rickard E. (Rik) Faith <faith@redhat.com>
|
|
|
|
|
*/
|
|
|
|
|
#ifndef _LINUX_AUDIT_H_
|
|
|
|
|
#define _LINUX_AUDIT_H_
|
|
|
|
|
|
2006-04-27 00:11:01 +01:00
|
|
|
#include <linux/sched.h>
|
2013-01-11 14:32:13 -08:00
|
|
|
#include <linux/ptrace.h>
|
2021-05-19 16:00:20 -04:00
|
|
|
#include <linux/audit_arch.h>
|
2012-10-13 10:46:48 +01:00
|
|
|
#include <uapi/linux/audit.h>
|
2020-06-04 09:20:49 -04:00
|
|
|
#include <uapi/linux/netfilter/nf_tables.h>
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-08-05 23:48:20 -04:00
|
|
|
#define AUDIT_INO_UNSET ((unsigned long)-1)
|
|
|
|
|
#define AUDIT_DEV_UNSET ((dev_t)-1)
|
|
|
|
|
|
2005-05-06 12:38:39 +01:00
|
|
|
struct audit_sig_info {
|
|
|
|
|
uid_t uid;
|
|
|
|
|
pid_t pid;
|
2020-05-07 13:50:41 -05:00
|
|
|
char ctx[];
|
2005-05-06 12:38:39 +01:00
|
|
|
};
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
struct audit_buffer;
|
|
|
|
|
struct audit_context;
|
|
|
|
|
struct inode;
|
2005-06-24 14:14:05 +01:00
|
|
|
struct netlink_skb_parms;
|
2011-01-10 08:17:10 +02:00
|
|
|
struct path;
|
2006-04-26 14:04:08 -04:00
|
|
|
struct linux_binprm;
|
2006-05-24 16:09:55 -05:00
|
|
|
struct mq_attr;
|
|
|
|
|
struct mqstat;
|
2008-03-01 22:03:14 +02:00
|
|
|
struct audit_watch;
|
|
|
|
|
struct audit_tree;
|
2014-02-28 20:36:55 -08:00
|
|
|
struct sk_buff;
|
2008-03-01 22:03:14 +02:00
|
|
|
|
|
|
|
|
struct audit_krule {
|
2014-12-23 13:02:04 -05:00
|
|
|
u32 pflags;
|
2008-03-01 22:03:14 +02:00
|
|
|
u32 flags;
|
|
|
|
|
u32 listnr;
|
|
|
|
|
u32 action;
|
|
|
|
|
u32 mask[AUDIT_BITMASK_SIZE];
|
|
|
|
|
u32 buflen; /* for data alloc on list rules */
|
|
|
|
|
u32 field_count;
|
|
|
|
|
char *filterkey; /* ties events to rules */
|
|
|
|
|
struct audit_field *fields;
|
|
|
|
|
struct audit_field *arch_f; /* quick access to arch field */
|
|
|
|
|
struct audit_field *inode_f; /* quick access to an inode field */
|
|
|
|
|
struct audit_watch *watch; /* associated watch */
|
|
|
|
|
struct audit_tree *tree; /* associated watched tree */
|
2015-08-05 16:29:37 -04:00
|
|
|
struct audit_fsnotify_mark *exe;
|
2008-03-01 22:03:14 +02:00
|
|
|
struct list_head rlist; /* entry in audit_{watch,tree}.rules list */
|
2008-12-15 01:17:50 -05:00
|
|
|
struct list_head list; /* for AUDIT_LIST* purposes only */
|
2008-12-14 23:45:27 -05:00
|
|
|
u64 prio;
|
2008-03-01 22:03:14 +02:00
|
|
|
};
|
|
|
|
|
|
2014-12-23 13:02:04 -05:00
|
|
|
/* Flag to indicate legacy AUDIT_LOGINUID unset usage */
|
|
|
|
|
#define AUDIT_LOGINUID_LEGACY 0x1
|
|
|
|
|
|
2008-03-01 22:03:14 +02:00
|
|
|
struct audit_field {
|
|
|
|
|
u32 type;
|
2014-03-26 07:26:47 -04:00
|
|
|
union {
|
|
|
|
|
u32 val;
|
|
|
|
|
kuid_t uid;
|
|
|
|
|
kgid_t gid;
|
|
|
|
|
struct {
|
|
|
|
|
char *lsm_str;
|
|
|
|
|
void *lsm_rule;
|
|
|
|
|
};
|
|
|
|
|
};
|
2008-03-01 22:03:14 +02:00
|
|
|
u32 op;
|
|
|
|
|
};
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-04-10 11:14:20 +02:00
|
|
|
enum audit_ntp_type {
|
|
|
|
|
AUDIT_NTP_OFFSET,
|
|
|
|
|
AUDIT_NTP_FREQ,
|
|
|
|
|
AUDIT_NTP_STATUS,
|
|
|
|
|
AUDIT_NTP_TAI,
|
|
|
|
|
AUDIT_NTP_TICK,
|
|
|
|
|
AUDIT_NTP_ADJUST,
|
|
|
|
|
|
|
|
|
|
AUDIT_NTP_NVALS /* count */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_AUDITSYSCALL
|
|
|
|
|
struct audit_ntp_val {
|
|
|
|
|
long long oldval, newval;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct audit_ntp_data {
|
|
|
|
|
struct audit_ntp_val vals[AUDIT_NTP_NVALS];
|
|
|
|
|
};
|
|
|
|
|
#else
|
|
|
|
|
struct audit_ntp_data {};
|
|
|
|
|
#endif
|
|
|
|
|
|
2020-04-22 17:39:28 -04:00
|
|
|
enum audit_nfcfgop {
|
|
|
|
|
AUDIT_XT_OP_REGISTER,
|
|
|
|
|
AUDIT_XT_OP_REPLACE,
|
2020-04-22 17:39:29 -04:00
|
|
|
AUDIT_XT_OP_UNREGISTER,
|
2020-06-04 09:20:49 -04:00
|
|
|
AUDIT_NFT_OP_TABLE_REGISTER,
|
|
|
|
|
AUDIT_NFT_OP_TABLE_UNREGISTER,
|
|
|
|
|
AUDIT_NFT_OP_CHAIN_REGISTER,
|
|
|
|
|
AUDIT_NFT_OP_CHAIN_UNREGISTER,
|
|
|
|
|
AUDIT_NFT_OP_RULE_REGISTER,
|
|
|
|
|
AUDIT_NFT_OP_RULE_UNREGISTER,
|
|
|
|
|
AUDIT_NFT_OP_SET_REGISTER,
|
|
|
|
|
AUDIT_NFT_OP_SET_UNREGISTER,
|
|
|
|
|
AUDIT_NFT_OP_SETELEM_REGISTER,
|
|
|
|
|
AUDIT_NFT_OP_SETELEM_UNREGISTER,
|
|
|
|
|
AUDIT_NFT_OP_GEN_REGISTER,
|
|
|
|
|
AUDIT_NFT_OP_OBJ_REGISTER,
|
|
|
|
|
AUDIT_NFT_OP_OBJ_UNREGISTER,
|
|
|
|
|
AUDIT_NFT_OP_OBJ_RESET,
|
|
|
|
|
AUDIT_NFT_OP_FLOWTABLE_REGISTER,
|
|
|
|
|
AUDIT_NFT_OP_FLOWTABLE_UNREGISTER,
|
|
|
|
|
AUDIT_NFT_OP_INVALID,
|
2020-04-22 17:39:28 -04:00
|
|
|
};
|
|
|
|
|
|
2013-05-22 12:54:49 -04:00
|
|
|
extern int is_audit_feature_set(int which);
|
|
|
|
|
|
2006-07-01 03:56:16 -04:00
|
|
|
extern int __init audit_register_class(int class, unsigned *list);
|
2006-08-31 19:26:40 -04:00
|
|
|
extern int audit_classify_syscall(int abi, unsigned syscall);
|
2007-03-29 18:01:04 -04:00
|
|
|
extern int audit_classify_arch(int arch);
|
2014-03-15 14:48:00 +09:00
|
|
|
/* only for compat system calls */
|
|
|
|
|
extern unsigned compat_write_class[];
|
|
|
|
|
extern unsigned compat_read_class[];
|
|
|
|
|
extern unsigned compat_dir_class[];
|
|
|
|
|
extern unsigned compat_chattr_class[];
|
|
|
|
|
extern unsigned compat_signal_class[];
|
|
|
|
|
|
2014-10-13 18:58:48 -06:00
|
|
|
extern int audit_classify_compat_syscall(int abi, unsigned syscall);
|
2012-10-10 15:25:22 -04:00
|
|
|
|
|
|
|
|
/* audit_names->type values */
|
|
|
|
|
#define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */
|
|
|
|
|
#define AUDIT_TYPE_NORMAL 1 /* a "normal" audit record */
|
2012-10-10 15:25:23 -04:00
|
|
|
#define AUDIT_TYPE_PARENT 2 /* a parent audit record */
|
2012-10-10 15:25:25 -04:00
|
|
|
#define AUDIT_TYPE_CHILD_DELETE 3 /* a child being deleted */
|
|
|
|
|
#define AUDIT_TYPE_CHILD_CREATE 4 /* a child being created */
|
2012-10-10 15:25:22 -04:00
|
|
|
|
2013-04-07 16:55:23 +08:00
|
|
|
/* maximized args number that audit_socketcall can process */
|
|
|
|
|
#define AUDITSC_ARGS 6
|
|
|
|
|
|
2016-01-09 22:55:33 -08:00
|
|
|
/* bit values for ->signal->audit_tty */
|
|
|
|
|
#define AUDIT_TTY_ENABLE BIT(0)
|
|
|
|
|
#define AUDIT_TTY_LOG_PASSWD BIT(1)
|
|
|
|
|
|
2012-10-10 15:25:28 -04:00
|
|
|
struct filename;
|
|
|
|
|
|
2018-06-05 19:20:39 -04:00
|
|
|
#define AUDIT_OFF 0
|
|
|
|
|
#define AUDIT_ON 1
|
|
|
|
|
#define AUDIT_LOCKED 2
|
2016-01-13 09:18:55 -05:00
|
|
|
#ifdef CONFIG_AUDIT
|
|
|
|
|
/* These are defined in audit.c */
|
|
|
|
|
/* Public API */
|
|
|
|
|
extern __printf(4, 5)
|
|
|
|
|
void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
|
|
|
|
|
const char *fmt, ...);
|
|
|
|
|
|
|
|
|
|
extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
|
|
|
|
|
extern __printf(2, 3)
|
|
|
|
|
void audit_log_format(struct audit_buffer *ab, const char *fmt, ...);
|
|
|
|
|
extern void audit_log_end(struct audit_buffer *ab);
|
|
|
|
|
extern bool audit_string_contains_control(const char *string,
|
|
|
|
|
size_t len);
|
|
|
|
|
extern void audit_log_n_hex(struct audit_buffer *ab,
|
|
|
|
|
const unsigned char *buf,
|
|
|
|
|
size_t len);
|
|
|
|
|
extern void audit_log_n_string(struct audit_buffer *ab,
|
|
|
|
|
const char *buf,
|
|
|
|
|
size_t n);
|
|
|
|
|
extern void audit_log_n_untrustedstring(struct audit_buffer *ab,
|
|
|
|
|
const char *string,
|
|
|
|
|
size_t n);
|
|
|
|
|
extern void audit_log_untrustedstring(struct audit_buffer *ab,
|
|
|
|
|
const char *string);
|
|
|
|
|
extern void audit_log_d_path(struct audit_buffer *ab,
|
|
|
|
|
const char *prefix,
|
|
|
|
|
const struct path *path);
|
|
|
|
|
extern void audit_log_key(struct audit_buffer *ab,
|
|
|
|
|
char *key);
|
2019-10-02 16:41:58 -07:00
|
|
|
extern void audit_log_path_denied(int type,
|
|
|
|
|
const char *operation);
|
2016-01-13 09:18:55 -05:00
|
|
|
extern void audit_log_lost(const char *message);
|
|
|
|
|
|
|
|
|
|
extern int audit_log_task_context(struct audit_buffer *ab);
|
2018-11-26 18:40:07 -05:00
|
|
|
extern void audit_log_task_info(struct audit_buffer *ab);
|
2016-01-13 09:18:55 -05:00
|
|
|
|
|
|
|
|
extern int audit_update_lsm_rules(void);
|
|
|
|
|
|
|
|
|
|
/* Private API (for audit.c only) */
|
2017-05-02 10:16:05 -04:00
|
|
|
extern int audit_rule_change(int type, int seq, void *data, size_t datasz);
|
2016-01-13 09:18:55 -05:00
|
|
|
extern int audit_list_rules_send(struct sk_buff *request_skb, int seq);
|
|
|
|
|
|
2019-01-22 17:06:39 -05:00
|
|
|
extern int audit_set_loginuid(kuid_t loginuid);
|
|
|
|
|
|
|
|
|
|
static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
|
|
|
|
|
{
|
|
|
|
|
return tsk->loginuid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline unsigned int audit_get_sessionid(struct task_struct *tsk)
|
|
|
|
|
{
|
|
|
|
|
return tsk->sessionid;
|
|
|
|
|
}
|
|
|
|
|
|
2016-01-13 09:18:55 -05:00
|
|
|
extern u32 audit_enabled;
|
2019-05-10 12:21:49 -04:00
|
|
|
|
|
|
|
|
extern int audit_signal_info(int sig, struct task_struct *t);
|
|
|
|
|
|
2016-01-13 09:18:55 -05:00
|
|
|
#else /* CONFIG_AUDIT */
|
|
|
|
|
static inline __printf(4, 5)
|
|
|
|
|
void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
|
|
|
|
|
const char *fmt, ...)
|
|
|
|
|
{ }
|
|
|
|
|
static inline struct audit_buffer *audit_log_start(struct audit_context *ctx,
|
|
|
|
|
gfp_t gfp_mask, int type)
|
|
|
|
|
{
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
static inline __printf(2, 3)
|
|
|
|
|
void audit_log_format(struct audit_buffer *ab, const char *fmt, ...)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_log_end(struct audit_buffer *ab)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_log_n_hex(struct audit_buffer *ab,
|
|
|
|
|
const unsigned char *buf, size_t len)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_log_n_string(struct audit_buffer *ab,
|
|
|
|
|
const char *buf, size_t n)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_log_n_untrustedstring(struct audit_buffer *ab,
|
|
|
|
|
const char *string, size_t n)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_log_untrustedstring(struct audit_buffer *ab,
|
|
|
|
|
const char *string)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_log_d_path(struct audit_buffer *ab,
|
|
|
|
|
const char *prefix,
|
|
|
|
|
const struct path *path)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_log_key(struct audit_buffer *ab, char *key)
|
|
|
|
|
{ }
|
2019-10-02 16:41:58 -07:00
|
|
|
static inline void audit_log_path_denied(int type, const char *operation)
|
2016-01-13 09:18:55 -05:00
|
|
|
{ }
|
|
|
|
|
static inline int audit_log_task_context(struct audit_buffer *ab)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2018-11-26 18:40:07 -05:00
|
|
|
static inline void audit_log_task_info(struct audit_buffer *ab)
|
2016-01-13 09:18:55 -05:00
|
|
|
{ }
|
2019-01-22 17:06:39 -05:00
|
|
|
|
|
|
|
|
static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
|
|
|
|
|
{
|
|
|
|
|
return INVALID_UID;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline unsigned int audit_get_sessionid(struct task_struct *tsk)
|
|
|
|
|
{
|
|
|
|
|
return AUDIT_SID_UNSET;
|
|
|
|
|
}
|
|
|
|
|
|
2018-06-05 19:20:39 -04:00
|
|
|
#define audit_enabled AUDIT_OFF
|
2019-05-10 12:21:49 -04:00
|
|
|
|
|
|
|
|
static inline int audit_signal_info(int sig, struct task_struct *t)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2016-01-13 09:18:55 -05:00
|
|
|
#endif /* CONFIG_AUDIT */
|
|
|
|
|
|
2014-03-25 09:25:41 -04:00
|
|
|
#ifdef CONFIG_AUDIT_COMPAT_GENERIC
|
2014-03-24 12:13:48 -04:00
|
|
|
#define audit_is_compat(arch) (!((arch) & __AUDIT_ARCH_64BIT))
|
|
|
|
|
#else
|
|
|
|
|
#define audit_is_compat(arch) false
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-07-14 13:22:27 -04:00
|
|
|
#define AUDIT_INODE_PARENT 1 /* dentry represents the parent */
|
|
|
|
|
#define AUDIT_INODE_HIDDEN 2 /* audit record should be hidden */
|
|
|
|
|
#define AUDIT_INODE_NOEVAL 4 /* audit record incomplete */
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
#ifdef CONFIG_AUDITSYSCALL
|
2014-04-22 11:46:16 -04:00
|
|
|
#include <asm/syscall.h> /* for syscall_get_arch() */
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
/* These are defined in auditsc.c */
|
|
|
|
|
/* Public API */
|
|
|
|
|
extern int audit_alloc(struct task_struct *task);
|
2021-02-16 19:46:48 -05:00
|
|
|
extern int audit_alloc_kernel(struct task_struct *task);
|
2012-01-03 14:23:07 -05:00
|
|
|
extern void __audit_free(struct task_struct *task);
|
2021-02-16 19:46:48 -05:00
|
|
|
extern void __audit_uring_entry(u8 op);
|
|
|
|
|
extern void __audit_uring_exit(int success, long code);
|
2014-03-04 10:38:06 -05:00
|
|
|
extern void __audit_syscall_entry(int major, unsigned long a0, unsigned long a1,
|
2012-01-03 14:23:06 -05:00
|
|
|
unsigned long a2, unsigned long a3);
|
2012-01-03 14:23:06 -05:00
|
|
|
extern void __audit_syscall_exit(int ret_success, long ret_value);
|
2012-10-10 15:25:28 -04:00
|
|
|
extern struct filename *__audit_reusename(const __user char *uptr);
|
2012-10-10 15:25:28 -04:00
|
|
|
extern void __audit_getname(struct filename *name);
|
2012-10-10 16:43:13 -04:00
|
|
|
extern void __audit_inode(struct filename *name, const struct dentry *dentry,
|
2013-07-08 15:59:36 -07:00
|
|
|
unsigned int flags);
|
2014-10-31 17:44:57 -04:00
|
|
|
extern void __audit_file(const struct file *);
|
2015-12-24 11:09:39 -05:00
|
|
|
extern void __audit_inode_child(struct inode *parent,
|
2012-10-10 15:25:25 -04:00
|
|
|
const struct dentry *dentry,
|
|
|
|
|
const unsigned char type);
|
2018-05-04 01:08:15 +00:00
|
|
|
extern void audit_seccomp(unsigned long syscall, long signr, int code);
|
2018-05-04 01:08:14 +00:00
|
|
|
extern void audit_seccomp_actions_logged(const char *names,
|
|
|
|
|
const char *old_names, int res);
|
2007-03-20 13:58:35 -04:00
|
|
|
extern void __audit_ptrace(struct task_struct *t);
|
|
|
|
|
|
2018-05-12 21:58:21 -04:00
|
|
|
static inline void audit_set_context(struct task_struct *task, struct audit_context *ctx)
|
|
|
|
|
{
|
|
|
|
|
task->audit_context = ctx;
|
|
|
|
|
}
|
|
|
|
|
|
2018-05-12 21:58:20 -04:00
|
|
|
static inline struct audit_context *audit_context(void)
|
|
|
|
|
{
|
|
|
|
|
return current->audit_context;
|
|
|
|
|
}
|
|
|
|
|
|
2015-11-04 08:23:51 -05:00
|
|
|
static inline bool audit_dummy_context(void)
|
2006-08-03 10:59:26 -04:00
|
|
|
{
|
2018-05-12 21:58:20 -04:00
|
|
|
void *p = audit_context();
|
2006-08-03 10:59:26 -04:00
|
|
|
return !p || *(int *)p;
|
|
|
|
|
}
|
2012-01-03 14:23:07 -05:00
|
|
|
static inline void audit_free(struct task_struct *task)
|
|
|
|
|
{
|
|
|
|
|
if (unlikely(task->audit_context))
|
|
|
|
|
__audit_free(task);
|
|
|
|
|
}
|
2021-02-16 19:46:48 -05:00
|
|
|
static inline void audit_uring_entry(u8 op)
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* We intentionally check audit_context() before audit_enabled as most
|
|
|
|
|
* Linux systems (as of ~2021) rely on systemd which forces audit to
|
|
|
|
|
* be enabled regardless of the user's audit configuration.
|
|
|
|
|
*/
|
|
|
|
|
if (unlikely(audit_context() && audit_enabled))
|
|
|
|
|
__audit_uring_entry(op);
|
|
|
|
|
}
|
|
|
|
|
static inline void audit_uring_exit(int success, long code)
|
|
|
|
|
{
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
|
|
|
|
__audit_uring_exit(success, code);
|
|
|
|
|
}
|
2014-03-11 13:29:28 -04:00
|
|
|
static inline void audit_syscall_entry(int major, unsigned long a0,
|
2012-01-03 14:23:06 -05:00
|
|
|
unsigned long a1, unsigned long a2,
|
|
|
|
|
unsigned long a3)
|
|
|
|
|
{
|
2018-05-12 21:58:20 -04:00
|
|
|
if (unlikely(audit_context()))
|
2014-03-04 10:38:06 -05:00
|
|
|
__audit_syscall_entry(major, a0, a1, a2, a3);
|
2012-01-03 14:23:06 -05:00
|
|
|
}
|
2012-01-03 14:23:06 -05:00
|
|
|
static inline void audit_syscall_exit(void *pt_regs)
|
|
|
|
|
{
|
2018-05-12 21:58:20 -04:00
|
|
|
if (unlikely(audit_context())) {
|
2012-01-03 14:23:06 -05:00
|
|
|
int success = is_syscall_success(pt_regs);
|
2014-01-13 13:33:09 -08:00
|
|
|
long return_code = regs_return_value(pt_regs);
|
2012-01-03 14:23:06 -05:00
|
|
|
|
|
|
|
|
__audit_syscall_exit(success, return_code);
|
|
|
|
|
}
|
|
|
|
|
}
|
2012-10-10 15:25:28 -04:00
|
|
|
static inline struct filename *audit_reusename(const __user char *name)
|
|
|
|
|
{
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
|
|
|
|
return __audit_reusename(name);
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
2012-10-10 15:25:28 -04:00
|
|
|
static inline void audit_getname(struct filename *name)
|
2006-05-18 16:01:30 -04:00
|
|
|
{
|
2006-07-16 06:38:45 -04:00
|
|
|
if (unlikely(!audit_dummy_context()))
|
2006-05-18 16:01:30 -04:00
|
|
|
__audit_getname(name);
|
|
|
|
|
}
|
2013-07-08 15:59:36 -07:00
|
|
|
static inline void audit_inode(struct filename *name,
|
|
|
|
|
const struct dentry *dentry,
|
2019-07-14 13:22:27 -04:00
|
|
|
unsigned int aflags) {
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
2019-01-23 13:35:00 -05:00
|
|
|
__audit_inode(name, dentry, aflags);
|
2013-07-08 15:59:36 -07:00
|
|
|
}
|
2014-10-31 17:44:57 -04:00
|
|
|
static inline void audit_file(struct file *file)
|
|
|
|
|
{
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
|
|
|
|
__audit_file(file);
|
|
|
|
|
}
|
2013-07-08 15:59:36 -07:00
|
|
|
static inline void audit_inode_parent_hidden(struct filename *name,
|
|
|
|
|
const struct dentry *dentry)
|
|
|
|
|
{
|
2006-07-16 06:38:45 -04:00
|
|
|
if (unlikely(!audit_dummy_context()))
|
2013-07-08 15:59:36 -07:00
|
|
|
__audit_inode(name, dentry,
|
|
|
|
|
AUDIT_INODE_PARENT | AUDIT_INODE_HIDDEN);
|
2005-11-03 16:00:25 +00:00
|
|
|
}
|
2015-12-24 11:09:39 -05:00
|
|
|
static inline void audit_inode_child(struct inode *parent,
|
2012-10-10 15:25:25 -04:00
|
|
|
const struct dentry *dentry,
|
|
|
|
|
const unsigned char type) {
|
2006-07-16 06:38:45 -04:00
|
|
|
if (unlikely(!audit_dummy_context()))
|
2012-10-10 15:25:25 -04:00
|
|
|
__audit_inode_child(parent, dentry, type);
|
2005-11-03 16:00:25 +00:00
|
|
|
}
|
2007-04-19 10:28:21 -04:00
|
|
|
void audit_core_dumps(long signr);
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2007-03-20 13:58:35 -04:00
|
|
|
static inline void audit_ptrace(struct task_struct *t)
|
|
|
|
|
{
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
|
|
|
|
__audit_ptrace(t);
|
|
|
|
|
}
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
/* Private API (for audit.c only) */
|
2008-12-10 03:40:06 -05:00
|
|
|
extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
|
2011-07-27 14:03:22 -04:00
|
|
|
extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode);
|
2013-10-30 17:56:13 -04:00
|
|
|
extern void __audit_bprm(struct linux_binprm *bprm);
|
2013-04-07 16:55:23 +08:00
|
|
|
extern int __audit_socketcall(int nargs, unsigned long *args);
|
2012-01-03 14:23:07 -05:00
|
|
|
extern int __audit_sockaddr(int len, void *addr);
|
2008-12-14 04:57:47 -05:00
|
|
|
extern void __audit_fd_pair(int fd1, int fd2);
|
2011-07-26 05:26:10 -04:00
|
|
|
extern void __audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr);
|
2017-08-02 19:51:11 -07:00
|
|
|
extern void __audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec64 *abs_timeout);
|
2008-12-10 07:16:12 -05:00
|
|
|
extern void __audit_mq_notify(mqd_t mqdes, const struct sigevent *notification);
|
2008-12-10 06:58:59 -05:00
|
|
|
extern void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat);
|
2008-11-14 10:39:23 +11:00
|
|
|
extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
|
|
|
|
|
const struct cred *new,
|
|
|
|
|
const struct cred *old);
|
2013-03-19 00:02:25 -07:00
|
|
|
extern void __audit_log_capset(const struct cred *new, const struct cred *old);
|
2010-10-30 02:54:44 -04:00
|
|
|
extern void __audit_mmap_fd(int fd, int flags);
|
2021-05-19 16:00:22 -04:00
|
|
|
extern void __audit_openat2_how(struct open_how *how);
|
2017-02-04 13:10:38 -05:00
|
|
|
extern void __audit_log_kern_module(char *name);
|
2017-10-02 20:21:39 -04:00
|
|
|
extern void __audit_fanotify(unsigned int response);
|
2019-04-10 11:14:19 +02:00
|
|
|
extern void __audit_tk_injoffset(struct timespec64 offset);
|
2019-04-10 11:14:20 +02:00
|
|
|
extern void __audit_ntp_log(const struct audit_ntp_data *ad);
|
2020-04-22 17:39:28 -04:00
|
|
|
extern void __audit_log_nfcfg(const char *name, u8 af, unsigned int nentries,
|
2020-06-27 23:24:19 -04:00
|
|
|
enum audit_nfcfgop op, gfp_t gfp);
|
2006-05-18 16:01:30 -04:00
|
|
|
|
2008-12-10 03:40:06 -05:00
|
|
|
static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
|
2006-05-18 16:01:30 -04:00
|
|
|
{
|
2006-07-16 06:38:45 -04:00
|
|
|
if (unlikely(!audit_dummy_context()))
|
2008-12-10 03:40:06 -05:00
|
|
|
__audit_ipc_obj(ipcp);
|
2006-05-18 16:01:30 -04:00
|
|
|
}
|
2008-12-14 04:57:47 -05:00
|
|
|
static inline void audit_fd_pair(int fd1, int fd2)
|
2007-02-07 01:48:00 -05:00
|
|
|
{
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
2008-12-14 04:57:47 -05:00
|
|
|
__audit_fd_pair(fd1, fd2);
|
2007-02-07 01:48:00 -05:00
|
|
|
}
|
2011-07-27 14:03:22 -04:00
|
|
|
static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode)
|
2006-05-18 16:01:30 -04:00
|
|
|
{
|
2006-07-16 06:38:45 -04:00
|
|
|
if (unlikely(!audit_dummy_context()))
|
2008-12-10 03:47:15 -05:00
|
|
|
__audit_ipc_set_perm(qbytes, uid, gid, mode);
|
2006-05-18 16:01:30 -04:00
|
|
|
}
|
2013-10-30 18:05:24 -04:00
|
|
|
static inline void audit_bprm(struct linux_binprm *bprm)
|
2012-01-03 14:23:07 -05:00
|
|
|
{
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
2013-10-30 17:56:13 -04:00
|
|
|
__audit_bprm(bprm);
|
2012-01-03 14:23:07 -05:00
|
|
|
}
|
2013-04-07 16:55:23 +08:00
|
|
|
static inline int audit_socketcall(int nargs, unsigned long *args)
|
2012-01-03 14:23:07 -05:00
|
|
|
{
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
2013-04-07 16:55:23 +08:00
|
|
|
return __audit_socketcall(nargs, args);
|
|
|
|
|
return 0;
|
2012-01-03 14:23:07 -05:00
|
|
|
}
|
2017-01-17 11:07:15 -05:00
|
|
|
|
|
|
|
|
static inline int audit_socketcall_compat(int nargs, u32 *args)
|
|
|
|
|
{
|
|
|
|
|
unsigned long a[AUDITSC_ARGS];
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
if (audit_dummy_context())
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < nargs; i++)
|
|
|
|
|
a[i] = (unsigned long)args[i];
|
|
|
|
|
return __audit_socketcall(nargs, a);
|
|
|
|
|
}
|
|
|
|
|
|
2012-01-03 14:23:07 -05:00
|
|
|
static inline int audit_sockaddr(int len, void *addr)
|
|
|
|
|
{
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
|
|
|
|
return __audit_sockaddr(len, addr);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2011-07-26 05:26:10 -04:00
|
|
|
static inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr)
|
2006-05-24 16:09:55 -05:00
|
|
|
{
|
2006-07-16 06:38:45 -04:00
|
|
|
if (unlikely(!audit_dummy_context()))
|
2008-12-14 04:02:26 -05:00
|
|
|
__audit_mq_open(oflag, mode, attr);
|
2006-05-24 16:09:55 -05:00
|
|
|
}
|
2017-08-02 19:51:11 -07:00
|
|
|
static inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec64 *abs_timeout)
|
2006-05-24 16:09:55 -05:00
|
|
|
{
|
2006-07-16 06:38:45 -04:00
|
|
|
if (unlikely(!audit_dummy_context()))
|
2008-12-14 03:46:48 -05:00
|
|
|
__audit_mq_sendrecv(mqdes, msg_len, msg_prio, abs_timeout);
|
2006-05-24 16:09:55 -05:00
|
|
|
}
|
2008-12-10 07:16:12 -05:00
|
|
|
static inline void audit_mq_notify(mqd_t mqdes, const struct sigevent *notification)
|
2006-05-24 16:09:55 -05:00
|
|
|
{
|
2006-07-16 06:38:45 -04:00
|
|
|
if (unlikely(!audit_dummy_context()))
|
2008-12-10 07:16:12 -05:00
|
|
|
__audit_mq_notify(mqdes, notification);
|
2006-05-24 16:09:55 -05:00
|
|
|
}
|
2008-12-10 06:58:59 -05:00
|
|
|
static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
|
2006-05-24 16:09:55 -05:00
|
|
|
{
|
2006-07-16 06:38:45 -04:00
|
|
|
if (unlikely(!audit_dummy_context()))
|
2008-12-10 06:58:59 -05:00
|
|
|
__audit_mq_getsetattr(mqdes, mqstat);
|
2006-05-24 16:09:55 -05:00
|
|
|
}
|
2008-11-11 21:48:18 +11:00
|
|
|
|
2008-11-14 10:39:23 +11:00
|
|
|
static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
|
|
|
|
|
const struct cred *new,
|
|
|
|
|
const struct cred *old)
|
2008-11-11 21:48:18 +11:00
|
|
|
{
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
2008-11-14 10:39:23 +11:00
|
|
|
return __audit_log_bprm_fcaps(bprm, new, old);
|
|
|
|
|
return 0;
|
2008-11-11 21:48:18 +11:00
|
|
|
}
|
|
|
|
|
|
2013-03-19 00:02:25 -07:00
|
|
|
static inline void audit_log_capset(const struct cred *new,
|
2008-11-14 10:39:23 +11:00
|
|
|
const struct cred *old)
|
2008-11-11 21:48:22 +11:00
|
|
|
{
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
2013-03-19 00:02:25 -07:00
|
|
|
__audit_log_capset(new, old);
|
2008-11-11 21:48:22 +11:00
|
|
|
}
|
|
|
|
|
|
2010-10-30 02:54:44 -04:00
|
|
|
static inline void audit_mmap_fd(int fd, int flags)
|
|
|
|
|
{
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
|
|
|
|
__audit_mmap_fd(fd, flags);
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-19 16:00:22 -04:00
|
|
|
static inline void audit_openat2_how(struct open_how *how)
|
|
|
|
|
{
|
|
|
|
|
if (unlikely(!audit_dummy_context()))
|
|
|
|
|
__audit_openat2_how(how);
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-04 13:10:38 -05:00
|
|
|
static inline void audit_log_kern_module(char *name)
|
|
|
|
|
{
|
|
|
|
|
if (!audit_dummy_context())
|
|
|
|
|
__audit_log_kern_module(name);
|
|
|
|
|
}
|
|
|
|
|
|
2017-10-02 20:21:39 -04:00
|
|
|
static inline void audit_fanotify(unsigned int response)
|
|
|
|
|
{
|
|
|
|
|
if (!audit_dummy_context())
|
|
|
|
|
__audit_fanotify(response);
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-10 11:14:19 +02:00
|
|
|
static inline void audit_tk_injoffset(struct timespec64 offset)
|
|
|
|
|
{
|
|
|
|
|
/* ignore no-op events */
|
|
|
|
|
if (offset.tv_sec == 0 && offset.tv_nsec == 0)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (!audit_dummy_context())
|
|
|
|
|
__audit_tk_injoffset(offset);
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-10 11:14:20 +02:00
|
|
|
static inline void audit_ntp_init(struct audit_ntp_data *ad)
|
|
|
|
|
{
|
|
|
|
|
memset(ad, 0, sizeof(*ad));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline void audit_ntp_set_old(struct audit_ntp_data *ad,
|
|
|
|
|
enum audit_ntp_type type, long long val)
|
|
|
|
|
{
|
|
|
|
|
ad->vals[type].oldval = val;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline void audit_ntp_set_new(struct audit_ntp_data *ad,
|
|
|
|
|
enum audit_ntp_type type, long long val)
|
|
|
|
|
{
|
|
|
|
|
ad->vals[type].newval = val;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static inline void audit_ntp_log(const struct audit_ntp_data *ad)
|
|
|
|
|
{
|
|
|
|
|
if (!audit_dummy_context())
|
|
|
|
|
__audit_ntp_log(ad);
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-22 17:39:28 -04:00
|
|
|
static inline void audit_log_nfcfg(const char *name, u8 af,
|
|
|
|
|
unsigned int nentries,
|
2020-06-27 23:24:19 -04:00
|
|
|
enum audit_nfcfgop op, gfp_t gfp)
|
2020-04-22 17:39:28 -04:00
|
|
|
{
|
|
|
|
|
if (audit_enabled)
|
2020-06-27 23:24:19 -04:00
|
|
|
__audit_log_nfcfg(name, af, nentries, op, gfp);
|
2020-04-22 17:39:28 -04:00
|
|
|
}
|
|
|
|
|
|
2006-07-10 08:29:24 -04:00
|
|
|
extern int audit_n_rules;
|
2007-03-29 18:01:04 -04:00
|
|
|
extern int audit_signals;
|
2012-01-03 14:23:06 -05:00
|
|
|
#else /* CONFIG_AUDITSYSCALL */
|
2012-10-04 17:11:11 -07:00
|
|
|
static inline int audit_alloc(struct task_struct *task)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2021-02-16 19:46:48 -05:00
|
|
|
static inline int audit_alloc_kernel(struct task_struct *task)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2012-10-04 17:11:11 -07:00
|
|
|
static inline void audit_free(struct task_struct *task)
|
|
|
|
|
{ }
|
2021-02-16 19:46:48 -05:00
|
|
|
static inline void audit_uring_entry(u8 op)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_uring_exit(int success, long code)
|
|
|
|
|
{ }
|
2014-03-11 13:29:28 -04:00
|
|
|
static inline void audit_syscall_entry(int major, unsigned long a0,
|
2012-10-04 17:11:11 -07:00
|
|
|
unsigned long a1, unsigned long a2,
|
|
|
|
|
unsigned long a3)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_syscall_exit(void *pt_regs)
|
|
|
|
|
{ }
|
2015-11-04 08:23:51 -05:00
|
|
|
static inline bool audit_dummy_context(void)
|
2012-10-04 17:11:11 -07:00
|
|
|
{
|
2015-11-04 08:23:51 -05:00
|
|
|
return true;
|
2012-10-04 17:11:11 -07:00
|
|
|
}
|
2018-05-12 21:58:21 -04:00
|
|
|
static inline void audit_set_context(struct task_struct *task, struct audit_context *ctx)
|
|
|
|
|
{ }
|
2018-05-12 21:58:20 -04:00
|
|
|
static inline struct audit_context *audit_context(void)
|
|
|
|
|
{
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
2012-10-10 15:25:28 -04:00
|
|
|
static inline struct filename *audit_reusename(const __user char *name)
|
|
|
|
|
{
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
2012-10-10 15:25:28 -04:00
|
|
|
static inline void audit_getname(struct filename *name)
|
2012-10-04 17:11:11 -07:00
|
|
|
{ }
|
2012-10-10 16:43:13 -04:00
|
|
|
static inline void audit_inode(struct filename *name,
|
|
|
|
|
const struct dentry *dentry,
|
2019-07-14 13:22:27 -04:00
|
|
|
unsigned int aflags)
|
2012-10-04 17:11:11 -07:00
|
|
|
{ }
|
2014-10-31 17:44:57 -04:00
|
|
|
static inline void audit_file(struct file *file)
|
|
|
|
|
{
|
|
|
|
|
}
|
2013-07-08 15:59:36 -07:00
|
|
|
static inline void audit_inode_parent_hidden(struct filename *name,
|
|
|
|
|
const struct dentry *dentry)
|
|
|
|
|
{ }
|
2015-12-24 11:09:39 -05:00
|
|
|
static inline void audit_inode_child(struct inode *parent,
|
2012-10-10 15:25:25 -04:00
|
|
|
const struct dentry *dentry,
|
|
|
|
|
const unsigned char type)
|
2012-10-04 17:11:11 -07:00
|
|
|
{ }
|
|
|
|
|
static inline void audit_core_dumps(long signr)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_seccomp(unsigned long syscall, long signr, int code)
|
|
|
|
|
{ }
|
2018-05-04 01:08:14 +00:00
|
|
|
static inline void audit_seccomp_actions_logged(const char *names,
|
|
|
|
|
const char *old_names, int res)
|
|
|
|
|
{ }
|
2012-10-04 17:11:11 -07:00
|
|
|
static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
|
|
|
|
|
gid_t gid, umode_t mode)
|
|
|
|
|
{ }
|
2013-10-30 18:05:24 -04:00
|
|
|
static inline void audit_bprm(struct linux_binprm *bprm)
|
|
|
|
|
{ }
|
2013-04-07 16:55:23 +08:00
|
|
|
static inline int audit_socketcall(int nargs, unsigned long *args)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2017-01-17 11:07:15 -05:00
|
|
|
|
|
|
|
|
static inline int audit_socketcall_compat(int nargs, u32 *args)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2012-10-04 17:11:11 -07:00
|
|
|
static inline void audit_fd_pair(int fd1, int fd2)
|
|
|
|
|
{ }
|
|
|
|
|
static inline int audit_sockaddr(int len, void *addr)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
static inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len,
|
|
|
|
|
unsigned int msg_prio,
|
2017-08-02 19:51:11 -07:00
|
|
|
const struct timespec64 *abs_timeout)
|
2012-10-04 17:11:11 -07:00
|
|
|
{ }
|
|
|
|
|
static inline void audit_mq_notify(mqd_t mqdes,
|
|
|
|
|
const struct sigevent *notification)
|
|
|
|
|
{ }
|
|
|
|
|
static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
|
|
|
|
|
{ }
|
|
|
|
|
static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
|
|
|
|
|
const struct cred *new,
|
|
|
|
|
const struct cred *old)
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2013-03-19 00:02:25 -07:00
|
|
|
static inline void audit_log_capset(const struct cred *new,
|
|
|
|
|
const struct cred *old)
|
2012-10-04 17:11:11 -07:00
|
|
|
{ }
|
|
|
|
|
static inline void audit_mmap_fd(int fd, int flags)
|
|
|
|
|
{ }
|
2017-02-04 13:10:38 -05:00
|
|
|
|
2021-05-19 16:00:22 -04:00
|
|
|
static inline void audit_openat2_how(struct open_how *how)
|
|
|
|
|
{ }
|
|
|
|
|
|
2017-02-04 13:10:38 -05:00
|
|
|
static inline void audit_log_kern_module(char *name)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2017-10-02 20:21:39 -04:00
|
|
|
static inline void audit_fanotify(unsigned int response)
|
|
|
|
|
{ }
|
|
|
|
|
|
2019-04-10 11:14:19 +02:00
|
|
|
static inline void audit_tk_injoffset(struct timespec64 offset)
|
|
|
|
|
{ }
|
|
|
|
|
|
2019-04-10 11:14:20 +02:00
|
|
|
static inline void audit_ntp_init(struct audit_ntp_data *ad)
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
static inline void audit_ntp_set_old(struct audit_ntp_data *ad,
|
|
|
|
|
enum audit_ntp_type type, long long val)
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
static inline void audit_ntp_set_new(struct audit_ntp_data *ad,
|
|
|
|
|
enum audit_ntp_type type, long long val)
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
static inline void audit_ntp_log(const struct audit_ntp_data *ad)
|
|
|
|
|
{ }
|
|
|
|
|
|
2012-10-04 17:11:11 -07:00
|
|
|
static inline void audit_ptrace(struct task_struct *t)
|
|
|
|
|
{ }
|
2020-04-22 17:39:28 -04:00
|
|
|
|
|
|
|
|
static inline void audit_log_nfcfg(const char *name, u8 af,
|
|
|
|
|
unsigned int nentries,
|
2020-06-27 23:24:19 -04:00
|
|
|
enum audit_nfcfgop op, gfp_t gfp)
|
2020-04-22 17:39:28 -04:00
|
|
|
{ }
|
|
|
|
|
|
2006-07-10 08:29:24 -04:00
|
|
|
#define audit_n_rules 0
|
2007-03-29 18:01:04 -04:00
|
|
|
#define audit_signals 0
|
2012-01-03 14:23:06 -05:00
|
|
|
#endif /* CONFIG_AUDITSYSCALL */
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-04-09 02:22:10 -07:00
|
|
|
static inline bool audit_loginuid_set(struct task_struct *tsk)
|
|
|
|
|
{
|
|
|
|
|
return uid_valid(audit_get_loginuid(tsk));
|
|
|
|
|
}
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
#endif
|