mirror of
https://github.com/swaywm/sway.git
synced 2025-11-03 09:01:43 -05:00
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.
This commit is contained in:
parent
58af001517
commit
c977349120
7 changed files with 233 additions and 76 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue