diff options
Diffstat (limited to 'lib/compat_audit.c')
| -rw-r--r-- | lib/compat_audit.c | 15 | 
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/compat_audit.c b/lib/compat_audit.c index 77eabad69b4a..3d6b8996f027 100644 --- a/lib/compat_audit.c +++ b/lib/compat_audit.c @@ -1,6 +1,7 @@  // SPDX-License-Identifier: GPL-2.0  #include <linux/init.h>  #include <linux/types.h> +#include <linux/audit_arch.h>  #include <asm/unistd32.h>  unsigned compat_dir_class[] = { @@ -33,19 +34,23 @@ int audit_classify_compat_syscall(int abi, unsigned syscall)  	switch (syscall) {  #ifdef __NR_open  	case __NR_open: -		return 2; +		return AUDITSC_OPEN;  #endif  #ifdef __NR_openat  	case __NR_openat: -		return 3; +		return AUDITSC_OPENAT;  #endif  #ifdef __NR_socketcall  	case __NR_socketcall: -		return 4; +		return AUDITSC_SOCKETCALL;  #endif  	case __NR_execve: -		return 5; +		return AUDITSC_EXECVE; +#ifdef __NR_openat2 +	case __NR_openat2: +		return AUDITSC_OPENAT2; +#endif  	default: -		return 1; +		return AUDITSC_COMPAT;  	}  }  |