Commit 1c30e3af authored by Richard Guy Briggs's avatar Richard Guy Briggs Committed by Paul Moore
Browse files

audit: add support for the openat2 syscall

The openat2(2) syscall was added in kernel v5.6 with commit
fddb5d43 ("open: introduce openat2(2) syscall").

Add the openat2(2) syscall to the audit syscall classifier.

Link: https://github.com/linux-audit/audit-kernel/issues/67
Link: https://lore.kernel.org/r/f5f1a4d8699613f8c02ce762807228c841c2e26f.1621363275.git.rgb@redhat.com


Signed-off-by: default avatarRichard Guy Briggs <rgb@redhat.com>
Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
[PM: merge fuzz due to previous header rename, commit line wraps]
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 42f355ef
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ int audit_classify_syscall(int abi, unsigned syscall)
		return AUDITSC_OPENAT;
	case __NR_execve:
		return AUDITSC_EXECVE;
	case __NR_openat2:
		return AUDITSC_OPENAT2;
	default:
		return AUDITSC_NATIVE;
	}
+2 −0
Original line number Diff line number Diff line
@@ -43,6 +43,8 @@ int audit_classify_syscall(int abi, unsigned syscall)
		return AUDITSC_OPENAT;
	case __NR_execve:
		return AUDITSC_EXECVE;
	case __NR_openat2:
		return AUDITSC_OPENAT2;
	default:
		return AUDITSC_NATIVE;
	}
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ int audit_classify_syscall(int abi, unsigned syscall)
		return AUDITSC_OPENAT;
	case __NR_execve:
		return AUDITSC_EXECVE;
	case __NR_openat2:
		return AUDITSC_OPENAT2;
	default:
		return AUDITSC_NATIVE;
	}
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,8 @@ int parisc32_classify_syscall(unsigned syscall)
		return AUDITSC_OPENAT;
	case __NR_execve:
		return AUDITSC_EXECVE;
	case __NR_openat2:
		return AUDITSC_OPENAT2;
	default:
		return AUDITSC_COMPAT;
	}
+2 −0
Original line number Diff line number Diff line
@@ -54,6 +54,8 @@ int audit_classify_syscall(int abi, unsigned syscall)
		return AUDITSC_SOCKETCALL;
	case __NR_execve:
		return AUDITSC_EXECVE;
	case __NR_openat2:
		return AUDITSC_OPENAT2;
	default:
		return AUDITSC_NATIVE;
	}
Loading