mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-26 21:58:08 +01:00
Minor fix of code duplication.
Removes 3~ lines of code that didn't need to be restated.
This commit is contained in:
parent
77b16a5124
commit
37f0e1f1a2
1 changed files with 1 additions and 5 deletions
|
@ -186,11 +186,7 @@ static void log_kernel(void) {
|
|||
|
||||
static bool drop_permissions(void) {
|
||||
if (getuid() != geteuid() || getgid() != getegid()) {
|
||||
if (setgid(getgid()) != 0) {
|
||||
sway_log(SWAY_ERROR, "Unable to drop root, refusing to start");
|
||||
return false;
|
||||
}
|
||||
if (setuid(getuid()) != 0) {
|
||||
if (setuid(getuid()) != 0 || setgid(getgid()) != 0) {
|
||||
sway_log(SWAY_ERROR, "Unable to drop root, refusing to start");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue