wind: Stop using magic numbers for user and group IDs
This commit is contained in:
parent
16223b2f53
commit
ea14dab7d7
@ -22,6 +22,9 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static constexpr uid_t WIND_USER_ID = 2;
|
||||
static constexpr gid_t WIND_GROUP_ID = 2;
|
||||
|
||||
static void debug(const Vector<OwnedPtr<Client>>& clients)
|
||||
{
|
||||
os::println("--- wind: DEBUG OUTPUT ---");
|
||||
@ -121,8 +124,8 @@ Result<int> luna_main(int argc, char** argv)
|
||||
close(fd);
|
||||
}
|
||||
|
||||
setegid(2);
|
||||
seteuid(2);
|
||||
setegid(WIND_GROUP_ID);
|
||||
seteuid(WIND_USER_ID);
|
||||
|
||||
if (setsid() < 0) perror("setsid");
|
||||
|
||||
@ -157,8 +160,8 @@ Result<int> luna_main(int argc, char** argv)
|
||||
|
||||
umask(0002);
|
||||
|
||||
setuid(2);
|
||||
setgid(2);
|
||||
setgid(WIND_GROUP_ID);
|
||||
setuid(WIND_USER_ID);
|
||||
|
||||
ui::Color background = ui::Color::from_rgb(0x10, 0x10, 0x10);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user