[PolicyKit] configure option to choose dir where to install PAM module

Frederic Peters fpeters at entrouvert.com
Tue Jun 6 07:27:23 PDT 2006


Hello,

jhbuild monitors files being installed and prevents them from being
written out of its target directory.  This means HAL now prevents
jhautobuild[1] to complete since pam-polkit-console hardcodes
/lib/security.

Attached is a patch with a configure option (--with-pam-module-dir) so
it is possible to set an other directory.



Regards,

        Frederic


[1] http://jhbuild.bxlug.be
-------------- next part --------------
Index: configure.in
===================================================================
RCS file: /cvs/hal/PolicyKit/configure.in,v
retrieving revision 1.6
diff -u -u -r1.6 configure.in
--- configure.in	5 Jun 2006 23:39:00 -0000	1.6
+++ configure.in	6 Jun 2006 14:21:05 -0000
@@ -262,9 +262,24 @@
 AC_SUBST(HAVE_PAM)
 AC_SUBST(AUTH_LIBS)
 
+AC_CHECK_HEADER(security/pam_modutil.h, [AC_DEFINE(HAVE_PAM_MODUTIL_H, [], "Have pam_modutil.h")])
+AC_CHECK_HEADER(security/pam_ext.h, [AC_DEFINE(HAVE_PAM_EXT_H, [], "Have pam_ext.h")])
+AC_CHECK_LIB(pam, pam_vsyslog, [AC_DEFINE(HAVE_PAM_VSYSLOG, [], "Have pam_vsyslog")])
 
 AC_ARG_WITH(os-type,     [  --with-os-type=<os>        distribution or OS (redhat)])
 
+
+AC_ARG_WITH(pam-module-dir,
+[  --with-pam-module-dir=[dirname]  directory to install PAM security module])
+if ! test -z "$with_pam_module_dir"; then
+    PAM_MODULE_DIR=$with_pam_module_dir
+else
+    PAM_MODULE_DIR="/lib/security"
+fi
+
+AC_SUBST(PAM_MODULE_DIR)
+
+
 #### Check our operating system (distro-tweaks required)
 if test "z$with_os_type" = "z"; then
 	AC_CHECK_FILE(/etc/redhat-release,distro_type="redhat")
@@ -375,6 +390,7 @@
         localstatedir:              ${LOCALSTATEDIR}
         docdir:                     ${DOCDIR}
         PAM prefix:                 ${PAM_PREFIX}
+	PAM module dir:             ${PAM_MODULE_DIR}
 
         compiler:                   ${CC}
         cflags:                     ${CFLAGS}
Index: pam-polkit-console/Makefile.am
===================================================================
RCS file: /cvs/hal/PolicyKit/pam-polkit-console/Makefile.am,v
retrieving revision 1.1
diff -u -u -r1.1 Makefile.am
--- pam-polkit-console/Makefile.am	5 Jun 2006 23:39:00 -0000	1.1
+++ pam-polkit-console/Makefile.am	6 Jun 2006 14:21:05 -0000
@@ -2,7 +2,7 @@
 LOCKDIR     = $(localstatedir)/run/polkit-console
 LOCKDIRMODE = 0700
 
-securelibdir = /lib/security
+securelibdir = $(PAM_MODULE_DIR)
 securelib_LTLIBRARIES = pam_polkit_console.la
 
 pam_polkit_console_la_LDFLAGS = -no-undefined -avoid-version -module


More information about the hal mailing list