projects
/
releases.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
d2a2e152195f976bbac0262594580de6de1f309e
[releases.git]
/
test-libcap.c
1
// SPDX-License-Identifier: GPL-2.0
2
#include <sys/capability.h>
3
#include <linux/capability.h>
4
5
int main(void)
6
{
7
cap_flag_value_t val;
8
cap_t caps = cap_get_proc();
9
10
if (!caps)
11
return 1;
12
13
if (cap_get_flag(caps, CAP_SYS_ADMIN, CAP_EFFECTIVE, &val) != 0)
14
return 1;
15
16
if (cap_free(caps) != 0)
17
return 1;
18
19
return 0;
20
}