libseat: Check euid before using builtin
This commit is contained in:
parent
52fe75d5a4
commit
1ae6c3b3dd
1 changed files with 5 additions and 0 deletions
|
@ -575,6 +575,11 @@ static struct libseat *builtin_open_seat(struct libseat_seat_listener *listener,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (geteuid() != 0) {
|
||||||
|
log_debug("Built-in seatd instance requires root privileges");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
pid_t pid = fork();
|
pid_t pid = fork();
|
||||||
if (pid == -1) {
|
if (pid == -1) {
|
||||||
log_errorf("Could not fork: %s", strerror(errno));
|
log_errorf("Could not fork: %s", strerror(errno));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue