diff options
author | Drew DeVault <[email protected]> | 2018-09-28 12:18:54 +0200 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2018-09-28 13:53:01 +0200 |
commit | c9773491207d36d6f5e651adcb7a64c7a015bba3 (patch) | |
tree | ed2d195ac03609bdb1b3132d1ef748ad59132e8a /swaylock/main.c | |
parent | 58af0015170204de6d186f0f25cd0b9315d062d7 (diff) |
Add support for building swaylock without PAM
This involves setuid'ing swaylock, which then forks and drops perms on
the parent process. The child process remains root and listens on a pipe
for requests to validate passwords against /etc/shadow.
Diffstat (limited to 'swaylock/main.c')
-rw-r--r-- | swaylock/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/swaylock/main.c b/swaylock/main.c index c25c8eec..693cbc10 100644 --- a/swaylock/main.c +++ b/swaylock/main.c @@ -845,6 +845,9 @@ static int load_config(char *path, struct swaylock_state *state, static struct swaylock_state state; int main(int argc, char **argv) { + wlr_log_init(WLR_DEBUG, NULL); + initialize_pw_backend(); + enum line_mode line_mode = LM_LINE; state.args = (struct swaylock_args){ .mode = BACKGROUND_MODE_SOLID_COLOR, @@ -857,8 +860,6 @@ int main(int argc, char **argv) { wl_list_init(&state.images); set_default_colors(&state.args.colors); - wlr_log_init(WLR_DEBUG, NULL); - char *config_path = NULL; int result = parse_options(argc, argv, NULL, NULL, &config_path); if (result != 0) { |