[Xfce4-commits] [apps/xfce4-screensaver] 01/01: Add PAM auth type detection and configuration flag (bug #14779)

noreply at xfce.org noreply at xfce.org
Fri Oct 26 12:11:50 CEST 2018


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository apps/xfce4-screensaver.

commit f890b1ecb4c91651d4812e9add75f652a897d9f4
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Fri Oct 26 06:11:43 2018 -0400

    Add PAM auth type detection and configuration flag (bug #14779)
---
 README.md                          |  4 ++++
 configure.ac                       | 18 ++++++++++++++++++
 data/Makefile.am                   | 11 +++++++----
 data/xfce4-screensaver             |  2 --
 data/xfce4-screensaver.common-auth |  2 ++
 data/xfce4-screensaver.system-auth |  2 ++
 6 files changed, 33 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 031a3b9..e7a208d 100644
--- a/README.md
+++ b/README.md
@@ -32,6 +32,10 @@ See the file 'INSTALL'
 
 `./autogen.sh --prefix=/usr --sysconfdir=/etc`
 
+You may need to set your PAM auth type if it is not correctly detected.
+
+`--with-pam-auth-type=<auth-type>   specify pam auth type (common or system)`
+
 (For testing, we are using:
  `./autogen.sh --disable-static --with-mit-ext --with-console-kit --enable-locking --enable-debug --sysconfdir=/etc`
 )
diff --git a/configure.ac b/configure.ac
index 0a40185..35b2087 100644
--- a/configure.ac
+++ b/configure.ac
@@ -158,6 +158,23 @@ fi
 PAM_PREFIX=`eval echo $PAM_PREFIX_UNEXPANDED`
 AC_SUBST(PAM_PREFIX)
 
+# Determine the PAM authentication type
+
+AC_CACHE_CHECK([for PAM auth type], ac_cv_pam_auth_type,
+                [if test -f /etc/pam.d/common-auth ; then
+                  ac_cv_pam_auth_type=common
+                else
+                  ac_cv_pam_auth_type=system
+                fi])
+withval=""
+AC_ARG_WITH(pam-auth-type,
+[  --with-pam-auth-type=<auth-type>   specify pam auth type (common or system)],[
+if test x$withval != x; then
+   ac_cv_pam_auth_type="$withval"
+fi])
+PAM_AUTH_TYPE="$ac_cv_pam_auth_type"
+AC_SUBST(PAM_AUTH_TYPE)
+
 # Translation distcheck fix
 XGETTEXT_ARGS=
 AC_SUBST(XGETTEXT_ARGS)
@@ -1154,6 +1171,7 @@ echo "
         systemd support:          ${use_systemd}
         ConsoleKit support:       ${use_console_kit}
         PAM support:              ${have_pam}
+        PAM auth type:            ${PAM_AUTH_TYPE}
         bsd_auth(3) support:      ${have_bsdauth}
         Have shadow passwords:    ${have_shadow}
         Have adjunct shadow:      ${have_shadow_adjunct}
diff --git a/data/Makefile.am b/data/Makefile.am
index e1b3b19..ab83733 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -47,7 +47,8 @@ EXTRA_DIST = 				\
 	$(directory_in_files)		\
 	$(gtkbuilder_DATA)		\
 	$(man_MANS)			\
-	xfce4-screensaver		\
+	xfce4-screensaver.common-auth		\
+	xfce4-screensaver.system-auth		\
 	xfce4-screensaver.pc.in		\
 	org.xfce.ScreenSaver.service.in\
 	xscreensaver-config.xsl		\
@@ -72,7 +73,11 @@ install-data-hook:
 	   fi; \
 	   if test $$system = Linux; then \
 		if test '!' -f $(DESTDIR)$(PAM_PREFIX)/pam.d/xfce4-screensaver; then \
-		     $(INSTALL_DATA) xfce4-screensaver $(DESTDIR)$(PAM_PREFIX)/pam.d/xfce4-screensaver; \
+			 if test "x$(PAM_AUTH_TYPE)" = "xsystem"; then \
+		     	$(INSTALL_DATA) xfce4-screensaver.system-auth $(DESTDIR)$(PAM_PREFIX)/pam.d/xfce4-screensaver; \
+			 else \
+			 	$(INSTALL_DATA) xfce4-screensaver.common-auth $(DESTDIR)$(PAM_PREFIX)/pam.d/xfce4-screensaver; \
+			 fi; \
 		fi; \
 		if test "x$(PAM_PREFIX)" != "x/etc/pam.d"; then \
 	             echo "***" ; \
@@ -82,8 +87,6 @@ install-data-hook:
 	             echo "***           to /etc/pam.d/xfce4-screensaver.  Otherwise, unlocking might" ; \
 	             echo "***           not work." ; \
 	             echo "***" ; \
-	             echo "***           Note: If you are using SuSE/Novell you may have to modify this file." ; \
-	             echo "***" ; \
 		fi; \
 	   fi; \
 	   if test $$system = SunOS; then \
diff --git a/data/xfce4-screensaver b/data/xfce4-screensaver
deleted file mode 100644
index 85ca31b..0000000
--- a/data/xfce4-screensaver
+++ /dev/null
@@ -1,2 +0,0 @@
- at include common-auth
-auth optional pam_gnome_keyring.so
\ No newline at end of file
diff --git a/data/xfce4-screensaver.common-auth b/data/xfce4-screensaver.common-auth
new file mode 100644
index 0000000..a9fd9ce
--- /dev/null
+++ b/data/xfce4-screensaver.common-auth
@@ -0,0 +1,2 @@
+ at include common-auth
+auth optional pam_gnome_keyring.so
diff --git a/data/xfce4-screensaver.system-auth b/data/xfce4-screensaver.system-auth
new file mode 100644
index 0000000..2a6c00d
--- /dev/null
+++ b/data/xfce4-screensaver.system-auth
@@ -0,0 +1,2 @@
+auth include system-auth
+auth optional pam_gnome_keyring.so

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list