xref: /openbmc/linux/kernel/audit.h (revision bf983542)
11a59d1b8SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2fe7752baSDavid Woodhouse /* audit -- definition of audit_context structure and supporting types
3fe7752baSDavid Woodhouse  *
4fe7752baSDavid Woodhouse  * Copyright 2003-2004 Red Hat, Inc.
5fe7752baSDavid Woodhouse  * Copyright 2005 Hewlett-Packard Development Company, L.P.
6fe7752baSDavid Woodhouse  * Copyright 2005 IBM Corporation
7fe7752baSDavid Woodhouse  */
8fe7752baSDavid Woodhouse 
9d97e9938SMaYuming #ifndef _KERNEL_AUDIT_H_
10d97e9938SMaYuming #define _KERNEL_AUDIT_H_
11d97e9938SMaYuming 
12fe7752baSDavid Woodhouse #include <linux/fs.h>
13fe7752baSDavid Woodhouse #include <linux/audit.h>
149044e6bcSAl Viro #include <linux/skbuff.h>
15b24a30a7SEric Paris #include <uapi/linux/mqueue.h>
163f5be2daSRichard Guy Briggs #include <linux/tty.h>
17571e5c0eSRichard Guy Briggs #include <uapi/linux/openat2.h> // struct open_how
18fe7752baSDavid Woodhouse 
19b24a30a7SEric Paris /* AUDIT_NAMES is the number of slots we reserve in the audit_context
20b24a30a7SEric Paris  * for saving names from getname().  If we get more names we will allocate
21b24a30a7SEric Paris  * a name dynamically and also add those to the list anchored by names_list. */
22b24a30a7SEric Paris #define AUDIT_NAMES	5
23b24a30a7SEric Paris 
24fe7752baSDavid Woodhouse /* At task start time, the audit_state is set in the audit_context using
25fe7752baSDavid Woodhouse    a per-task filter.  At syscall entry, the audit_state is augmented by
26fe7752baSDavid Woodhouse    the syscall filter. */
27fe7752baSDavid Woodhouse enum audit_state {
28619ed58aSSergey Nazarov 	AUDIT_STATE_DISABLED,	/* Do not create per-task audit_context.
29fe7752baSDavid Woodhouse 				 * No syscall-specific audit records can
30fe7752baSDavid Woodhouse 				 * be generated. */
31619ed58aSSergey Nazarov 	AUDIT_STATE_BUILD,	/* Create the per-task audit_context,
32997f5b64SEric Paris 				 * and fill it in at syscall
33fe7752baSDavid Woodhouse 				 * entry time.  This makes a full
34fe7752baSDavid Woodhouse 				 * syscall record available if some
35fe7752baSDavid Woodhouse 				 * other part of the kernel decides it
36fe7752baSDavid Woodhouse 				 * should be recorded. */
37619ed58aSSergey Nazarov 	AUDIT_STATE_RECORD	/* Create the per-task audit_context,
38fe7752baSDavid Woodhouse 				 * always fill it in at syscall entry
39fe7752baSDavid Woodhouse 				 * time, and always write out the audit
40fe7752baSDavid Woodhouse 				 * record at syscall exit time.  */
41fe7752baSDavid Woodhouse };
42fe7752baSDavid Woodhouse 
43fe7752baSDavid Woodhouse /* Rule lists */
44cfcad62cSEric Paris struct audit_watch;
457f492942SRichard Guy Briggs struct audit_fsnotify_mark;
4674c3cbe3SAl Viro struct audit_tree;
4774c3cbe3SAl Viro struct audit_chunk;
4874c3cbe3SAl Viro 
49fe7752baSDavid Woodhouse struct audit_entry {
50fe7752baSDavid Woodhouse 	struct list_head	list;
51fe7752baSDavid Woodhouse 	struct rcu_head		rcu;
5293315ed6SAmy Griffis 	struct audit_krule	rule;
53fe7752baSDavid Woodhouse };
54fe7752baSDavid Woodhouse 
55b24a30a7SEric Paris struct audit_cap_data {
56b24a30a7SEric Paris 	kernel_cap_t		permitted;
57b24a30a7SEric Paris 	kernel_cap_t		inheritable;
58b24a30a7SEric Paris 	union {
59b24a30a7SEric Paris 		unsigned int	fE;		/* effective bit of file cap */
60b24a30a7SEric Paris 		kernel_cap_t	effective;	/* effective set of process */
61b24a30a7SEric Paris 	};
627786f6b6SRichard Guy Briggs 	kernel_cap_t		ambient;
632fec30e2SRichard Guy Briggs 	kuid_t			rootid;
64b24a30a7SEric Paris };
65b24a30a7SEric Paris 
6655422d0bSPaul Moore /* When fs/namei.c:getname() is called, we store the pointer in name and bump
6755422d0bSPaul Moore  * the refcnt in the associated filename struct.
68b24a30a7SEric Paris  *
69b24a30a7SEric Paris  * Further, in fs/namei.c:path_lookup() we store the inode and device.
70b24a30a7SEric Paris  */
71b24a30a7SEric Paris struct audit_names {
72b24a30a7SEric Paris 	struct list_head	list;		/* audit_context->names_list */
73b24a30a7SEric Paris 
74b24a30a7SEric Paris 	struct filename		*name;
75b24a30a7SEric Paris 	int			name_len;	/* number of chars to log */
7679f6530cSJeff Layton 	bool			hidden;		/* don't log this record */
77b24a30a7SEric Paris 
78b24a30a7SEric Paris 	unsigned long		ino;
79b24a30a7SEric Paris 	dev_t			dev;
80b24a30a7SEric Paris 	umode_t			mode;
81b24a30a7SEric Paris 	kuid_t			uid;
82b24a30a7SEric Paris 	kgid_t			gid;
83b24a30a7SEric Paris 	dev_t			rdev;
84b24a30a7SEric Paris 	u32			osid;
85b24a30a7SEric Paris 	struct audit_cap_data	fcap;
86b24a30a7SEric Paris 	unsigned int		fcap_ver;
87b24a30a7SEric Paris 	unsigned char		type;		/* record type */
88b24a30a7SEric Paris 	/*
89b24a30a7SEric Paris 	 * This was an allocated audit_names and not from the array of
90b24a30a7SEric Paris 	 * names allocated in the task audit context.  Thus this name
91b24a30a7SEric Paris 	 * should be freed on syscall exit.
92b24a30a7SEric Paris 	 */
93b24a30a7SEric Paris 	bool			should_free;
94b24a30a7SEric Paris };
95b24a30a7SEric Paris 
963f1c8250SWilliam Roberts struct audit_proctitle {
973f1c8250SWilliam Roberts 	int	len;	/* length of the cmdline field. */
983f1c8250SWilliam Roberts 	char	*value;	/* the cmdline field */
993f1c8250SWilliam Roberts };
1003f1c8250SWilliam Roberts 
101b24a30a7SEric Paris /* The per-task audit context. */
102b24a30a7SEric Paris struct audit_context {
103b24a30a7SEric Paris 	int		    dummy;	/* must be the first element */
10412c5e81dSPaul Moore 	enum {
10512c5e81dSPaul Moore 		AUDIT_CTX_UNUSED,	/* audit_context is currently unused */
10612c5e81dSPaul Moore 		AUDIT_CTX_SYSCALL,	/* in use by syscall */
1075bd2182dSPaul Moore 		AUDIT_CTX_URING,	/* in use by io_uring */
10812c5e81dSPaul Moore 	} context;
109b24a30a7SEric Paris 	enum audit_state    state, current_state;
110b24a30a7SEric Paris 	unsigned int	    serial;     /* serial number for record */
111b24a30a7SEric Paris 	int		    major;      /* syscall number */
1125bd2182dSPaul Moore 	int		    uring_op;   /* uring operation */
1132115bb25SDeepa Dinamani 	struct timespec64   ctime;      /* time of syscall entry */
114b24a30a7SEric Paris 	unsigned long	    argv[4];    /* syscall arguments */
115b24a30a7SEric Paris 	long		    return_code;/* syscall return code */
116b24a30a7SEric Paris 	u64		    prio;
117b24a30a7SEric Paris 	int		    return_valid; /* return code is valid */
118b24a30a7SEric Paris 	/*
119b24a30a7SEric Paris 	 * The names_list is the list of all audit_names collected during this
120b24a30a7SEric Paris 	 * syscall.  The first AUDIT_NAMES entries in the names_list will
121b24a30a7SEric Paris 	 * actually be from the preallocated_names array for performance
122b24a30a7SEric Paris 	 * reasons.  Except during allocation they should never be referenced
123b24a30a7SEric Paris 	 * through the preallocated_names array and should only be found/used
124b24a30a7SEric Paris 	 * by running the names_list.
125b24a30a7SEric Paris 	 */
126b24a30a7SEric Paris 	struct audit_names  preallocated_names[AUDIT_NAMES];
127b24a30a7SEric Paris 	int		    name_count; /* total records in names_list */
128b24a30a7SEric Paris 	struct list_head    names_list;	/* struct audit_names->list anchor */
129b24a30a7SEric Paris 	char		    *filterkey;	/* key for rule that triggered record */
130b24a30a7SEric Paris 	struct path	    pwd;
131b24a30a7SEric Paris 	struct audit_aux_data *aux;
132b24a30a7SEric Paris 	struct audit_aux_data *aux_pids;
133b24a30a7SEric Paris 	struct sockaddr_storage *sockaddr;
134b24a30a7SEric Paris 	size_t sockaddr_len;
135b24a30a7SEric Paris 				/* Save things to print about task_struct */
136e84d9f52SRichard Guy Briggs 	pid_t		    ppid;
137b24a30a7SEric Paris 	kuid_t		    uid, euid, suid, fsuid;
138b24a30a7SEric Paris 	kgid_t		    gid, egid, sgid, fsgid;
139b24a30a7SEric Paris 	unsigned long	    personality;
140b24a30a7SEric Paris 	int		    arch;
141b24a30a7SEric Paris 
142b24a30a7SEric Paris 	pid_t		    target_pid;
143b24a30a7SEric Paris 	kuid_t		    target_auid;
144b24a30a7SEric Paris 	kuid_t		    target_uid;
145b24a30a7SEric Paris 	unsigned int	    target_sessionid;
146b24a30a7SEric Paris 	u32		    target_sid;
147b24a30a7SEric Paris 	char		    target_comm[TASK_COMM_LEN];
148b24a30a7SEric Paris 
149b24a30a7SEric Paris 	struct audit_tree_refs *trees, *first_trees;
150b24a30a7SEric Paris 	struct list_head killed_trees;
151b24a30a7SEric Paris 	int tree_count;
152b24a30a7SEric Paris 
153b24a30a7SEric Paris 	int type;
154b24a30a7SEric Paris 	union {
155b24a30a7SEric Paris 		struct {
156b24a30a7SEric Paris 			int nargs;
157b24a30a7SEric Paris 			long args[6];
158b24a30a7SEric Paris 		} socketcall;
159b24a30a7SEric Paris 		struct {
160b24a30a7SEric Paris 			kuid_t			uid;
161b24a30a7SEric Paris 			kgid_t			gid;
162b24a30a7SEric Paris 			umode_t			mode;
163b24a30a7SEric Paris 			u32			osid;
164b24a30a7SEric Paris 			int			has_perm;
165b24a30a7SEric Paris 			uid_t			perm_uid;
166b24a30a7SEric Paris 			gid_t			perm_gid;
167b24a30a7SEric Paris 			umode_t			perm_mode;
168b24a30a7SEric Paris 			unsigned long		qbytes;
169b24a30a7SEric Paris 		} ipc;
170b24a30a7SEric Paris 		struct {
171b24a30a7SEric Paris 			mqd_t			mqdes;
172b24a30a7SEric Paris 			struct mq_attr		mqstat;
173b24a30a7SEric Paris 		} mq_getsetattr;
174b24a30a7SEric Paris 		struct {
175b24a30a7SEric Paris 			mqd_t			mqdes;
176b24a30a7SEric Paris 			int			sigev_signo;
177b24a30a7SEric Paris 		} mq_notify;
178b24a30a7SEric Paris 		struct {
179b24a30a7SEric Paris 			mqd_t			mqdes;
180b24a30a7SEric Paris 			size_t			msg_len;
181b24a30a7SEric Paris 			unsigned int		msg_prio;
182b9047726SDeepa Dinamani 			struct timespec64	abs_timeout;
183b24a30a7SEric Paris 		} mq_sendrecv;
184b24a30a7SEric Paris 		struct {
185b24a30a7SEric Paris 			int			oflag;
186b24a30a7SEric Paris 			umode_t			mode;
187b24a30a7SEric Paris 			struct mq_attr		attr;
188b24a30a7SEric Paris 		} mq_open;
189b24a30a7SEric Paris 		struct {
190b24a30a7SEric Paris 			pid_t			pid;
191b24a30a7SEric Paris 			struct audit_cap_data	cap;
192b24a30a7SEric Paris 		} capset;
193b24a30a7SEric Paris 		struct {
194b24a30a7SEric Paris 			int			fd;
195b24a30a7SEric Paris 			int			flags;
196b24a30a7SEric Paris 		} mmap;
197571e5c0eSRichard Guy Briggs 		struct open_how openat2;
198d9cfea91SRichard Guy Briggs 		struct {
199d9cfea91SRichard Guy Briggs 			int			argc;
200d9cfea91SRichard Guy Briggs 		} execve;
201ca86cad7SRichard Guy Briggs 		struct {
202ca86cad7SRichard Guy Briggs 			char			*name;
203ca86cad7SRichard Guy Briggs 		} module;
204272ceeaeSRichard Guy Briggs 		struct {
205272ceeaeSRichard Guy Briggs 			struct audit_ntp_data	ntp_data;
206272ceeaeSRichard Guy Briggs 			struct timespec64	tk_injoffset;
207272ceeaeSRichard Guy Briggs 		} time;
208b24a30a7SEric Paris 	};
209b24a30a7SEric Paris 	int fds[2];
2103f1c8250SWilliam Roberts 	struct audit_proctitle proctitle;
211b24a30a7SEric Paris };
212b24a30a7SEric Paris 
213b3b4fdf6SPaul Moore extern bool audit_ever_enabled;
214c782f242SHarvey Harrison 
2150fe3c7fcSRichard Guy Briggs extern void audit_log_session_info(struct audit_buffer *ab);
2160fe3c7fcSRichard Guy Briggs 
217b6c7c115SPaul Moore extern int auditd_test_task(struct task_struct *task);
218fe7752baSDavid Woodhouse 
219f368c07dSAmy Griffis #define AUDIT_INODE_BUCKETS	32
220f368c07dSAmy Griffis extern struct list_head audit_inode_hash[AUDIT_INODE_BUCKETS];
221f368c07dSAmy Griffis 
audit_hash_ino(u32 ino)222f368c07dSAmy Griffis static inline int audit_hash_ino(u32 ino)
223f368c07dSAmy Griffis {
224f368c07dSAmy Griffis 	return (ino & (AUDIT_INODE_BUCKETS-1));
225f368c07dSAmy Griffis }
226f368c07dSAmy Griffis 
227e3d6b07bSJeff Layton /* Indicates that audit should log the full pathname. */
228e3d6b07bSJeff Layton #define AUDIT_NAME_FULL -1
229e3d6b07bSJeff Layton 
23055669bfaSAl Viro extern int audit_match_class(int class, unsigned syscall);
231f368c07dSAmy Griffis extern int audit_comparator(const u32 left, const u32 op, const u32 right);
232ca57ec0fSEric W. Biederman extern int audit_uid_comparator(kuid_t left, u32 op, kuid_t right);
233ca57ec0fSEric W. Biederman extern int audit_gid_comparator(kgid_t left, u32 op, kgid_t right);
234bfcec708SJeff Layton extern int parent_len(const char *path);
235795d673aSAl Viro extern int audit_compare_dname_path(const struct qstr *dname, const char *path, int plen);
23645a0642bSPaul Moore extern struct sk_buff *audit_make_reply(int seq, int type, int done, int multi,
237b8800aa5SStephen Hemminger 					const void *payload, int size);
238fe7752baSDavid Woodhouse extern void		    audit_panic(const char *message);
2393dc7e315SDarrel Goeddel 
2409044e6bcSAl Viro struct audit_netlink_list {
241f9441639SRichard Guy Briggs 	__u32 portid;
242638a0fd2SEric W. Biederman 	struct net *net;
2439044e6bcSAl Viro 	struct sk_buff_head q;
2449044e6bcSAl Viro };
2459044e6bcSAl Viro 
2463054d067SPaul Moore int audit_send_list_thread(void *_dest);
2479044e6bcSAl Viro 
24874c3cbe3SAl Viro extern struct mutex audit_filter_mutex;
249e4c1a0d1SDerek Robson extern int audit_del_rule(struct audit_entry *entry);
250e4c1a0d1SDerek Robson extern void audit_free_rule_rcu(struct rcu_head *head);
251c782f242SHarvey Harrison extern struct list_head audit_filter_list[];
25274c3cbe3SAl Viro 
253939a67fcSEric Paris extern struct audit_entry *audit_dupe_rule(struct audit_krule *old);
254939a67fcSEric Paris 
2554766b199SDavidlohr Bueso extern void audit_log_d_path_exe(struct audit_buffer *ab,
2564766b199SDavidlohr Bueso 				 struct mm_struct *mm);
2574766b199SDavidlohr Bueso 
2582a1fe215SPaul Moore extern struct tty_struct *audit_get_tty(void);
2593f5be2daSRichard Guy Briggs extern void audit_put_tty(struct tty_struct *tty);
2603f5be2daSRichard Guy Briggs 
26105c7a9cbSRichard Guy Briggs /* audit watch/mark/tree functions */
262cd108b5cSRichard Guy Briggs extern unsigned int audit_serial(void);
263e455ca40SArnd Bergmann #ifdef CONFIG_AUDITSYSCALL
264cd108b5cSRichard Guy Briggs extern int auditsc_get_stamp(struct audit_context *ctx,
265cd108b5cSRichard Guy Briggs 			      struct timespec64 *t, unsigned int *serial);
266cd108b5cSRichard Guy Briggs 
267cfcad62cSEric Paris extern void audit_put_watch(struct audit_watch *watch);
268cfcad62cSEric Paris extern void audit_get_watch(struct audit_watch *watch);
26905c7a9cbSRichard Guy Briggs extern int audit_to_watch(struct audit_krule *krule, char *path, int len,
27005c7a9cbSRichard Guy Briggs 			  u32 op);
271ae7b8f41SEric Paris extern int audit_add_watch(struct audit_krule *krule, struct list_head **list);
272a05fb6ccSEric Paris extern void audit_remove_watch_rule(struct audit_krule *krule);
273cfcad62cSEric Paris extern char *audit_watch_path(struct audit_watch *watch);
27405c7a9cbSRichard Guy Briggs extern int audit_watch_compare(struct audit_watch *watch, unsigned long ino,
27505c7a9cbSRichard Guy Briggs 			       dev_t dev);
2767f492942SRichard Guy Briggs 
27705c7a9cbSRichard Guy Briggs extern struct audit_fsnotify_mark *audit_alloc_mark(struct audit_krule *krule,
27805c7a9cbSRichard Guy Briggs 						    char *pathname, int len);
2797f492942SRichard Guy Briggs extern char *audit_mark_path(struct audit_fsnotify_mark *mark);
2807f492942SRichard Guy Briggs extern void audit_remove_mark(struct audit_fsnotify_mark *audit_mark);
2817f492942SRichard Guy Briggs extern void audit_remove_mark_rule(struct audit_krule *krule);
28205c7a9cbSRichard Guy Briggs extern int audit_mark_compare(struct audit_fsnotify_mark *mark,
28305c7a9cbSRichard Guy Briggs 			      unsigned long ino, dev_t dev);
28434d99af5SRichard Guy Briggs extern int audit_dupe_exe(struct audit_krule *new, struct audit_krule *old);
28505c7a9cbSRichard Guy Briggs extern int audit_exe_compare(struct task_struct *tsk,
28605c7a9cbSRichard Guy Briggs 			     struct audit_fsnotify_mark *mark);
2877f492942SRichard Guy Briggs 
28805c7a9cbSRichard Guy Briggs extern struct audit_chunk *audit_tree_lookup(const struct inode *inode);
28905c7a9cbSRichard Guy Briggs extern void audit_put_chunk(struct audit_chunk *chunk);
29005c7a9cbSRichard Guy Briggs extern bool audit_tree_match(struct audit_chunk *chunk,
29105c7a9cbSRichard Guy Briggs 			     struct audit_tree *tree);
29205c7a9cbSRichard Guy Briggs extern int audit_make_tree(struct audit_krule *rule, char *pathname, u32 op);
29305c7a9cbSRichard Guy Briggs extern int audit_add_tree_rule(struct audit_krule *rule);
29405c7a9cbSRichard Guy Briggs extern int audit_remove_tree_rule(struct audit_krule *rule);
29505c7a9cbSRichard Guy Briggs extern void audit_trim_trees(void);
29605c7a9cbSRichard Guy Briggs extern int audit_tag_tree(char *old, char *new);
29705c7a9cbSRichard Guy Briggs extern const char *audit_tree_path(struct audit_tree *tree);
29805c7a9cbSRichard Guy Briggs extern void audit_put_tree(struct audit_tree *tree);
29905c7a9cbSRichard Guy Briggs extern void audit_kill_trees(struct audit_context *context);
30005c7a9cbSRichard Guy Briggs 
301b48345aaSRichard Guy Briggs extern int audit_signal_info_syscall(struct task_struct *t);
30205c7a9cbSRichard Guy Briggs extern void audit_filter_inodes(struct task_struct *tsk,
30305c7a9cbSRichard Guy Briggs 				struct audit_context *ctx);
30405c7a9cbSRichard Guy Briggs extern struct list_head *audit_killed_trees(void);
30505c7a9cbSRichard Guy Briggs #else /* CONFIG_AUDITSYSCALL */
306cd108b5cSRichard Guy Briggs #define auditsc_get_stamp(c, t, s) 0
307d4ceb1d6SArnd Bergmann #define audit_put_watch(w) do { } while (0)
308d4ceb1d6SArnd Bergmann #define audit_get_watch(w) do { } while (0)
309939a67fcSEric Paris #define audit_to_watch(k, p, l, o) (-EINVAL)
310939a67fcSEric Paris #define audit_add_watch(k, l) (-EINVAL)
311939a67fcSEric Paris #define audit_remove_watch_rule(k) BUG()
312939a67fcSEric Paris #define audit_watch_path(w) ""
313939a67fcSEric Paris #define audit_watch_compare(w, i, d) 0
314939a67fcSEric Paris 
3157f492942SRichard Guy Briggs #define audit_alloc_mark(k, p, l) (ERR_PTR(-EINVAL))
3167f492942SRichard Guy Briggs #define audit_mark_path(m) ""
317d4ceb1d6SArnd Bergmann #define audit_remove_mark(m) do { } while (0)
318d4ceb1d6SArnd Bergmann #define audit_remove_mark_rule(k) do { } while (0)
3197f492942SRichard Guy Briggs #define audit_mark_compare(m, i, d) 0
32034d99af5SRichard Guy Briggs #define audit_exe_compare(t, m) (-EINVAL)
32134d99af5SRichard Guy Briggs #define audit_dupe_exe(n, o) (-EINVAL)
322cfcad62cSEric Paris 
32374c3cbe3SAl Viro #define audit_remove_tree_rule(rule) BUG()
32474c3cbe3SAl Viro #define audit_add_tree_rule(rule) -EINVAL
32574c3cbe3SAl Viro #define audit_make_tree(rule, str, op) -EINVAL
326d4ceb1d6SArnd Bergmann #define audit_trim_trees() do { } while (0)
327d4ceb1d6SArnd Bergmann #define audit_put_tree(tree) do { } while (0)
32874c3cbe3SAl Viro #define audit_tag_tree(old, new) -EINVAL
32974c3cbe3SAl Viro #define audit_tree_path(rule) ""	/* never called */
3309e36a5d4SRichard Guy Briggs #define audit_kill_trees(context) BUG()
33105c7a9cbSRichard Guy Briggs 
audit_signal_info_syscall(struct task_struct * t)332b48345aaSRichard Guy Briggs static inline int audit_signal_info_syscall(struct task_struct *t)
333b48345aaSRichard Guy Briggs {
334b48345aaSRichard Guy Briggs 	return 0;
335b48345aaSRichard Guy Briggs }
336b48345aaSRichard Guy Briggs 
337*bf983542SXiu Jianfeng #define audit_filter_inodes(t, c) do { } while (0)
33805c7a9cbSRichard Guy Briggs #endif /* CONFIG_AUDITSYSCALL */
33974c3cbe3SAl Viro 
340e4c1a0d1SDerek Robson extern char *audit_unpack_string(void **bufp, size_t *remain, size_t len);
34174c3cbe3SAl Viro 
34286b2efbeSRichard Guy Briggs extern int audit_filter(int msgtype, unsigned int listtype);
34386b2efbeSRichard Guy Briggs 
344ce423631SPaul Moore extern void audit_ctl_lock(void);
345ce423631SPaul Moore extern void audit_ctl_unlock(void);
346d97e9938SMaYuming 
347d97e9938SMaYuming #endif
348