projects
/
gapil.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Aggiunti vari TODO
[gapil.git]
/
listati
/
getcap.c
1
if (!pid) {
2
capab = cap_get_proc();
3
if (capab == NULL) {
4
perror("cannot get current process capabilities");
5
return 1;
6
}
7
} else {
8
capab = cap_get_pid(pid);
9
if (capab == NULL) {
10
perror("cannot get process capabilities");
11
return 1;
12
}
13
}
14
15
string = cap_to_text(capab, NULL);
16
printf("Capability: %s\n", string);
17
18
cap_free(capab);
19
cap_free(string);
20
return 0;