aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortimur <timur@FreeBSD.org>2010-07-16 06:52:00 +0800
committertimur <timur@FreeBSD.org>2010-07-16 06:52:00 +0800
commit20d81701528b8b6098e7f9b270f6b537a7cf8aa2 (patch)
treeb73518cc369b810a941e6d020046100a423840e5
parent8f5e4c12f10f9e1a13ab8f2788149ce3a13ac085 (diff)
downloadfreebsd-ports-gnome-20d81701528b8b6098e7f9b270f6b537a7cf8aa2.tar.gz
freebsd-ports-gnome-20d81701528b8b6098e7f9b270f6b537a7cf8aa2.tar.zst
freebsd-ports-gnome-20d81701528b8b6098e7f9b270f6b537a7cf8aa2.zip
PR: 147293
Update net/nss-pam-ldapd to the 0.7.7 version
-rw-r--r--net/nss-pam-ldapd/Makefile40
-rw-r--r--net/nss-pam-ldapd/distinfo6
-rw-r--r--net/nss-pam-ldapd/files/nss_patch.diff212
-rw-r--r--net/nss-pam-ldapd/files/patch-Makefile.in18
-rw-r--r--net/nss-pam-ldapd/files/patch-configure212
-rw-r--r--net/nss-pam-ldapd/files/patch-nslcd__cfg.c60
-rw-r--r--net/nss-pam-ldapd/files/patch-nslcd__nslcd.c11
-rw-r--r--net/nss-pam-ldapd/files/patch-nss__exports.freebsd109
-rw-r--r--net/nss-pam-ldapd/files/patch-nss__prototypes.h43
-rw-r--r--net/nss-pam-ldapd/files/patch-nss_ldap.map30
-rw-r--r--net/nss-pam-ldapd/files/patch-pam__makefile.in2
-rw-r--r--net/nss-pam-ldapd/pkg-descr19
-rw-r--r--net/nss-pam-ldapd/pkg-plist2
13 files changed, 311 insertions, 453 deletions
diff --git a/net/nss-pam-ldapd/Makefile b/net/nss-pam-ldapd/Makefile
index aafc9e8305c4..7ab124ca993a 100644
--- a/net/nss-pam-ldapd/Makefile
+++ b/net/nss-pam-ldapd/Makefile
@@ -5,28 +5,28 @@
# $FreeBSD$
#
-PORTNAME= nss_ldapd
-PORTVERSION= 0.7.3
+PORTNAME= nss-pam-ldapd
+PORTVERSION= 0.7.7
CATEGORIES= net
MASTER_SITES= http://arthurdejong.org/nss-pam-ldapd/ \
http://static.ipfw.ru/files/
-DISTNAME= nss-pam-ldapd-${PORTVERSION}
+LICENSE= LGPL21 LGPL3
+LICENSE_COMB= dual
MAINTAINER= melifaro@ipfw.ru
COMMENT= Advanced fork of nss_ldap
GNU_CONFIGURE= yes
USE_GMAKE= yes
-USE_LDCONFIG= yes
USE_OPENLDAP= yes
USE_RC_SUBR= nslcd
NSLCD_PIDFILE?= /var/run/nslcd.pid
NSLCD_SOCKET?= /var/run/nslcd.ctl
-OPTIONS= NSS_COMPAT "Enable nss_ldap compatibility" on \
- SASL "Enable SASL" off \
- PAM "Build pam_ldap" on
+OPTIONS= SASL "Enable SASL" off \
+ PAM "Build pam_ldap" on \
+ NSS_COMPAT "Enable nss_ldap compatibility (DEPRECATED)" off
USERS= nslcd
GROUPS= nslcd
@@ -49,11 +49,14 @@ CONFIGURE_ARGS+= --with-nslcd-pidfile=${NSLCD_PIDFILE} \
.endif
.if defined(WITH_NSS_COMPAT)
-CONFIGURE_ARGS+= --enable-nss_compat --disable-configfile-checking --with-ldap-conf-file=${PREFIX}/etc/nss_ldap.conf
-PLIST_SUB+= CONFIG="nss_ldap"
+CONFIG_FILE= "nss_ldap.conf"
+CONFIGURE_ARGS+= --enable-nss_compat --disable-configfile-checking --with-ldap-conf-file=${PREFIX}/etc/${CONFIG_FILE}
+EXTRA_PATCHES+= ${FILESDIR}/nss_patch.diff
+PLIST_SUB+= CONFIG=${CONFIG_FILE}
.else
-CONFIGURE_ARGS+= --with-ldap-conf-file=${PREFIX}/etc/nss_ldapd.conf
-PLIST_SUB+= CONFIG="nss_ldapd"
+CONFIG_FILE= "nslcd.conf"
+CONFIGURE_ARGS+= --with-ldap-conf-file=${PREFIX}/etc/${CONFIG_FILE}
+PLIST_SUB+= CONFIG=${CONFIG_FILE}
.endif
.if defined(WITH_SASL)
@@ -94,9 +97,13 @@ MAN8+= nslcd.8
post-extract:
@${REINPLACE_CMD} -e 's/\(INSTALL_\)\(.*\)) -D /\1\2) /' ${WRKSRC}/Makefile.in ${WRKSRC}/nss/Makefile.in
- @${REINPLACE_CMD} -e 's/shadow.$$(OBJEXT)/shadow.$$(OBJEXT) bsdnss.$$(OBJEXT)/;s/shadow\.c/shadow.c bsdnss.c/;s/exports\.linux/exports.freebsd/' ${WRKSRC}/nss/Makefile.in
+ @${REINPLACE_CMD} -e 's/shadow.$$(OBJEXT)/shadow.$$(OBJEXT) bsdnss.$$(OBJEXT)/;s/shadow\.c/shadow.c bsdnss.c/' ${WRKSRC}/nss/Makefile.in
@${REINPLACE_CMD} -e 's/^NSS_VERS = .*/NSS_VERS = 1/;s/libnss_ldap\.so/nss_ldap.so/' ${WRKSRC}/nss/Makefile.in
@${REINPLACE_CMD} -e 's/$$(DESTDIR)$$(NSS_LDAP_PATH_CONF)/$$(DESTDIR)$$(NSS_LDAP_PATH_CONF).sample/' ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e '/^$$(ACLOCAL_M4/,+2d' ${WRKSRC}/Makefile.in
+
+post-configure:
+ ${REINPLACE_CMD} -e 's/^\(CFLAGS.*\) \-O2 \(.*\)$$/\1 -O0 \2/' ${WRKSRC}/nss/Makefile
post-install:
@${ECHO_MSG}
@@ -104,16 +111,17 @@ post-install:
@${ECHO_MSG}
.if defined(WITH_NSS_COMPAT)
@${ECHO_MSG} " NSS_LDAP compatibility ENABLED."
+ @${ECHO_MSG} " It is DEPRECATED now and will be removed."
@${ECHO_MSG}
- @${ECHO_MSG} " LDAP configuration: ${PREFIX}/etc/nss_ldap.conf"
+ @${ECHO_MSG} " LDAP configuration: ${PREFIX}/etc/${CONFIG_FILE}"
@${ECHO_MSG} " Secret file: ${PREFIX}/etc/nss_ldap.secret"
- @${ECHO_MSG} " Sample configuration: ${PREFIX}/etc/nss_ldap.conf.sample"
+ @${ECHO_MSG} " Sample configuration: ${PREFIX}/etc/${CONFIG_FILE}.sample"
@${ECHO_MSG}
@${ECHO_MSG} " Check if you need to adjust reconnect_* parameters"
@${ECHO_MSG} " WARNING: nss_ldapd will use ONLY rootbinddn to access LDAP data"
.else
- @${ECHO_MSG} " LDAP configuration: ${PREFIX}/etc/nss_ldapd.conf"
- @${ECHO_MSG} " Sample configuration: ${PREFIX}/etc/nss_ldapd.conf.sample"
+ @${ECHO_MSG} " LDAP configuration: ${PREFIX}/etc/${CONFIG_FILE}"
+ @${ECHO_MSG} " Sample configuration: ${PREFIX}/etc/${CONFIG_FILE}.sample"
@${ECHO_MSG}
.endif
.if !defined(WITHOUT_NSS)
diff --git a/net/nss-pam-ldapd/distinfo b/net/nss-pam-ldapd/distinfo
index b066d6e5d9da..ef1216d970ec 100644
--- a/net/nss-pam-ldapd/distinfo
+++ b/net/nss-pam-ldapd/distinfo
@@ -1,3 +1,3 @@
-MD5 (nss-pam-ldapd-0.7.3.tar.gz) = 688833d959f1878a139d484e980d160e
-SHA256 (nss-pam-ldapd-0.7.3.tar.gz) = db300db75fdf7ab74fae8fcb7cfecb5adace49ecf715d308581b22575bc128da
-SIZE (nss-pam-ldapd-0.7.3.tar.gz) = 443042
+MD5 (nss-pam-ldapd-0.7.7.tar.gz) = 7b37cc13b465495f90248e1209a05595
+SHA256 (nss-pam-ldapd-0.7.7.tar.gz) = fd6397990595243d3116fed2da409f582187329cc42794af2e47943a66ed363d
+SIZE (nss-pam-ldapd-0.7.7.tar.gz) = 457607
diff --git a/net/nss-pam-ldapd/files/nss_patch.diff b/net/nss-pam-ldapd/files/nss_patch.diff
index 1bf8bbdcf14d..b5b6b0e6ce78 100644
--- a/net/nss-pam-ldapd/files/nss_patch.diff
+++ b/net/nss-pam-ldapd/files/nss_patch.diff
@@ -81,3 +81,215 @@
}
/* SASL authentication options */
else if (strcasecmp(keyword,"sasl_authcid")==0)
+--- config.h.in.orig 2009-12-20 17:49:41.000000000 +0300
++++ config.h.in 2009-12-20 17:41:46.000000000 +0300
+@@ -3,6 +3,9 @@
+ /* Whether to check configfile options. */
+ #undef ENABLE_CONFIGFILE_CHECKING
+
++/* Whether to check nss_compat options. */
++#undef ENABLE_NSS_COMPAT
++
+ /* Define to 1 if you have the <aliases.h> header file. */
+ #undef HAVE_ALIASES_H
+
+--- configure.orig 2010-02-27 09:17:45.000000000 -0600
++++ configure 2010-04-29 07:28:11.044647697 -0500
+@@ -738,6 +738,7 @@
+ enable_sasl
+ enable_kerberos
+ enable_configfile_checking
++enable_nss_compat
+ with_ldap_conf_file
+ with_bindpw_file
+ with_nslcd_pidfile
+@@ -1386,6 +1387,7 @@
+ --disable-kerberos disable Kerberos support [[default=enabled]]
+ --disable-configfile-checking
+ check configfile options [[default=enabled]]
++ --enable-nss_compat check nss_compat option [[default=disabled]]
+
+ Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+@@ -4782,6 +4784,181 @@
+
+ fi
+
++# check whether nss_compat options should be checked
++{ $as_echo "$as_me:$LINENO: checking whether to check nss_compat option" >&5
++$as_echo_n "checking whether to check nss_compat option... " >&6; }
++# Check whether --enable-nss_compat was given.
++if test "${enable_nss_compat+set}" = set; then
++ enableval=$enable_nss_compat; nss_compat=$enableval
++else
++ nss_compat="no"
++fi
++
++{ $as_echo "$as_me:$LINENO: result: $nss_compat" >&5
++$as_echo "$nss_compat" >&6; }
++if test "x$nss_compat" = "xyes"
++then
++
++for ac_header in libgen.h
++do
++as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
++$as_echo_n "checking for $ac_header... " >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ $as_echo_n "(cached) " >&6
++fi
++ac_res=`eval 'as_val=${'$as_ac_Header'}
++ $as_echo "$as_val"'`
++ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++else
++ # Is the header compilable?
++{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
++$as_echo_n "checking $ac_header usability... " >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++$ac_includes_default
++#include <$ac_header>
++_ACEOF
++rm -f conftest.$ac_objext
++if { (ac_try="$ac_compile"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
++$as_echo "$ac_try_echo") >&5
++ (eval "$ac_compile") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } && {
++ test -z "$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ } && test -s conftest.$ac_objext; then
++ ac_header_compiler=yes
++else
++ $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_compiler=no
++fi
++
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
++$as_echo "$ac_header_compiler" >&6; }
++
++# Is the header present?
++{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
++$as_echo_n "checking $ac_header presence... " >&6; }
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h. */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h. */
++#include <$ac_header>
++_ACEOF
++if { (ac_try="$ac_cpp conftest.$ac_ext"
++case "(($ac_try" in
++ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
++ *) ac_try_echo=$ac_try;;
++esac
++eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
++$as_echo "$ac_try_echo") >&5
++ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
++ ac_status=$?
++ grep -v '^ *+' conftest.er1 >conftest.err
++ rm -f conftest.er1
++ cat conftest.err >&5
++ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
++ (exit $ac_status); } >/dev/null && {
++ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
++ test ! -s conftest.err
++ }; then
++ ac_header_preproc=yes
++else
++ $as_echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ ac_header_preproc=no
++fi
++
++rm -f conftest.err conftest.$ac_ext
++{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
++$as_echo "$ac_header_preproc" >&6; }
++
++# So? What about this header?
++case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
++ yes:no: )
++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
++$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
++$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
++ ac_header_preproc=yes
++ ;;
++ no:yes:* )
++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
++$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
++$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
++$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
++$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
++$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
++ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
++$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
++ ( cat <<\_ASBOX
++## -------------------------------------- ##
++## Report this to arthur@arthurdejong.org ##
++## -------------------------------------- ##
++_ASBOX
++ ) | sed "s/^/$as_me: WARNING: /" >&2
++ ;;
++esac
++{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
++$as_echo_n "checking for $ac_header... " >&6; }
++if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
++ $as_echo_n "(cached) " >&6
++else
++ eval "$as_ac_Header=\$ac_header_preproc"
++fi
++ac_res=`eval 'as_val=${'$as_ac_Header'}
++ $as_echo "$as_val"'`
++ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++
++fi
++if test `eval 'as_val=${'$as_ac_Header'}
++ $as_echo "$as_val"'` = yes; then
++ cat >>confdefs.h <<_ACEOF
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
++_ACEOF
++
++else
++ { { $as_echo "$as_me:$LINENO: error: libgen.h is required for nss_compat" >&5
++$as_echo "$as_me: error: libgen.h is required for nss_compat" >&2;}
++ { (exit 1); exit 1; }; }
++fi
++
++done
++
++
++cat >>confdefs.h <<\_ACEOF
++#define ENABLE_NSS_COMPAT 1
++_ACEOF
++
++fi
++
+ # check the name of the configuration file
+
+ # Check whether --with-ldap-conf-file was given.
diff --git a/net/nss-pam-ldapd/files/patch-Makefile.in b/net/nss-pam-ldapd/files/patch-Makefile.in
new file mode 100644
index 000000000000..2cb1ca59ac33
--- /dev/null
+++ b/net/nss-pam-ldapd/files/patch-Makefile.in
@@ -0,0 +1,18 @@
+--- Makefile.in.orig 2010-06-29 23:25:51.000000000 +0400
++++ Makefile.in 2010-06-29 23:26:53.000000000 +0400
+@@ -759,13 +759,14 @@
+
+ # install a default configuration file if it is not already there
+ install-nslcd_conf:
++ $(INSTALL_DATA) $(srcdir)/nslcd.conf $(DESTDIR)$(NSLCD_CONF_PATH).sample
+ @if [ -f $(DESTDIR)$(NSLCD_CONF_PATH) ]; then \
+ echo "$(DESTDIR)$(NSLCD_CONF_PATH) already exists, install will not overwrite"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/nslcd.conf $(DESTDIR)$(NSLCD_CONF_PATH) || true; \
+ fi
+ uninstall-nslcd_conf:
+- -rm -f $(DESTDIR)$(NSLCD_CONF_PATH)
++ -rm -f $(DESTDIR)$(NSLCD_CONF_PATH).sample
+
+ # target for easily creating a Debian package
+ # the find is an ugly hack to fix a bug if being built on an nfs filesystem
diff --git a/net/nss-pam-ldapd/files/patch-configure b/net/nss-pam-ldapd/files/patch-configure
deleted file mode 100644
index adbb1e557776..000000000000
--- a/net/nss-pam-ldapd/files/patch-configure
+++ /dev/null
@@ -1,212 +0,0 @@
---- config.h.in.orig 2009-12-20 17:49:41.000000000 +0300
-+++ config.h.in 2009-12-20 17:41:46.000000000 +0300
-@@ -3,6 +3,9 @@
- /* Whether to check configfile options. */
- #undef ENABLE_CONFIGFILE_CHECKING
-
-+/* Whether to check nss_compat options. */
-+#undef ENABLE_NSS_COMPAT
-+
- /* Define to 1 if you have the <aliases.h> header file. */
- #undef HAVE_ALIASES_H
-
---- configure.orig 2010-02-27 09:17:45.000000000 -0600
-+++ configure 2010-04-29 07:28:11.044647697 -0500
-@@ -738,6 +738,7 @@
- enable_sasl
- enable_kerberos
- enable_configfile_checking
-+enable_nss_compat
- with_ldap_conf_file
- with_bindpw_file
- with_nslcd_pidfile
-@@ -1386,6 +1387,7 @@
- --disable-kerberos disable Kerberos support [[default=enabled]]
- --disable-configfile-checking
- check configfile options [[default=enabled]]
-+ --enable-nss_compat check nss_compat option [[default=disabled]]
-
- Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-@@ -4782,6 +4784,181 @@
-
- fi
-
-+# check whether nss_compat options should be checked
-+{ $as_echo "$as_me:$LINENO: checking whether to check nss_compat option" >&5
-+$as_echo_n "checking whether to check nss_compat option... " >&6; }
-+# Check whether --enable-nss_compat was given.
-+if test "${enable_nss_compat+set}" = set; then
-+ enableval=$enable_nss_compat; nss_compat=$enableval
-+else
-+ nss_compat="no"
-+fi
-+
-+{ $as_echo "$as_me:$LINENO: result: $nss_compat" >&5
-+$as_echo "$nss_compat" >&6; }
-+if test "x$nss_compat" = "xyes"
-+then
-+
-+for ac_header in libgen.h
-+do
-+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-+$as_echo_n "checking for $ac_header... " >&6; }
-+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+ $as_echo_n "(cached) " >&6
-+fi
-+ac_res=`eval 'as_val=${'$as_ac_Header'}
-+ $as_echo "$as_val"'`
-+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+else
-+ # Is the header compilable?
-+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
-+$as_echo_n "checking $ac_header usability... " >&6; }
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+$ac_includes_default
-+#include <$ac_header>
-+_ACEOF
-+rm -f conftest.$ac_objext
-+if { (ac_try="$ac_compile"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-+$as_echo "$ac_try_echo") >&5
-+ (eval "$ac_compile") 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } && {
-+ test -z "$ac_c_werror_flag" ||
-+ test ! -s conftest.err
-+ } && test -s conftest.$ac_objext; then
-+ ac_header_compiler=yes
-+else
-+ $as_echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_compiler=no
-+fi
-+
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-+$as_echo "$ac_header_compiler" >&6; }
-+
-+# Is the header present?
-+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
-+$as_echo_n "checking $ac_header presence... " >&6; }
-+cat >conftest.$ac_ext <<_ACEOF
-+/* confdefs.h. */
-+_ACEOF
-+cat confdefs.h >>conftest.$ac_ext
-+cat >>conftest.$ac_ext <<_ACEOF
-+/* end confdefs.h. */
-+#include <$ac_header>
-+_ACEOF
-+if { (ac_try="$ac_cpp conftest.$ac_ext"
-+case "(($ac_try" in
-+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-+ *) ac_try_echo=$ac_try;;
-+esac
-+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-+$as_echo "$ac_try_echo") >&5
-+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
-+ ac_status=$?
-+ grep -v '^ *+' conftest.er1 >conftest.err
-+ rm -f conftest.er1
-+ cat conftest.err >&5
-+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); } >/dev/null && {
-+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-+ test ! -s conftest.err
-+ }; then
-+ ac_header_preproc=yes
-+else
-+ $as_echo "$as_me: failed program was:" >&5
-+sed 's/^/| /' conftest.$ac_ext >&5
-+
-+ ac_header_preproc=no
-+fi
-+
-+rm -f conftest.err conftest.$ac_ext
-+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-+$as_echo "$ac_header_preproc" >&6; }
-+
-+# So? What about this header?
-+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-+ yes:no: )
-+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-+ ac_header_preproc=yes
-+ ;;
-+ no:yes:* )
-+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
-+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-+ ( cat <<\_ASBOX
-+## -------------------------------------- ##
-+## Report this to arthur@arthurdejong.org ##
-+## -------------------------------------- ##
-+_ASBOX
-+ ) | sed "s/^/$as_me: WARNING: /" >&2
-+ ;;
-+esac
-+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
-+$as_echo_n "checking for $ac_header... " >&6; }
-+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-+ $as_echo_n "(cached) " >&6
-+else
-+ eval "$as_ac_Header=\$ac_header_preproc"
-+fi
-+ac_res=`eval 'as_val=${'$as_ac_Header'}
-+ $as_echo "$as_val"'`
-+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-+$as_echo "$ac_res" >&6; }
-+
-+fi
-+if test `eval 'as_val=${'$as_ac_Header'}
-+ $as_echo "$as_val"'` = yes; then
-+ cat >>confdefs.h <<_ACEOF
-+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-+_ACEOF
-+
-+else
-+ { { $as_echo "$as_me:$LINENO: error: libgen.h is required for nss_compat" >&5
-+$as_echo "$as_me: error: libgen.h is required for nss_compat" >&2;}
-+ { (exit 1); exit 1; }; }
-+fi
-+
-+done
-+
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define ENABLE_NSS_COMPAT 1
-+_ACEOF
-+
-+fi
-+
- # check the name of the configuration file
-
- # Check whether --with-ldap-conf-file was given.
diff --git a/net/nss-pam-ldapd/files/patch-nslcd__cfg.c b/net/nss-pam-ldapd/files/patch-nslcd__cfg.c
deleted file mode 100644
index 4b1f9586c47d..000000000000
--- a/net/nss-pam-ldapd/files/patch-nslcd__cfg.c
+++ /dev/null
@@ -1,60 +0,0 @@
---- nslcd/cfg.c.orig 2009-10-05 21:47:47.000000000 +0400
-+++ nslcd/cfg.c 2009-12-20 18:10:37.000000000 +0300
-@@ -33,6 +33,9 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <unistd.h>
-+#ifdef ENABLE_NSS_COMPAT
-+#include <libgen.h>
-+#endif
- #include <errno.h>
- #include <netdb.h>
- #include <sys/socket.h>
-@@ -665,6 +668,25 @@
- int rc;
- char *value;
- #endif
-+#ifdef ENABLE_NSS_COMPAT
-+ /* get secret password */
-+ snprintf(linebuf, sizeof(linebuf), "%s/nss_ldap.secret", dirname(filename));
-+ if ((fp=fopen(linebuf,"r"))==NULL)
-+ {
-+ log_log(LOG_ERR,"cannot open secret file (%s): %s",linebuf,strerror(errno));
-+ /* exit(EXIT_FAILURE); */
-+ }
-+ else if (fgets(linebuf,MAX_LINE_LENGTH,fp)!=NULL)
-+ {
-+ i=strlen(linebuf);
-+ if (i>0)
-+ linebuf[i-1]='\0';
-+ cfg->ldc_bindpw=strdup(linebuf);
-+ }
-+ if (fp!=NULL)
-+ fclose(fp);
-+#endif
-+
- /* open config file */
- if ((fp=fopen(filename,"r"))==NULL)
- {
-@@ -733,13 +755,20 @@
- get_int(filename,lnr,keyword,&line,&cfg->ldc_version);
- get_eol(filename,lnr,keyword,&line);
- }
-+#ifdef ENABLE_NSS_COMPAT
-+ else if (strcasecmp(keyword,"rootbinddn")==0)
-+#else
- else if (strcasecmp(keyword,"binddn")==0)
-+#endif
- {
- get_restdup(filename,lnr,keyword,&line,&cfg->ldc_binddn);
- }
- else if (strcasecmp(keyword,"bindpw")==0)
- {
-- get_restdup(filename,lnr,keyword,&line,&cfg->ldc_bindpw);
-+#ifdef ENABLE_NSS_COMPAT
-+ if (cfg->ldc_bindpw == NULL)
-+#endif
-+ get_restdup(filename,lnr,keyword,&line,&cfg->ldc_bindpw);
- }
- /* SASL authentication options */
- else if (strcasecmp(keyword,"sasl_authcid")==0)
diff --git a/net/nss-pam-ldapd/files/patch-nslcd__nslcd.c b/net/nss-pam-ldapd/files/patch-nslcd__nslcd.c
new file mode 100644
index 000000000000..e5da9faa531d
--- /dev/null
+++ b/net/nss-pam-ldapd/files/patch-nslcd__nslcd.c
@@ -0,0 +1,11 @@
+--- nslcd/nslcd.c.orig 2010-07-06 23:36:52.000000000 +0400
++++ nslcd/nslcd.c 2010-07-06 23:40:01.000000000 +0400
+@@ -574,7 +574,7 @@
+ char *error;
+ int *enable_flag;
+ /* try to load the NSS module */
+- handle=dlopen("libnss_ldap.so.2",RTLD_LAZY|RTLD_NODELETE);
++ handle=dlopen("nss_ldap.so.1",RTLD_LAZY|RTLD_NODELETE);
+ if (handle==NULL)
+ {
+ log_log(LOG_WARNING,"Warning: LDAP NSS module not loaded: %s",dlerror());
diff --git a/net/nss-pam-ldapd/files/patch-nss__exports.freebsd b/net/nss-pam-ldapd/files/patch-nss__exports.freebsd
deleted file mode 100644
index a8cd82e46cd4..000000000000
--- a/net/nss-pam-ldapd/files/patch-nss__exports.freebsd
+++ /dev/null
@@ -1,109 +0,0 @@
---- nss/exports.freebsd.orig 2009-12-20 15:58:25.000000000 +0300
-+++ nss/exports.freebsd 2009-12-20 15:57:47.000000000 +0300
-@@ -0,0 +1,106 @@
-+EXPORTED {
-+
-+ # published NSS service functions
-+ global:
-+
-+ # aliases - mail aliases
-+ _nss_ldap_getaliasbyname_r;
-+ _nss_ldap_setaliasent;
-+ _nss_ldap_getaliasent_r;
-+ _nss_ldap_endaliasent;
-+
-+ # ethers - ethernet numbers
-+ _nss_ldap_gethostton_r;
-+ _nss_ldap_getntohost_r;
-+ _nss_ldap_setetherent;
-+ _nss_ldap_getetherent_r;
-+ _nss_ldap_endetherent;
-+
-+ # group - groups of users
-+ _nss_ldap_getgrnam_r;
-+ _nss_ldap_getgrgid_r;
-+ _nss_ldap_initgroups_dyn;
-+ _nss_ldap_setgrent;
-+ _nss_ldap_getgrent_r;
-+ _nss_ldap_endgrent;
-+
-+ # hosts - host names and numbers
-+ _nss_ldap_gethostbyname_r;
-+ _nss_ldap_gethostbyname2_r;
-+ _nss_ldap_gethostbyaddr_r;
-+ _nss_ldap_sethostent;
-+ _nss_ldap_gethostent_r;
-+ _nss_ldap_endhostent;
-+
-+ # netgroup - list of host and users
-+ _nss_ldap_setnetgrent;
-+ _nss_ldap_getnetgrent_r;
-+ _nss_ldap_endnetgrent;
-+
-+ # networks - network names and numbers
-+ _nss_ldap_getnetbyname_r;
-+ _nss_ldap_getnetbyaddr_r;
-+ _nss_ldap_setnetent;
-+ _nss_ldap_getnetent_r;
-+ _nss_ldap_endnetent;
-+
-+ # passwd - user database and passwords
-+ _nss_ldap_getpwnam_r;
-+ _nss_ldap_getpwuid_r;
-+ _nss_ldap_setpwent;
-+ _nss_ldap_getpwent_r;
-+ _nss_ldap_endpwent;
-+
-+ # protocols - network protocols
-+ _nss_ldap_getprotobyname_r;
-+ _nss_ldap_getprotobynumber_r;
-+ _nss_ldap_setprotoent;
-+ _nss_ldap_getprotoent_r;
-+ _nss_ldap_endprotoent;
-+
-+ # rpc - remote procedure call names and numbers
-+ _nss_ldap_getrpcbyname_r;
-+ _nss_ldap_getrpcbynumber_r;
-+ _nss_ldap_setrpcent;
-+ _nss_ldap_getrpcent_r;
-+ _nss_ldap_endrpcent;
-+
-+ # services - network services
-+ _nss_ldap_getservbyname_r;
-+ _nss_ldap_getservbyport_r;
-+ _nss_ldap_setservent;
-+ _nss_ldap_getservent_r;
-+ _nss_ldap_endservent;
-+
-+ # shadow - extended user information
-+ _nss_ldap_getspnam_r;
-+ _nss_ldap_setspent;
-+ _nss_ldap_getspent_r;
-+ _nss_ldap_endspent;
-+
-+ # compat 4 bsd
-+ __nss_compat_getgrnam_r;
-+ __nss_compat_getgrgid_r;
-+ __nss_compat_getgrent_r;
-+ __nss_compat_setgrent;
-+ __nss_compat_endgrent;
-+
-+ __nss_compat_getpwnam_r;
-+ __nss_compat_getpwuid_r;
-+ __nss_compat_getpwent_r;
-+ __nss_compat_setpwent;
-+ __nss_compat_endpwent;
-+
-+ __nss_compat_gethostbyname;
-+ __nss_compat_gethostbyname2;
-+ __nss_compat_gethostbyaddr;
-+
-+ # module init
-+ nss_module_register;
-+
-+
-+ # everything else should not be exported
-+ local:
-+ *;
-+
-+};
diff --git a/net/nss-pam-ldapd/files/patch-nss__prototypes.h b/net/nss-pam-ldapd/files/patch-nss__prototypes.h
deleted file mode 100644
index 53003f014ae2..000000000000
--- a/net/nss-pam-ldapd/files/patch-nss__prototypes.h
+++ /dev/null
@@ -1,43 +0,0 @@
---- nss/prototypes.h.orig 2009-09-04 15:55:35.000000000 +0400
-+++ nss/prototypes.h 2009-12-20 15:37:57.000000000 +0300
-@@ -84,6 +86,27 @@
- void *nip; /* changed from `service_user *nip' */
- };
-
-+#ifdef __FreeBSD__
-+/*
-+ * Import from aliases.h
-+ */
-+struct aliasent
-+ {
-+ char *alias_name;
-+ size_t alias_members_len;
-+ char **alias_members;
-+ int alias_local;
-+ };
-+
-+struct rpcent
-+{
-+ char *r_name; /* Name of server for this rpc program. */
-+ char **r_aliases; /* Alias list. */
-+ int r_number; /* RPC program number. */
-+};
-+
-+#endif
-+
- /*
- These are prototypes for functions exported from the ldap NSS module.
- For more complete definitions of these functions check the GLIBC
-@@ -166,10 +189,12 @@
- enum nss_status _nss_ldap_getservent_r(struct servent *result,char *buffer,size_t buflen,int *errnop);
- enum nss_status _nss_ldap_endservent(void);
-
-+#ifdef HAVE_SHADOW_H
- /* shadow - extended user information */
- enum nss_status _nss_ldap_getspnam_r(const char *name,struct spwd *result,char *buffer,size_t buflen,int *errnop);
- enum nss_status _nss_ldap_setspent(int stayopen);
- enum nss_status _nss_ldap_getspent_r(struct spwd *result,char *buffer,size_t buflen,int *errnop);
- enum nss_status _nss_ldap_endspent(void);
-+#endif
-
- #endif /* not NSS_EXPORTS */
diff --git a/net/nss-pam-ldapd/files/patch-nss_ldap.map b/net/nss-pam-ldapd/files/patch-nss_ldap.map
new file mode 100644
index 000000000000..acaa2fb83bf4
--- /dev/null
+++ b/net/nss-pam-ldapd/files/patch-nss_ldap.map
@@ -0,0 +1,30 @@
+--- nss/nss_ldap.map.orig 2010-06-15 23:53:21.000000000 +0400
++++ nss/nss_ldap.map 2010-07-06 22:57:53.000000000 +0400
+@@ -81,6 +78,27 @@
+ _nss_ldap_getspent_r;
+ _nss_ldap_endspent;
+
++ # compat 4 bsd
++ __nss_compat_getgrnam_r;
++ __nss_compat_getgrgid_r;
++ __nss_compat_getgrent_r;
++ __nss_compat_setgrent;
++ __nss_compat_endgrent;
++
++ __nss_compat_getpwnam_r;
++ __nss_compat_getpwuid_r;
++ __nss_compat_getpwent_r;
++ __nss_compat_setpwent;
++ __nss_compat_endpwent;
++
++ __nss_compat_gethostbyname;
++ __nss_compat_gethostbyname2;
++ __nss_compat_gethostbyaddr;
++
++ # module init
++ nss_module_register;
++
++
+ # everything else should not be exported
+ local:
+ *;
diff --git a/net/nss-pam-ldapd/files/patch-pam__makefile.in b/net/nss-pam-ldapd/files/patch-pam__makefile.in
index 864e4123288c..16a8d0b70cb6 100644
--- a/net/nss-pam-ldapd/files/patch-pam__makefile.in
+++ b/net/nss-pam-ldapd/files/patch-pam__makefile.in
@@ -6,7 +6,7 @@
install-pam_ldap_so: pam_ldap.so
- $(INSTALL_PROGRAM) -D pam_ldap.so $(DESTDIR)$(libdir)/security/pam_ldap.so
+ $(INSTALL_PROGRAM) pam_ldap.so $(DESTDIR)$(libdir)/pam_ldap.so.1
-+ ln -s $(DESTDIR)$(libdir)/pam_ldap.so.1 $(DESTDIR)$(libdir)/pam_ldap.so
++ ln -sfh $(DESTDIR)$(libdir)/pam_ldap.so.1 $(DESTDIR)$(libdir)/pam_ldap.so
uninstall-pam_ldap_so:
-rm -f $(DESTDIR)$(libdir)/security/pam_ldap.so
diff --git a/net/nss-pam-ldapd/pkg-descr b/net/nss-pam-ldapd/pkg-descr
index 7534ff69d43c..96563dd67bae 100644
--- a/net/nss-pam-ldapd/pkg-descr
+++ b/net/nss-pam-ldapd/pkg-descr
@@ -1,11 +1,14 @@
-nss_ldapd is a NSS module which provides an LDAP backend for C library
-functions such as getpwnam(3), getgrnam(3), and gethostbyname(3). It
-is compliant with RFC 2307, ``An Approach for Using LDAP as a Network
-Information Service''.
+nss-pam-ldapd, a Name Service Switch (NSS) module and Pluggable Authentication
+Module (PAM) that allows your LDAP server to provide user account, group, host
+name, alias, netgroup, and basically any other information that you would
+normally get from /etc flat files or NIS. It also alows you to do
+authentication to an LDAP server.
Key differences from nss_ldap:
-* lighter nss library (no ldap* dependings)
-* server-side connection caching
+* lighter NSS library
+* lighter PAM library
+* simpler internal semantics
+* clear separation between NSS, PAM and LDAP code (the server part could easily be implemented in another language)
+* less connections to the LDAP server
-
-WWW: http://arthurdejong.org/nss-ldapd/
+WWW: http://arthurdejong.org/nss-pam-ldapd/
diff --git a/net/nss-pam-ldapd/pkg-plist b/net/nss-pam-ldapd/pkg-plist
index 5280a2fe6e0d..924d610cfe13 100644
--- a/net/nss-pam-ldapd/pkg-plist
+++ b/net/nss-pam-ldapd/pkg-plist
@@ -1,4 +1,4 @@
-etc/%%CONFIG%%.conf
+etc/%%CONFIG%%.sample
%%NSS%%lib/nss_ldap.so.1
%%NSLCD%%sbin/nslcd
%%PAM%%lib/pam_ldap.so