sway-1.2_1 crashes
Jan Beich
jbeich at FreeBSD.org
Thu Oct 10 19:04:20 UTC 2019
John Kennedy <warlock at 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);
+ }
More information about the freebsd-x11
mailing list