sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit db0fa066e597fffba92fc23b2f78f094b0ccaf0b
parent 425ee270b423eb961e5e11162b37b1fb187f50ed
Author: Drew DeVault <sir@cmpwn.com>
Date:   Thu,  9 Aug 2018 08:44:37 -0400

Remove obsolete security sanity check

Diffstat:
Msway/main.c | 22----------------------
1 file changed, 0 insertions(+), 22 deletions(-)

diff --git a/sway/main.c b/sway/main.c @@ -182,26 +182,6 @@ static void log_kernel() { pclose(f); } -static void security_sanity_check() { - // TODO: Notify users visually if this has issues - struct stat s; - if (stat("/proc", &s)) { - wlr_log(WLR_ERROR, - "!! DANGER !! /proc is not available - sway CANNOT enforce security rules!"); - } -#ifdef __linux__ - cap_flag_value_t v; - cap_t cap = cap_get_proc(); - if (!cap || cap_get_flag(cap, CAP_SYS_PTRACE, CAP_PERMITTED, &v) != 0 || v != CAP_SET) { - wlr_log(WLR_ERROR, - "!! DANGER !! Sway does not have CAP_SYS_PTRACE and cannot enforce security rules for processes running as other users."); - } - if (cap) { - cap_free(cap); - } -#endif -} - static void executable_sanity_check() { #ifdef __linux__ struct stat sb; @@ -430,8 +410,6 @@ int main(int argc, char **argv) { free(config_path); } - security_sanity_check(); - if (!terminate_request) { if (!server_start_backend(&server)) { sway_terminate(EXIT_FAILURE);