mirror of
https://github.com/swaywm/sway.git
synced 2024-11-14 06:24:20 +01:00
Log capability dropping
This commit is contained in:
parent
ea1313d80d
commit
d9ba61d7e9
@ -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 New Issue
Block a user