Add support for landlock_create_ruleset (444), landlock_add_rule (445) and landlock_r...
[valgrind.git] / memcheck / tests / solaris / scalar_auditon_stat.c
blob4b30230af5962e441e4538a14c67945208c3980a
1 /* Scalar test for commands A_GETSTAT and A_SETSTAT for auditon(2) subcode
2 of the auditsys() syscall. Available on Solaris 11.3 and illumos,
3 removed in Solaris 11.4. */
5 #include "scalar.h"
7 #include <bsm/audit.h>
9 __attribute__((noinline))
10 static void sys_auditsys(void)
12 GO(SYS_auditsys, "(BSM_AUDITCTL,A_GETSTAT) 3s 1m");
13 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_GETSTAT, x0); FAIL;
16 __attribute__((noinline))
17 static void sys_auditsys2(void)
19 GO(SYS_auditsys, "(BSM_AUDITCTL,A_SETSTAT) 3s 1m");
20 SY(SYS_auditsys, x0 + BSM_AUDITCTL, x0 + A_SETSTAT, x0); FAIL;
23 int main(void)
25 /* Uninitialised, but we know px[0] is 0x0. */
26 long *px = malloc(sizeof(long));
27 x0 = px[0];
29 /* SYS_auditsys 186 */
30 sys_auditsys();
31 sys_auditsys2();
33 return 0;