1 #include "../../../config.h"
3 #if defined(linux) && !defined(MUSL_LIBC)
6 #include <stdio.h> /* printf() */
7 #include <unistd.h> /* syscall() */
8 #include <sys/syscall.h> /* __NR_capget */
9 #include <sys/types.h> /* uid_t */
10 #include <linux/capability.h> /* _LINUX_CAPABILITY_VERSION */
15 struct __user_cap_header_struct h
;
16 struct __user_cap_data_struct d
;
20 fprintf(stderr
, "Running as root\n");
21 h
.version
= _LINUX_CAPABILITY_VERSION
;
23 syscall_result
= syscall(__NR_capget
, &h
, &d
);
24 if (syscall_result
>= 0)
50 fprintf(stderr
, "This program is Linux with GNU libc specific\n");