Date: Thu, 10 Oct 2019 21:04:16 +0200 From: Jan Beich <jbeich@FreeBSD.org> To: John Kennedy <warlock@phouka.net> Cc: freebsd-x11@freebsd.org Subject: Re: sway-1.2_1 crashes Message-ID: <8sps-o21b-wny@FreeBSD.org> In-Reply-To: <20191010182705.GC46984@phouka1.phouka.net> (John Kennedy's message of "Thu, 10 Oct 2019 11:27:05 -0700") References: <20191007165337.GA85696@phouka1.phouka.net> <wodg-9qj1-wny@FreeBSD.org> <20191007232340.GB85696@phouka1.phouka.net> <20191008172007.GA89365@phouka1.phouka.net> <d0f4-pju3-wny@FreeBSD.org> <20191010182705.GC46984@phouka1.phouka.net>
next in thread | previous in thread | raw e-mail | index | archive | help
John Kennedy <warlock@phouka.net> writes: > I was trying to get swaylock to work, it didn't like my password, so I > was going to switch consoles and wack it, but it got my keyboard first. swaylock is kinda broken on FreeBSD, see https://github.com/swaywm/swaylock/issues/3#issuecomment-446575951 Try the following hack. I don't use swaylock myself and don't know PAM enough (both on Linux and FreeBSD) to come up with the correct fix. Index: x11/swaylock/Makefile =================================================================== --- x11/swaylock/Makefile (revision 514156) +++ x11/swaylock/Makefile (working copy) @@ -2,7 +2,7 @@ PORTNAME= swaylock DISTVERSION= 1.4 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ @@ -22,7 +22,7 @@ USES= compiler:c11 meson pkgconfig USE_GITHUB= yes GH_ACCOUNT= swaywm USE_GNOME= cairo pango -PLIST_FILES= bin/${PORTNAME} \ +PLIST_FILES= "@(,,4755) bin/${PORTNAME}" \ etc/pam.d/${PORTNAME} \ share/bash-completion/completions/${PORTNAME} \ share/fish/completions/${PORTNAME}.fish \ Index: x11/swaylock/files/patch-pam.c =================================================================== --- x11/swaylock/files/patch-pam.c (nonexistent) +++ x11/swaylock/files/patch-pam.c (working copy) @@ -0,0 +1,17 @@ +--- pam.c.orig 2019-01-29 19:48:00 UTC ++++ pam.c +@@ -12,12 +12,14 @@ + static char *pw_buf = NULL; + + void initialize_pw_backend(int argc, char **argv) { ++#ifdef __linux__ + if (getuid() != geteuid() || getgid() != getegid()) { + swaylock_log(LOG_ERROR, + "swaylock is setuid, but was compiled with the PAM" + " backend. Run 'chmod a-s %s' to fix. Aborting.", argv[0]); + exit(EXIT_FAILURE); + } ++#endif + if (!spawn_comm_child()) { + exit(EXIT_FAILURE); + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8sps-o21b-wny>