File Index
Files and directories
Sign in
FILE

audit.h

File preview with syntax highlighting.

linux-6.19.14/include/linux/audit.h C
  1/* SPDX-License-Identifier: GPL-2.0-or-later */
  2/* audit.h -- Auditing support
  3 *
  4 * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina.
  5 * All Rights Reserved.
  6 *
  7 * Written by Rickard E. (Rik) Faith <faith@redhat.com>
  8 */
  9#ifndef _LINUX_AUDIT_H_
 10#define _LINUX_AUDIT_H_
 11
 12#include <linux/sched.h>
 13#include <linux/ptrace.h>
 14#include <linux/audit_arch.h>
 15#include <uapi/linux/audit.h>
 16#include <uapi/linux/netfilter/nf_tables.h>
 17#include <uapi/linux/fanotify.h>
 18
 19#define AUDIT_INO_UNSET ((unsigned long)-1)
 20#define AUDIT_DEV_UNSET ((dev_t)-1)
 21
 22struct audit_sig_info {
 23	uid_t		uid;
 24	pid_t		pid;
 25	char		ctx[];
 26};
 27
 28struct audit_buffer;
 29struct audit_context;
 30struct inode;
 31struct netlink_skb_parms;
 32struct path;
 33struct linux_binprm;
 34struct mq_attr;
 35struct mqstat;
 36struct audit_watch;
 37struct audit_tree;
 38struct sk_buff;
 39struct kern_ipc_perm;
 40struct lsm_id;
 41struct lsm_prop;
 42
 43struct audit_krule {
 44	u32			pflags;
 45	u32			flags;
 46	u32			listnr;
 47	u32			action;
 48	u32			mask[AUDIT_BITMASK_SIZE];
 49	u32			buflen; /* for data alloc on list rules */
 50	u32			field_count;
 51	char			*filterkey; /* ties events to rules */
 52	struct audit_field	*fields;
 53	struct audit_field	*arch_f; /* quick access to arch field */
 54	struct audit_field	*inode_f; /* quick access to an inode field */
 55	struct audit_watch	*watch;	/* associated watch */
 56	struct audit_tree	*tree;	/* associated watched tree */
 57	struct audit_fsnotify_mark	*exe;
 58	struct list_head	rlist;	/* entry in audit_{watch,tree}.rules list */
 59	struct list_head	list;	/* for AUDIT_LIST* purposes only */
 60	u64			prio;
 61};
 62
 63/* Flag to indicate legacy AUDIT_LOGINUID unset usage */
 64#define AUDIT_LOGINUID_LEGACY		0x1
 65
 66struct audit_field {
 67	u32				type;
 68	union {
 69		u32			val;
 70		kuid_t			uid;
 71		kgid_t			gid;
 72		struct {
 73			char		*lsm_str;
 74			void		*lsm_rule;
 75		};
 76	};
 77	u32				op;
 78};
 79
 80enum audit_ntp_type {
 81	AUDIT_NTP_OFFSET,
 82	AUDIT_NTP_FREQ,
 83	AUDIT_NTP_STATUS,
 84	AUDIT_NTP_TAI,
 85	AUDIT_NTP_TICK,
 86	AUDIT_NTP_ADJUST,
 87
 88	AUDIT_NTP_NVALS /* count */
 89};
 90
 91#ifdef CONFIG_AUDITSYSCALL
 92struct audit_ntp_val {
 93	long long oldval, newval;
 94};
 95
 96struct audit_ntp_data {
 97	struct audit_ntp_val vals[AUDIT_NTP_NVALS];
 98};
 99#else
100struct audit_ntp_data {};
101#endif
102
103enum audit_nfcfgop {
104	AUDIT_XT_OP_REGISTER,
105	AUDIT_XT_OP_REPLACE,
106	AUDIT_XT_OP_UNREGISTER,
107	AUDIT_NFT_OP_TABLE_REGISTER,
108	AUDIT_NFT_OP_TABLE_UNREGISTER,
109	AUDIT_NFT_OP_CHAIN_REGISTER,
110	AUDIT_NFT_OP_CHAIN_UNREGISTER,
111	AUDIT_NFT_OP_RULE_REGISTER,
112	AUDIT_NFT_OP_RULE_UNREGISTER,
113	AUDIT_NFT_OP_SET_REGISTER,
114	AUDIT_NFT_OP_SET_UNREGISTER,
115	AUDIT_NFT_OP_SETELEM_REGISTER,
116	AUDIT_NFT_OP_SETELEM_UNREGISTER,
117	AUDIT_NFT_OP_GEN_REGISTER,
118	AUDIT_NFT_OP_OBJ_REGISTER,
119	AUDIT_NFT_OP_OBJ_UNREGISTER,
120	AUDIT_NFT_OP_OBJ_RESET,
121	AUDIT_NFT_OP_FLOWTABLE_REGISTER,
122	AUDIT_NFT_OP_FLOWTABLE_UNREGISTER,
123	AUDIT_NFT_OP_SETELEM_RESET,
124	AUDIT_NFT_OP_RULE_RESET,
125	AUDIT_NFT_OP_INVALID,
126};
127
128extern int __init audit_register_class(int class, unsigned *list);
129extern int audit_classify_syscall(int abi, unsigned syscall);
130extern int audit_classify_arch(int arch);
131
132/* audit_names->type values */
133#define	AUDIT_TYPE_UNKNOWN	0	/* we don't know yet */
134#define	AUDIT_TYPE_NORMAL	1	/* a "normal" audit record */
135#define	AUDIT_TYPE_PARENT	2	/* a parent audit record */
136#define	AUDIT_TYPE_CHILD_DELETE 3	/* a child being deleted */
137#define	AUDIT_TYPE_CHILD_CREATE 4	/* a child being created */
138
139/* maximized args number that audit_socketcall can process */
140#define AUDITSC_ARGS		6
141
142/* bit values for ->signal->audit_tty */
143#define AUDIT_TTY_ENABLE	BIT(0)
144#define AUDIT_TTY_LOG_PASSWD	BIT(1)
145
146/* bit values for audit_cfg_lsm */
147#define AUDIT_CFG_LSM_SECCTX_SUBJECT	BIT(0)
148#define AUDIT_CFG_LSM_SECCTX_OBJECT	BIT(1)
149
150struct filename;
151
152#define AUDIT_OFF	0
153#define AUDIT_ON	1
154#define AUDIT_LOCKED	2
155#ifdef CONFIG_AUDIT
156/* These are defined in audit.c */
157				/* Public API */
158extern __printf(4, 5)
159void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
160	       const char *fmt, ...);
161
162extern struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type);
163extern __printf(2, 3)
164void audit_log_format(struct audit_buffer *ab, const char *fmt, ...);
165extern void		    audit_log_end(struct audit_buffer *ab);
166extern bool		    audit_string_contains_control(const char *string,
167							  size_t len);
168extern void		    audit_log_n_hex(struct audit_buffer *ab,
169					  const unsigned char *buf,
170					  size_t len);
171extern void		    audit_log_n_string(struct audit_buffer *ab,
172					       const char *buf,
173					       size_t n);
174extern void		    audit_log_n_untrustedstring(struct audit_buffer *ab,
175							const char *string,
176							size_t n);
177extern void		    audit_log_untrustedstring(struct audit_buffer *ab,
178						      const char *string);
179extern void		    audit_log_d_path(struct audit_buffer *ab,
180					     const char *prefix,
181					     const struct path *path);
182extern void		    audit_log_key(struct audit_buffer *ab,
183					  char *key);
184extern void		    audit_log_path_denied(int type,
185						  const char *operation);
186extern void		    audit_log_lost(const char *message);
187
188extern int audit_log_subj_ctx(struct audit_buffer *ab, struct lsm_prop *prop);
189extern int audit_log_obj_ctx(struct audit_buffer *ab, struct lsm_prop *prop);
190extern int audit_log_task_context(struct audit_buffer *ab);
191extern void audit_log_task_info(struct audit_buffer *ab);
192
193extern int		    audit_update_lsm_rules(void);
194
195				/* Private API (for audit.c only) */
196extern int audit_rule_change(int type, int seq, void *data, size_t datasz);
197extern int audit_list_rules_send(struct sk_buff *request_skb, int seq);
198
199extern int audit_set_loginuid(kuid_t loginuid);
200
201static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
202{
203	return tsk->loginuid;
204}
205
206static inline unsigned int audit_get_sessionid(struct task_struct *tsk)
207{
208	return tsk->sessionid;
209}
210
211extern u32 audit_enabled;
212
213extern int audit_signal_info(int sig, struct task_struct *t);
214
215extern void audit_cfg_lsm(const struct lsm_id *lsmid, int flags);
216
217#else /* CONFIG_AUDIT */
218static inline __printf(4, 5)
219void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type,
220	       const char *fmt, ...)
221{ }
222static inline struct audit_buffer *audit_log_start(struct audit_context *ctx,
223						   gfp_t gfp_mask, int type)
224{
225	return NULL;
226}
227static inline __printf(2, 3)
228void audit_log_format(struct audit_buffer *ab, const char *fmt, ...)
229{ }
230static inline void audit_log_end(struct audit_buffer *ab)
231{ }
232static inline void audit_log_n_hex(struct audit_buffer *ab,
233				   const unsigned char *buf, size_t len)
234{ }
235static inline void audit_log_n_string(struct audit_buffer *ab,
236				      const char *buf, size_t n)
237{ }
238static inline void  audit_log_n_untrustedstring(struct audit_buffer *ab,
239						const char *string, size_t n)
240{ }
241static inline void audit_log_untrustedstring(struct audit_buffer *ab,
242					     const char *string)
243{ }
244static inline void audit_log_d_path(struct audit_buffer *ab,
245				    const char *prefix,
246				    const struct path *path)
247{ }
248static inline void audit_log_key(struct audit_buffer *ab, char *key)
249{ }
250static inline void audit_log_path_denied(int type, const char *operation)
251{ }
252static inline int audit_log_subj_ctx(struct audit_buffer *ab,
253				     struct lsm_prop *prop)
254{
255	return 0;
256}
257static inline int audit_log_obj_ctx(struct audit_buffer *ab,
258				    struct lsm_prop *prop)
259{
260	return 0;
261}
262static inline int audit_log_task_context(struct audit_buffer *ab)
263{
264	return 0;
265}
266static inline void audit_log_task_info(struct audit_buffer *ab)
267{ }
268
269static inline kuid_t audit_get_loginuid(struct task_struct *tsk)
270{
271	return INVALID_UID;
272}
273
274static inline unsigned int audit_get_sessionid(struct task_struct *tsk)
275{
276	return AUDIT_SID_UNSET;
277}
278
279#define audit_enabled AUDIT_OFF
280
281static inline int audit_signal_info(int sig, struct task_struct *t)
282{
283	return 0;
284}
285
286static inline void audit_cfg_lsm(const struct lsm_id *lsmid, int flags)
287{ }
288
289#endif /* CONFIG_AUDIT */
290
291#ifdef CONFIG_AUDIT_COMPAT_GENERIC
292#define audit_is_compat(arch)  (!((arch) & __AUDIT_ARCH_64BIT))
293#else
294#define audit_is_compat(arch)  false
295#endif
296
297#define AUDIT_INODE_PARENT	1	/* dentry represents the parent */
298#define AUDIT_INODE_HIDDEN	2	/* audit record should be hidden */
299#define AUDIT_INODE_NOEVAL	4	/* audit record incomplete */
300
301#ifdef CONFIG_AUDITSYSCALL
302#include <asm/syscall.h> /* for syscall_get_arch() */
303
304/* These are defined in auditsc.c */
305				/* Public API */
306extern int  audit_alloc(struct task_struct *task);
307extern void __audit_free(struct task_struct *task);
308extern void __audit_uring_entry(u8 op);
309extern void __audit_uring_exit(int success, long code);
310extern void __audit_syscall_entry(int major, unsigned long a0, unsigned long a1,
311				  unsigned long a2, unsigned long a3);
312extern void __audit_syscall_exit(int ret_success, long ret_value);
313extern struct filename *__audit_reusename(const __user char *uptr);
314extern void __audit_getname(struct filename *name);
315extern void __audit_inode(struct filename *name, const struct dentry *dentry,
316				unsigned int flags);
317extern void __audit_file(const struct file *);
318extern void __audit_inode_child(struct inode *parent,
319				const struct dentry *dentry,
320				const unsigned char type);
321extern void audit_seccomp(unsigned long syscall, long signr, int code);
322extern void audit_seccomp_actions_logged(const char *names,
323					 const char *old_names, int res);
324extern void __audit_ptrace(struct task_struct *t);
325
326static inline void audit_set_context(struct task_struct *task, struct audit_context *ctx)
327{
328	task->audit_context = ctx;
329}
330
331static inline struct audit_context *audit_context(void)
332{
333	return current->audit_context;
334}
335
336static inline bool audit_dummy_context(void)
337{
338	void *p = audit_context();
339	return !p || *(int *)p;
340}
341static inline void audit_free(struct task_struct *task)
342{
343	if (unlikely(task->audit_context))
344		__audit_free(task);
345}
346static inline void audit_uring_entry(u8 op)
347{
348	/*
349	 * We intentionally check audit_context() before audit_enabled as most
350	 * Linux systems (as of ~2021) rely on systemd which forces audit to
351	 * be enabled regardless of the user's audit configuration.
352	 */
353	if (unlikely(audit_context() && audit_enabled))
354		__audit_uring_entry(op);
355}
356static inline void audit_uring_exit(int success, long code)
357{
358	if (unlikely(audit_context()))
359		__audit_uring_exit(success, code);
360}
361static inline void audit_syscall_entry(int major, unsigned long a0,
362				       unsigned long a1, unsigned long a2,
363				       unsigned long a3)
364{
365	if (unlikely(audit_context()))
366		__audit_syscall_entry(major, a0, a1, a2, a3);
367}
368static inline void audit_syscall_exit(void *pt_regs)
369{
370	if (unlikely(audit_context())) {
371		int success = is_syscall_success(pt_regs);
372		long return_code = regs_return_value(pt_regs);
373
374		__audit_syscall_exit(success, return_code);
375	}
376}
377static inline struct filename *audit_reusename(const __user char *name)
378{
379	if (unlikely(!audit_dummy_context()))
380		return __audit_reusename(name);
381	return NULL;
382}
383static inline void audit_getname(struct filename *name)
384{
385	if (unlikely(!audit_dummy_context()))
386		__audit_getname(name);
387}
388static inline void audit_inode(struct filename *name,
389				const struct dentry *dentry,
390				unsigned int aflags) {
391	if (unlikely(!audit_dummy_context()))
392		__audit_inode(name, dentry, aflags);
393}
394static inline void audit_file(struct file *file)
395{
396	if (unlikely(!audit_dummy_context()))
397		__audit_file(file);
398}
399static inline void audit_inode_parent_hidden(struct filename *name,
400						const struct dentry *dentry)
401{
402	if (unlikely(!audit_dummy_context()))
403		__audit_inode(name, dentry,
404				AUDIT_INODE_PARENT | AUDIT_INODE_HIDDEN);
405}
406static inline void audit_inode_child(struct inode *parent,
407				     const struct dentry *dentry,
408				     const unsigned char type) {
409	if (unlikely(!audit_dummy_context()))
410		__audit_inode_child(parent, dentry, type);
411}
412void audit_core_dumps(long signr);
413
414static inline void audit_ptrace(struct task_struct *t)
415{
416	if (unlikely(!audit_dummy_context()))
417		__audit_ptrace(t);
418}
419
420				/* Private API (for audit.c only) */
421extern void __audit_ipc_obj(struct kern_ipc_perm *ipcp);
422extern void __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode);
423extern void __audit_bprm(struct linux_binprm *bprm);
424extern int __audit_socketcall(int nargs, unsigned long *args);
425extern int __audit_sockaddr(int len, void *addr);
426extern void __audit_fd_pair(int fd1, int fd2);
427extern void __audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr);
428extern void __audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec64 *abs_timeout);
429extern void __audit_mq_notify(mqd_t mqdes, const struct sigevent *notification);
430extern void __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat);
431extern int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
432				  const struct cred *new,
433				  const struct cred *old);
434extern void __audit_log_capset(const struct cred *new, const struct cred *old);
435extern void __audit_mmap_fd(int fd, int flags);
436extern void __audit_openat2_how(struct open_how *how);
437extern void __audit_log_kern_module(const char *name);
438extern void __audit_fanotify(u32 response, struct fanotify_response_info_audit_rule *friar);
439extern void __audit_tk_injoffset(struct timespec64 offset);
440extern void __audit_ntp_log(const struct audit_ntp_data *ad);
441extern void __audit_log_nfcfg(const char *name, u8 af, unsigned int nentries,
442			      enum audit_nfcfgop op, gfp_t gfp);
443
444static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
445{
446	if (unlikely(!audit_dummy_context()))
447		__audit_ipc_obj(ipcp);
448}
449static inline void audit_fd_pair(int fd1, int fd2)
450{
451	if (unlikely(!audit_dummy_context()))
452		__audit_fd_pair(fd1, fd2);
453}
454static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, umode_t mode)
455{
456	if (unlikely(!audit_dummy_context()))
457		__audit_ipc_set_perm(qbytes, uid, gid, mode);
458}
459static inline void audit_bprm(struct linux_binprm *bprm)
460{
461	if (unlikely(!audit_dummy_context()))
462		__audit_bprm(bprm);
463}
464static inline int audit_socketcall(int nargs, unsigned long *args)
465{
466	if (unlikely(!audit_dummy_context()))
467		return __audit_socketcall(nargs, args);
468	return 0;
469}
470
471static inline int audit_socketcall_compat(int nargs, u32 *args)
472{
473	unsigned long a[AUDITSC_ARGS];
474	int i;
475
476	if (audit_dummy_context())
477		return 0;
478
479	for (i = 0; i < nargs; i++)
480		a[i] = (unsigned long)args[i];
481	return __audit_socketcall(nargs, a);
482}
483
484static inline int audit_sockaddr(int len, void *addr)
485{
486	if (unlikely(!audit_dummy_context()))
487		return __audit_sockaddr(len, addr);
488	return 0;
489}
490static inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr)
491{
492	if (unlikely(!audit_dummy_context()))
493		__audit_mq_open(oflag, mode, attr);
494}
495static inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len, unsigned int msg_prio, const struct timespec64 *abs_timeout)
496{
497	if (unlikely(!audit_dummy_context()))
498		__audit_mq_sendrecv(mqdes, msg_len, msg_prio, abs_timeout);
499}
500static inline void audit_mq_notify(mqd_t mqdes, const struct sigevent *notification)
501{
502	if (unlikely(!audit_dummy_context()))
503		__audit_mq_notify(mqdes, notification);
504}
505static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
506{
507	if (unlikely(!audit_dummy_context()))
508		__audit_mq_getsetattr(mqdes, mqstat);
509}
510
511static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
512				       const struct cred *new,
513				       const struct cred *old)
514{
515	if (unlikely(!audit_dummy_context()))
516		return __audit_log_bprm_fcaps(bprm, new, old);
517	return 0;
518}
519
520static inline void audit_log_capset(const struct cred *new,
521				   const struct cred *old)
522{
523	if (unlikely(!audit_dummy_context()))
524		__audit_log_capset(new, old);
525}
526
527static inline void audit_mmap_fd(int fd, int flags)
528{
529	if (unlikely(!audit_dummy_context()))
530		__audit_mmap_fd(fd, flags);
531}
532
533static inline void audit_openat2_how(struct open_how *how)
534{
535	if (unlikely(!audit_dummy_context()))
536		__audit_openat2_how(how);
537}
538
539static inline void audit_log_kern_module(const char *name)
540{
541	if (!audit_dummy_context())
542		__audit_log_kern_module(name);
543}
544
545static inline void audit_fanotify(u32 response, struct fanotify_response_info_audit_rule *friar)
546{
547	if (audit_enabled)
548		__audit_fanotify(response, friar);
549}
550
551static inline void audit_tk_injoffset(struct timespec64 offset)
552{
553	/* ignore no-op events */
554	if (offset.tv_sec == 0 && offset.tv_nsec == 0)
555		return;
556
557	if (!audit_dummy_context())
558		__audit_tk_injoffset(offset);
559}
560
561static inline void audit_ntp_init(struct audit_ntp_data *ad)
562{
563	memset(ad, 0, sizeof(*ad));
564}
565
566static inline void audit_ntp_set_old(struct audit_ntp_data *ad,
567				     enum audit_ntp_type type, long long val)
568{
569	ad->vals[type].oldval = val;
570}
571
572static inline void audit_ntp_set_new(struct audit_ntp_data *ad,
573				     enum audit_ntp_type type, long long val)
574{
575	ad->vals[type].newval = val;
576}
577
578static inline void audit_ntp_log(const struct audit_ntp_data *ad)
579{
580	if (!audit_dummy_context())
581		__audit_ntp_log(ad);
582}
583
584static inline void audit_log_nfcfg(const char *name, u8 af,
585				   unsigned int nentries,
586				   enum audit_nfcfgop op, gfp_t gfp)
587{
588	if (audit_enabled)
589		__audit_log_nfcfg(name, af, nentries, op, gfp);
590}
591
592extern int audit_n_rules;
593extern int audit_signals;
594#else /* CONFIG_AUDITSYSCALL */
595static inline int audit_alloc(struct task_struct *task)
596{
597	return 0;
598}
599static inline void audit_free(struct task_struct *task)
600{ }
601static inline void audit_uring_entry(u8 op)
602{ }
603static inline void audit_uring_exit(int success, long code)
604{ }
605static inline void audit_syscall_entry(int major, unsigned long a0,
606				       unsigned long a1, unsigned long a2,
607				       unsigned long a3)
608{ }
609static inline void audit_syscall_exit(void *pt_regs)
610{ }
611static inline bool audit_dummy_context(void)
612{
613	return true;
614}
615static inline void audit_set_context(struct task_struct *task, struct audit_context *ctx)
616{ }
617static inline struct audit_context *audit_context(void)
618{
619	return NULL;
620}
621static inline struct filename *audit_reusename(const __user char *name)
622{
623	return NULL;
624}
625static inline void audit_getname(struct filename *name)
626{ }
627static inline void audit_inode(struct filename *name,
628				const struct dentry *dentry,
629				unsigned int aflags)
630{ }
631static inline void audit_file(struct file *file)
632{
633}
634static inline void audit_inode_parent_hidden(struct filename *name,
635				const struct dentry *dentry)
636{ }
637static inline void audit_inode_child(struct inode *parent,
638				     const struct dentry *dentry,
639				     const unsigned char type)
640{ }
641static inline void audit_core_dumps(long signr)
642{ }
643static inline void audit_seccomp(unsigned long syscall, long signr, int code)
644{ }
645static inline void audit_seccomp_actions_logged(const char *names,
646						const char *old_names, int res)
647{ }
648static inline void audit_ipc_obj(struct kern_ipc_perm *ipcp)
649{ }
650static inline void audit_ipc_set_perm(unsigned long qbytes, uid_t uid,
651					gid_t gid, umode_t mode)
652{ }
653static inline void audit_bprm(struct linux_binprm *bprm)
654{ }
655static inline int audit_socketcall(int nargs, unsigned long *args)
656{
657	return 0;
658}
659
660static inline int audit_socketcall_compat(int nargs, u32 *args)
661{
662	return 0;
663}
664
665static inline void audit_fd_pair(int fd1, int fd2)
666{ }
667static inline int audit_sockaddr(int len, void *addr)
668{
669	return 0;
670}
671static inline void audit_mq_open(int oflag, umode_t mode, struct mq_attr *attr)
672{ }
673static inline void audit_mq_sendrecv(mqd_t mqdes, size_t msg_len,
674				     unsigned int msg_prio,
675				     const struct timespec64 *abs_timeout)
676{ }
677static inline void audit_mq_notify(mqd_t mqdes,
678				   const struct sigevent *notification)
679{ }
680static inline void audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
681{ }
682static inline int audit_log_bprm_fcaps(struct linux_binprm *bprm,
683				       const struct cred *new,
684				       const struct cred *old)
685{
686	return 0;
687}
688static inline void audit_log_capset(const struct cred *new,
689				    const struct cred *old)
690{ }
691static inline void audit_mmap_fd(int fd, int flags)
692{ }
693
694static inline void audit_openat2_how(struct open_how *how)
695{ }
696
697static inline void audit_log_kern_module(const char *name)
698{ }
699
700static inline void audit_fanotify(u32 response, struct fanotify_response_info_audit_rule *friar)
701{ }
702
703static inline void audit_tk_injoffset(struct timespec64 offset)
704{ }
705
706static inline void audit_ntp_init(struct audit_ntp_data *ad)
707{ }
708
709static inline void audit_ntp_set_old(struct audit_ntp_data *ad,
710				     enum audit_ntp_type type, long long val)
711{ }
712
713static inline void audit_ntp_set_new(struct audit_ntp_data *ad,
714				     enum audit_ntp_type type, long long val)
715{ }
716
717static inline void audit_ntp_log(const struct audit_ntp_data *ad)
718{ }
719
720static inline void audit_ptrace(struct task_struct *t)
721{ }
722
723static inline void audit_log_nfcfg(const char *name, u8 af,
724				   unsigned int nentries,
725				   enum audit_nfcfgop op, gfp_t gfp)
726{ }
727
728#define audit_n_rules 0
729#define audit_signals 0
730#endif /* CONFIG_AUDITSYSCALL */
731
732static inline bool audit_loginuid_set(struct task_struct *tsk)
733{
734	return uid_valid(audit_get_loginuid(tsk));
735}
736
737#endif
~/ Read-only file preview.