mirror of
https://github.com/swaywm/sway.git
synced 2025-10-08 13:16:05 +00:00
Merge branch 'master' into swaymsg-cursor-position
This commit is contained in:
commit
11a00db532
1 changed files with 0 additions and 19 deletions
19
sway/main.c
19
sway/main.c
|
@ -108,20 +108,6 @@ static void log_kernel(void) {
|
|||
pclose(f);
|
||||
}
|
||||
|
||||
static bool detect_suid(void) {
|
||||
if (geteuid() != 0 && getegid() != 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (getuid() == geteuid() && getgid() == getegid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
sway_log(SWAY_ERROR, "SUID operation is no longer supported, refusing to start. "
|
||||
"This check will be removed in a future release.");
|
||||
return true;
|
||||
}
|
||||
|
||||
static void restore_nofile_limit(void) {
|
||||
if (original_nofile_rlimit.rlim_cur == 0) {
|
||||
return;
|
||||
|
@ -292,11 +278,6 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
}
|
||||
|
||||
// SUID operation is deprecated, so block it for now.
|
||||
if (detect_suid()) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Since wayland requires XDG_RUNTIME_DIR to be set, abort with just the
|
||||
// clear error message (when not running as an IPC client).
|
||||
if (!getenv("XDG_RUNTIME_DIR") && optind == argc) {
|
||||
|
|
Loading…
Add table
Reference in a new issue