diff --git a/makefile b/makefile index a6d4d0d..68a26df 100644 --- a/makefile +++ b/makefile @@ -79,6 +79,7 @@ install: $(BIND)/$(NAME) @install -dZ $(DATADIR)/lang @install -DZ $(RESD)/lang/* -t $(DATADIR)/lang @install -DZ $(RESD)/ly.service -m 644 -t ${DESTDIR}/usr/lib/systemd/system + @install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d installnoconf: $(BIND)/$(NAME) @echo "installing without the configuration file" @@ -89,6 +90,7 @@ installnoconf: $(BIND)/$(NAME) @install -dZ $(DATADIR)/lang @install -DZ $(RESD)/lang/* -t $(DATADIR)/lang @install -DZ $(RESD)/ly.service -m 644 -t ${DESTDIR}/usr/lib/systemd/system + @install -DZ $(RESD)/pam.d/ly -m 644 -t ${DESTDIR}/etc/pam.d uninstall: @echo "uninstalling" @@ -96,6 +98,7 @@ uninstall: @rm -rf $(DATADIR) @rm -f ${DESTDIR}/usr/bin/ly @rm -f ${DESTDIR}/usr/lib/systemd/system/ly.service + @rm -f ${DESTDIR}/etc/pam.d/ly clean: @echo "cleaning" diff --git a/res/config.ini b/res/config.ini index 297507e..f9d9db4 100644 --- a/res/config.ini +++ b/res/config.ini @@ -69,8 +69,8 @@ # file in which to save and load the default desktop and login #save_file = /etc/ly/save -# service name (pam needs this set to login) -#service_name = login +# service name (set to ly to use the provided pam config file) +#service_name = ly # command executed when pressing F1 #shutdown_cmd = /sbin/shutdown -a now diff --git a/res/pam.d/ly b/res/pam.d/ly new file mode 100644 index 0000000..322461b --- /dev/null +++ b/res/pam.d/ly @@ -0,0 +1,6 @@ +#%PAM-1.0 + +auth include login +account include login +password include login +session include login diff --git a/src/config.c b/src/config.c index 74a237b..51e36c3 100644 --- a/src/config.c +++ b/src/config.c @@ -285,7 +285,7 @@ void config_defaults() config.restart_cmd = strdup("/sbin/shutdown -r now"); config.save = true; config.save_file = strdup("/etc/ly/save"); - config.service_name = strdup("login"); + config.service_name = strdup("ly"); config.shutdown_cmd = strdup("/sbin/shutdown -a now"); config.term_reset_cmd = strdup("/usr/bin/tput reset"); config.tty = 2;