aboutsummaryrefslogtreecommitdiffstats
path: root/sway/main.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-08-09 08:44:37 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2018-08-09 08:45:32 -0400
commitdb0fa066e597fffba92fc23b2f78f094b0ccaf0b (patch)
tree14711ebf847ada3ca965936a7b2d721d1bc82c59 /sway/main.c
parentMerge pull request #2440 from RedSoxFan/bg-swaynag-reading-only (diff)
downloadsway-db0fa066e597fffba92fc23b2f78f094b0ccaf0b.tar.gz
sway-db0fa066e597fffba92fc23b2f78f094b0ccaf0b.tar.zst
sway-db0fa066e597fffba92fc23b2f78f094b0ccaf0b.zip
Remove obsolete security sanity check
Diffstat (limited to 'sway/main.c')
-rw-r--r--sway/main.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/sway/main.c b/sway/main.c
index d433368b..54f48340 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -182,26 +182,6 @@ static void log_kernel() {
182 pclose(f); 182 pclose(f);
183} 183}
184 184
185static void security_sanity_check() {
186 // TODO: Notify users visually if this has issues
187 struct stat s;
188 if (stat("/proc", &s)) {
189 wlr_log(WLR_ERROR,
190 "!! DANGER !! /proc is not available - sway CANNOT enforce security rules!");
191 }
192#ifdef __linux__
193 cap_flag_value_t v;
194 cap_t cap = cap_get_proc();
195 if (!cap || cap_get_flag(cap, CAP_SYS_PTRACE, CAP_PERMITTED, &v) != 0 || v != CAP_SET) {
196 wlr_log(WLR_ERROR,
197 "!! DANGER !! Sway does not have CAP_SYS_PTRACE and cannot enforce security rules for processes running as other users.");
198 }
199 if (cap) {
200 cap_free(cap);
201 }
202#endif
203}
204
205static void executable_sanity_check() { 185static void executable_sanity_check() {
206#ifdef __linux__ 186#ifdef __linux__
207 struct stat sb; 187 struct stat sb;
@@ -430,8 +410,6 @@ int main(int argc, char **argv) {
430 free(config_path); 410 free(config_path);
431 } 411 }
432 412
433 security_sanity_check();
434
435 if (!terminate_request) { 413 if (!terminate_request) {
436 if (!server_start_backend(&server)) { 414 if (!server_start_backend(&server)) {
437 sway_terminate(EXIT_FAILURE); 415 sway_terminate(EXIT_FAILURE);