Log error and exit if swaylock is suid with PAM backend.
This commit is contained in:
parent
af03502384
commit
ccefa54bb7
5
pam.c
5
pam.c
@ -12,6 +12,11 @@
|
||||
static char *pw_buf = NULL;
|
||||
|
||||
void initialize_pw_backend(void) {
|
||||
if (getuid() != geteuid() || getgid() != getegid()) {
|
||||
swaylock_log(LOG_ERROR,
|
||||
"swaylock has suid but doesn't require it with PAM backend");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (!spawn_comm_child()) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user