Skip to content

Commit 1c30e3a

Browse files
rgbriggspcmoore
authored andcommitted
audit: add support for the openat2 syscall
The openat2(2) syscall was added in kernel v5.6 with commit fddb5d4 ("open: introduce openat2(2) syscall"). Add the openat2(2) syscall to the audit syscall classifier. Link: linux-audit/audit-kernel#67 Link: https://lore.kernel.org/r/f5f1a4d8699613f8c02ce762807228c841c2e26f.1621363275.git.rgb@redhat.com Signed-off-by: Richard Guy Briggs <[email protected]> Acked-by: Christian Brauner <[email protected]> [PM: merge fuzz due to previous header rename, commit line wraps] Signed-off-by: Paul Moore <[email protected]>
1 parent 42f355e commit 1c30e3a

File tree

16 files changed

+36
-0
lines changed

16 files changed

+36
-0
lines changed

arch/alpha/kernel/audit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ int audit_classify_syscall(int abi, unsigned syscall)
4242
return AUDITSC_OPENAT;
4343
case __NR_execve:
4444
return AUDITSC_EXECVE;
45+
case __NR_openat2:
46+
return AUDITSC_OPENAT2;
4547
default:
4648
return AUDITSC_NATIVE;
4749
}

arch/ia64/kernel/audit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ int audit_classify_syscall(int abi, unsigned syscall)
4343
return AUDITSC_OPENAT;
4444
case __NR_execve:
4545
return AUDITSC_EXECVE;
46+
case __NR_openat2:
47+
return AUDITSC_OPENAT2;
4648
default:
4749
return AUDITSC_NATIVE;
4850
}

arch/parisc/kernel/audit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ int audit_classify_syscall(int abi, unsigned syscall)
5252
return AUDITSC_OPENAT;
5353
case __NR_execve:
5454
return AUDITSC_EXECVE;
55+
case __NR_openat2:
56+
return AUDITSC_OPENAT2;
5557
default:
5658
return AUDITSC_NATIVE;
5759
}

arch/parisc/kernel/compat_audit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ int parisc32_classify_syscall(unsigned syscall)
3636
return AUDITSC_OPENAT;
3737
case __NR_execve:
3838
return AUDITSC_EXECVE;
39+
case __NR_openat2:
40+
return AUDITSC_OPENAT2;
3941
default:
4042
return AUDITSC_COMPAT;
4143
}

arch/powerpc/kernel/audit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ int audit_classify_syscall(int abi, unsigned syscall)
5454
return AUDITSC_SOCKETCALL;
5555
case __NR_execve:
5656
return AUDITSC_EXECVE;
57+
case __NR_openat2:
58+
return AUDITSC_OPENAT2;
5759
default:
5860
return AUDITSC_NATIVE;
5961
}

arch/powerpc/kernel/compat_audit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ int ppc32_classify_syscall(unsigned syscall)
3939
return AUDITSC_SOCKETCALL;
4040
case __NR_execve:
4141
return AUDITSC_EXECVE;
42+
case __NR_openat2:
43+
return AUDITSC_OPENAT2;
4244
default:
4345
return AUDITSC_COMPAT;
4446
}

arch/s390/kernel/audit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ int audit_classify_syscall(int abi, unsigned syscall)
5454
return AUDITSC_SOCKETCALL;
5555
case __NR_execve:
5656
return AUDITSC_EXECVE;
57+
case __NR_openat2:
58+
return AUDITSC_OPENAT2;
5759
default:
5860
return AUDITSC_NATIVE;
5961
}

arch/s390/kernel/compat_audit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ int s390_classify_syscall(unsigned syscall)
4040
return AUDITSC_SOCKETCALL;
4141
case __NR_execve:
4242
return AUDITSC_EXECVE;
43+
case __NR_openat2:
44+
return AUDITSC_OPENAT2;
4345
default:
4446
return AUDITSC_COMPAT;
4547
}

arch/sparc/kernel/audit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ int audit_classify_syscall(int abi, unsigned int syscall)
5555
return AUDITSC_SOCKETCALL;
5656
case __NR_execve:
5757
return AUDITSC_EXECVE;
58+
case __NR_openat2:
59+
return AUDITSC_OPENAT2;
5860
default:
5961
return AUDITSC_NATIVE;
6062
}

arch/sparc/kernel/compat_audit.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ int sparc32_classify_syscall(unsigned int syscall)
4040
return AUDITSC_SOCKETCALL;
4141
case __NR_execve:
4242
return AUDITSC_EXECVE;
43+
case __NR_openat2:
44+
return AUDITSC_OPENAT2;
4345
default:
4446
return AUDITSC_COMPAT;
4547
}

0 commit comments

Comments
 (0)