Author: rmeggins
Update of /cvs/dirsec/adminserver/m4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18539/adminserver/m4
Modified Files:
httpd.m4 mod_nss.m4 nss.m4
Log Message:
Resolves: bug 239502
Description: adminserver: autotools, FHS, and many bug fixes
Fix Description: 1) Fixes for RHEL5 and Apache 2.2 - the existing code for handling Apache
2.2 did not work, including cgisock code in httpd.conf
2) better support for mod_nss detection - look in several places for pcache and module
3) admin server post install will mkdirs that it uses if they do not already exist, and
set permissions appropriately
4) use --variable=libdir with nss pkg-config to get the libdir - --libs-only-L returns
nothing if the library is already in the system libdir - we need the actual libdir in
every case because we have to use it in the ld_preload in the startup script
Index: httpd.m4
===================================================================
RCS file: /cvs/dirsec/adminserver/m4/httpd.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- httpd.m4 11 May 2007 19:44:07 -0000 1.2
+++ httpd.m4 21 May 2007 15:52:27 -0000 1.3
@@ -43,7 +43,7 @@
httpdconf=${httpd_root}/${httpd_conf_rel}
mimemagic=`grep MIMEMagicFile $httpdconf|grep -v \^# | awk '{print $2}'`
-if [ ! -f "$mimemagic" ] ; then
+if test ! -f "$mimemagic" ; then
# assume relative to root
mimemagic=${httpd_root}/${mimemagic}
fi
Index: mod_nss.m4
===================================================================
RCS file: /cvs/dirsec/adminserver/m4/mod_nss.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mod_nss.m4 11 May 2007 19:44:07 -0000 1.1
+++ mod_nss.m4 21 May 2007 15:52:27 -0000 1.2
@@ -81,9 +81,38 @@
# else, punt
if test -z "$modnssbindir" ; then
- modnssbindir='$(sbindir)'
+ nsspcache=`grep NSSPassPhraseHelper $httpdconf|awk '{print $2}'`
+ if test -z "$nsspcache" ; then
+ nsspcache=`grep NSSPassPhraseHelper $httpd_root/conf.d/* | awk '{print
$2}'`
+ fi
+ if test -z "$nsspcache" ; then
+ # same directory as Apache?
+ modnssbindir=`dirname $HTTPD`
+ nsspcache="$modnssbindir/nss_pcache"
+ fi
+ if test -z "$nsspcache" -o ! -f "$nsspcache" ; then
+ AC_PATH_PROG([nsspcache], [nss_pcache], [],
+
[$PATH:/opt/hpws/apache/bin:/usr/local/apache/sbin:/usr/local/apache2/sbin:/usr/sbin])
+ fi
+ if test -n "$nsspcache" -a -f "$nsspcache" ; then
+ modnssbindir=`dirname $nsspcache`
+ else
+ modnssbindir=
+ fi
fi
if test -z "$nssmoddir" ; then
nssmoddir="$moddir"
fi
+
+if test ! -f "$modnssbindir/nss_pcache" ; then
+ AC_MSG_ERROR([Could not find the mod_nss pass phrase helper
$modnssbindir/nss_pcache])
+else
+ AC_MSG_RESULT([Using mod_nss pass phrase helper $modnssbindir/nss_pcache])
+fi
+
+if test ! -d "$nssmoddir" ; then
+ AC_MSG_ERROR([Could not find the mod_nss module directory $nssmoddir])
+else
+ AC_MSG_RESULT([Using mod_nss module directory $nssmoddir])
+fi
Index: nss.m4
===================================================================
RCS file: /cvs/dirsec/adminserver/m4/nss.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- nss.m4 9 May 2007 00:26:38 -0000 1.1
+++ nss.m4 21 May 2007 15:52:27 -0000 1.2
@@ -79,12 +79,12 @@
if $PKG_CONFIG --exists nss; then
nss_inc=`$PKG_CONFIG --cflags-only-I nss`
nss_lib=`$PKG_CONFIG --libs-only-L nss`
- nss_libdir=`$PKG_CONFIG --libs-only-L nss | sed -e s/-L// | sed -e s/\ .*$//`
+ nss_libdir=`$PKG_CONFIG --variable=libdir nss`
AC_MSG_RESULT([using system NSS])
elif $PKG_CONFIG --exists dirsec-nss; then
nss_inc=`$PKG_CONFIG --cflags-only-I dirsec-nss`
nss_lib=`$PKG_CONFIG --libs-only-L dirsec-nss`
- nss_libdir=`$PKG_CONFIG --libs-only-L dirsec-nss | sed -e s/-L// | sed -e s/\
.*$//`
+ nss_libdir=`$PKG_CONFIG --variable=libdir dirsec-nss`
AC_MSG_RESULT([using system dirsec NSS])
else
AC_MSG_ERROR([NSS not found, specify with --with-nss.])
Show replies by date