mirror of
https://github.com/NickHu/sway
synced 2024-12-27 21:58:11 +01:00
Log capability dropping
This commit is contained in:
parent
ea1313d80d
commit
d9ba61d7e9
1 changed files with 1 additions and 0 deletions
|
@ -331,6 +331,7 @@ int main(int argc, char **argv) {
|
||||||
// Drop every cap except CAP_SYS_PTRACE
|
// Drop every cap except CAP_SYS_PTRACE
|
||||||
cap_t caps = cap_init();
|
cap_t caps = cap_init();
|
||||||
cap_value_t keep = CAP_SYS_PTRACE;
|
cap_value_t keep = CAP_SYS_PTRACE;
|
||||||
|
sway_log(L_INFO, "Dropping extra capabilities");
|
||||||
if (cap_set_flag(caps, CAP_PERMITTED, 1, &keep, CAP_SET) ||
|
if (cap_set_flag(caps, CAP_PERMITTED, 1, &keep, CAP_SET) ||
|
||||||
cap_set_flag(caps, CAP_EFFECTIVE, 1, &keep, CAP_SET) ||
|
cap_set_flag(caps, CAP_EFFECTIVE, 1, &keep, CAP_SET) ||
|
||||||
cap_set_proc(caps)) {
|
cap_set_proc(caps)) {
|
||||||
|
|
Loading…
Reference in a new issue