mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
Fix build on FreeBSD
- Make sure CMake always finds absolute paths for Cairo, Pango and GdkPixbuf - Add forgotten json-c include path to swaymsg/CMakeLists.txt - Disable -Werror because of assert warnings - Add correct /proc/pid/file path for FreeBSD - Use libepoll-shim on FreeBSD - Only use Linux capabilities on, well, Linux
This commit is contained in:
parent
d93e53fd4b
commit
da26d69cb1
11 changed files with 127 additions and 103 deletions
|
|
@ -152,6 +152,7 @@ static void security_sanity_check() {
|
|||
sway_log(L_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) {
|
||||
|
|
@ -161,6 +162,7 @@ static void security_sanity_check() {
|
|||
if (cap) {
|
||||
cap_free(cap);
|
||||
}
|
||||
#endif
|
||||
if (!stat(SYSCONFDIR "/sway", &s)) {
|
||||
if (s.st_uid != 0 || s.st_gid != 0
|
||||
|| (s.st_mode & S_IWGRP) || (s.st_mode & S_IWOTH)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue