components/pam_pkcs11/patches/01-solaris_build.patch
author Lukas Rovensky <Lukas.Rovensky@oracle.com>
Mon, 09 Jan 2017 02:09:07 -0800
branchs11u3-sru
changeset 7576 a576acd7074d
parent 6937 1366743d2272
permissions -rw-r--r--
22344272 sudo(8) should call pam_{open,close}_session(3PAM)

#
# This patch contains changes for Solaris build.   This is for Solaris only,
# so we will not contribute back this change to the upstream community. 
#
--- pam_pkcs11-0.6.8_ORIG/configure.in	Fri Jul 15 15:05:17 2016
+++ pam_pkcs11-0.6.8_NEW/configure.in	Wed Jul 27 14:14:43 2016
@@ -15,7 +15,7 @@
 
 AM_MAINTAINER_MODE
 
-AM_GNU_GETTEXT_VERSION([0.17])
+AM_GNU_GETTEXT_VERSION([0.16])
 AM_GNU_GETTEXT([external])
 
 dnl Add the languages which your application supports here.
@@ -87,12 +87,10 @@
 AC_SUBST(confdir)
 
 # Add argument for using ldap
-AC_ARG_WITH(ldap,
-  AC_HELP_STRING([--with-ldap], [use ldap (default=yes)]))
-if test "$with_ldap" = "no" -o "$with_ldap" = "false"
+AC_ARG_ENABLE(ldap,
+  AC_HELP_STRING([--enable-openldap], [use openldap or mozilla_ldap (default=yes)]))
+if test "$enable_openldap" = "no" -o "$enable_openldap" = "false"
 then
-  with_ldap=no
-else
   AC_CHECK_LIB( ldap, ldap_init,
 	[
 	with_ldap=yes
@@ -101,7 +99,17 @@
 	AC_MSG_WARN([Cannot find LDAP libraries. LDAP support disabled])
 	with_ldap=no
 	])
+else
+  AC_CHECK_LIB( ldap, ldap_init,
+	[
+	with_ldap=yes
+	LIBS="$LIBS -lldap_r"
+	],[
+	AC_MSG_WARN([Cannot find LDAP libraries. LDAP support disabled])
+	with_ldap=no
+	])
 fi
+
 if test "$with_ldap" \!= "no"; then
   AC_CHECK_FUNCS(ldap_init ldap_initialize)
   AC_CHECK_FUNCS(ldap_set_option ldap_get_option)  
--- pam_pkcs11-0.6.8_ORIG/src/pam_pkcs11/Makefile.am	Fri Jul 15 15:05:19 2016
+++ pam_pkcs11-0.6.8_NEW/src/pam_pkcs11/Makefile.am	Fri Jul 22 15:36:51 2016
@@ -2,8 +2,8 @@
 
 MAINTAINERCLEANFILES = Makefile.in
 
-AM_CFLAGS = -Wall -fno-strict-aliasing $(CRYPTO_CFLAGS)
-AM_CPPFLAGS = -Wall -fno-strict-aliasing $(CRYPTO_CFLAGS)
+AM_CFLAGS = -v -fno-strict-aliasing $(CRYPTO_CFLAGS)
+AM_CPPFLAGS = -v -fno-strict-aliasing $(CRYPTO_CFLAGS)
 
 pamdir=$(libdir)/security