summaryrefslogtreecommitdiff
path: root/net/nss-pam-ldapd
diff options
context:
space:
mode:
Diffstat (limited to 'net/nss-pam-ldapd')
-rw-r--r--net/nss-pam-ldapd/Makefile124
-rw-r--r--net/nss-pam-ldapd/distinfo3
-rw-r--r--net/nss-pam-ldapd/files/nslcd.in24
-rw-r--r--net/nss-pam-ldapd/files/nss_patch.diff83
-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-nss__bsdnss.c160
-rw-r--r--net/nss-pam-ldapd/files/patch-nss__exports.freebsd109
-rw-r--r--net/nss-pam-ldapd/files/patch-nss__prototypes.h53
-rw-r--r--net/nss-pam-ldapd/files/patch-nss__shadow.c17
-rw-r--r--net/nss-pam-ldapd/files/patch-pam__makefile.in12
-rw-r--r--net/nss-pam-ldapd/pkg-descr11
-rw-r--r--net/nss-pam-ldapd/pkg-plist5
13 files changed, 0 insertions, 873 deletions
diff --git a/net/nss-pam-ldapd/Makefile b/net/nss-pam-ldapd/Makefile
deleted file mode 100644
index 1cde7ad687f4..000000000000
--- a/net/nss-pam-ldapd/Makefile
+++ /dev/null
@@ -1,124 +0,0 @@
-# Ports collection Makefile for: nss_ldapd
-# Date created: 23/7/2009
-# Whom: melifaro@ipfw.ru
-#
-# $FreeBSD$
-#
-
-PORTNAME= nss_ldapd
-PORTVERSION= 0.7.1
-CATEGORIES= net
-MASTER_SITES= http://arthurdejong.org/nss-pam-ldapd/ \
- http://static.ipfw.ru/files/
-DISTNAME= nss-pam-ldapd-${PORTVERSION}
-
-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
-
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 700000
-IGNORE= problems with nss/libc TLS
-.endif
-
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
- LDFLAGS="-L${LOCALBASE}/lib"
-
-CONFIGURE_ARGS+= --with-nslcd-pidfile=${NSLCD_PIDFILE} \
- --with-nslcd-socket=${NSLCD_SOCKET} \
- --with-ldap-lib=openldap --disable-kerberos
-
-.if defined(WITHOUT_NSS)
-.undef NSS_COMPAT
-.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"
-.else
-CONFIGURE_ARGS+= --with-ldap-conf-file=${PREFIX}/etc/nss_ldapd.conf
-PLIST_SUB+= CONFIG="nss_ldapd"
-.endif
-
-.if defined(WITH_SASL)
-WANT_OPENLDAP_SASL= yes
-CONFIGURE_ARGS+= --enable-sasl
-.else
-CONFIGURE_ARGS+= --disable-sasl
-.endif
-
-.if defined(WITH_PAM)
-CONFIGURE_ARGS+= --enable-pam
-MAN8+= pam_ldap.8
-CONFLICTS+= pam_ldap-1.*
-PLIST_SUB+= PAM=""
-.else
-CONFIGURE_ARGS+= --disable-pam
-PLIST_SUB+= PAM="@comment "
-.endif
-
-.if defined(WITHOUT_NSS)
-CONFIGURE_ARGS+= --disable-nss
-PLIST_SUB+= NSS="@comment "
-.else
-CONFIGURE_ARGS+= --enable-nss
-CONFLICTS+= nss_ldap-1.*
-PLIST_SUB+= NSS=""
-.endif
-
-.if defined(WITHOUT_NSLCD)
-CONFIGURE_ARGS+= --disable-nslcd
-PLIST_SUB+= NSLCD="@comment "
-.else
-CONFIGURE_ARGS+= --enable-nslcd
-PLIST_SUB+= NSLCD=""
-MAN5+= nslcd.conf.5
-MAN8+= nslcd.8
-.endif
-
-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/^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
-
-post-install:
- @${ECHO_MSG}
- @${ECHO_MSG} =====================================================================
- @${ECHO_MSG}
-.if defined(WITH_NSS_COMPAT)
- @${ECHO_MSG} " NSS_LDAP compatibility ENABLED."
- @${ECHO_MSG}
- @${ECHO_MSG} " LDAP configuration: ${PREFIX}/etc/nss_ldap.conf"
- @${ECHO_MSG} " Secret file: ${PREFIX}/etc/nss_ldap.secret"
- @${ECHO_MSG} " Sample configuration: ${PREFIX}/etc/nss_ldap.conf.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}
-.endif
-.if !defined(WITHOUT_NSS)
- @${ECHO_MSG} " WARNING: Be sure to set uid and gid configuration parameters"
- @${ECHO_MSG} " WARNING: to make nslcd run under unprivileged user"
-.endif
- @${ECHO_MSG}
- @${ECHO_MSG} =====================================================================
- @${ECHO_MSG}
-
-.include <bsd.port.post.mk>
diff --git a/net/nss-pam-ldapd/distinfo b/net/nss-pam-ldapd/distinfo
deleted file mode 100644
index 40ca8cb72c34..000000000000
--- a/net/nss-pam-ldapd/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 (nss-pam-ldapd-0.7.1.tar.gz) = 11a31772554a452a5d978b39665fcf80
-SHA256 (nss-pam-ldapd-0.7.1.tar.gz) = c1a80ecb7def43171b36600f48ba32fe7822aa07541f90edb9481c641539467f
-SIZE (nss-pam-ldapd-0.7.1.tar.gz) = 430508
diff --git a/net/nss-pam-ldapd/files/nslcd.in b/net/nss-pam-ldapd/files/nslcd.in
deleted file mode 100644
index 885c670daf95..000000000000
--- a/net/nss-pam-ldapd/files/nslcd.in
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-# PROVIDE: nslcd
-# REQUIRE: DAEMON ldconfig resolv
-#
-# Add the following line to /etc/rc.conf to enable the nslcd daemon:
-#
-# nslcd_enable="YES"
-#
-
-nslcd_enable=${nslcd_enable-"NO"}
-
-. %%RC_SUBR%%
-
-name=nslcd
-rcvar=$(set_rcvar)
-
-command="%%PREFIX%%/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-
-load_rc_config ${name}
-run_rc_command "$1"
diff --git a/net/nss-pam-ldapd/files/nss_patch.diff b/net/nss-pam-ldapd/files/nss_patch.diff
deleted file mode 100644
index 1bf8bbdcf14d..000000000000
--- a/net/nss-pam-ldapd/files/nss_patch.diff
+++ /dev/null
@@ -1,83 +0,0 @@
---- configure.ac.orig 2009-10-17 20:09:01.000000000 +0400
-+++ configure.ac 2009-12-20 19:58:24.000000000 +0300
-@@ -160,6 +160,20 @@
- AC_DEFINE(ENABLE_CONFIGFILE_CHECKING,1,[Whether to check configfile options.])
- fi
-
-+# check whether nss_compat options should be checked
-+AC_MSG_CHECKING([whether to check nss_compat option])
-+AC_ARG_ENABLE(nss_compat_checking,
-+ AS_HELP_STRING([--enable-nss_compat],
-+ [check nss_compat option [[default=no]]]),
-+ [nss_compat_checking=$enableval],
-+ [nss_compat_checking="no"])
-+AC_MSG_RESULT($nss_compat_checking)
-+if test "x$nss_compat_checking" = "xyes"
-+then
-+ AC_CHECK_HEADERS([libgen.h], [], [AC_MSG_ERROR([libgen.h is required for nss_compat])])
-+ AC_DEFINE(ENABLE_NSS_COMPAT,1,[Whether to check nss_compat options.])
-+fi
-+
- # check the name of the configuration file
- AC_ARG_WITH(ldap-conf-file,
- AS_HELP_STRING([--with-ldap-conf-file=PATH],
---- 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-configure b/net/nss-pam-ldapd/files/patch-configure
deleted file mode 100644
index 9432d4415861..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 19:44:43.000000000 +0300
-+++ configure 2009-12-20 19:47:20.000000000 +0300
-@@ -779,6 +779,7 @@
- enable_sasl
- enable_kerberos
- enable_configfile_checking
-+enable_nss_compat
- with_ldap_conf_file
- with_nslcd_pidfile
- with_nslcd_socket
-@@ -1437,6 +1438,7 @@
- --disable-kerberos disable Kerberos support [default=yes]
- --disable-configfile-checking
- check configfile options [default=yes]
-+ --enable-nss_compat check nss_compat option [default=no]
-
- Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-@@ -5117,6 +5119,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-nss__bsdnss.c b/net/nss-pam-ldapd/files/patch-nss__bsdnss.c
deleted file mode 100644
index 1781ffc3f727..000000000000
--- a/net/nss-pam-ldapd/files/patch-nss__bsdnss.c
+++ /dev/null
@@ -1,160 +0,0 @@
---- nss/bsdnss.c.orig 2009-08-10 16:06:22.000000000 +0000
-+++ nss/bsdnss.c 2009-08-10 15:58:04.000000000 +0000
-@@ -0,0 +1,157 @@
-+#include <errno.h>
-+#include <sys/param.h>
-+#include <netinet/in.h>
-+#include <pwd.h>
-+#include <grp.h>
-+#include <nss.h>
-+#include <netdb.h>
-+
-+#define BUFFER_SIZE 1024
-+
-+extern enum nss_status _nss_ldap_getgrent_r(struct group *, char *, size_t,
-+ int *);
-+extern enum nss_status _nss_ldap_getgrnam_r(const char *, struct group *,
-+ char *, size_t, int *);
-+extern enum nss_status _nss_ldap_getgrgid_r(gid_t gid, struct group *, char *,
-+ size_t, int *);
-+extern enum nss_status _nss_ldap_setgrent(void);
-+extern enum nss_status _nss_ldap_endgrent(void);
-+
-+extern enum nss_status _nss_ldap_getpwent_r(struct passwd *, char *, size_t,
-+ int *);
-+extern enum nss_status _nss_ldap_getpwnam_r(const char *, struct passwd *,
-+ char *, size_t, int *);
-+extern enum nss_status _nss_ldap_getpwuid_r(gid_t gid, struct passwd *, char *,
-+ size_t, int *);
-+extern enum nss_status _nss_ldap_setpwent(void);
-+extern enum nss_status _nss_ldap_endpwent(void);
-+
-+extern enum nss_status _nss_ldap_gethostbyname_r (const char *name, struct hostent * result,
-+ char *buffer, size_t buflen, int *errnop,
-+ int *h_errnop);
-+
-+extern enum nss_status _nss_ldap_gethostbyname2_r (const char *name, int af, struct hostent * result,
-+ char *buffer, size_t buflen, int *errnop,
-+ int *h_errnop);
-+extern enum nss_status _nss_ldap_gethostbyaddr_r (struct in_addr * addr, int len, int type,
-+ struct hostent * result, char *buffer,
-+ size_t buflen, int *errnop, int *h_errnop);
-+
-+NSS_METHOD_PROTOTYPE(__nss_compat_getgrnam_r);
-+NSS_METHOD_PROTOTYPE(__nss_compat_getgrgid_r);
-+NSS_METHOD_PROTOTYPE(__nss_compat_getgrent_r);
-+NSS_METHOD_PROTOTYPE(__nss_compat_setgrent);
-+NSS_METHOD_PROTOTYPE(__nss_compat_endgrent);
-+
-+NSS_METHOD_PROTOTYPE(__nss_compat_getpwnam_r);
-+NSS_METHOD_PROTOTYPE(__nss_compat_getpwuid_r);
-+NSS_METHOD_PROTOTYPE(__nss_compat_getpwent_r);
-+NSS_METHOD_PROTOTYPE(__nss_compat_setpwent);
-+NSS_METHOD_PROTOTYPE(__nss_compat_endpwent);
-+
-+NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyname);
-+NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyname2);
-+NSS_METHOD_PROTOTYPE(__nss_compat_gethostbyaddr);
-+
-+static ns_mtab methods[] = {
-+{ NSDB_GROUP, "getgrnam_r", __nss_compat_getgrnam_r, _nss_ldap_getgrnam_r },
-+{ NSDB_GROUP, "getgrgid_r", __nss_compat_getgrgid_r, _nss_ldap_getgrgid_r },
-+{ NSDB_GROUP, "getgrent_r", __nss_compat_getgrent_r, _nss_ldap_getgrent_r },
-+{ NSDB_GROUP, "setgrent", __nss_compat_setgrent, _nss_ldap_setgrent },
-+{ NSDB_GROUP, "endgrent", __nss_compat_endgrent, _nss_ldap_endgrent },
-+
-+{ NSDB_PASSWD, "getpwnam_r", __nss_compat_getpwnam_r, _nss_ldap_getpwnam_r },
-+{ NSDB_PASSWD, "getpwuid_r", __nss_compat_getpwuid_r, _nss_ldap_getpwuid_r },
-+{ NSDB_PASSWD, "getpwent_r", __nss_compat_getpwent_r, _nss_ldap_getpwent_r },
-+{ NSDB_PASSWD, "setpwent", __nss_compat_setpwent, _nss_ldap_setpwent },
-+{ NSDB_PASSWD, "endpwent", __nss_compat_endpwent, _nss_ldap_endpwent },
-+
-+{ NSDB_HOSTS, "gethostbyname", __nss_compat_gethostbyname, _nss_ldap_gethostbyname_r },
-+{ NSDB_HOSTS, "gethostbyaddr", __nss_compat_gethostbyaddr, _nss_ldap_gethostbyaddr_r },
-+{ NSDB_HOSTS, "gethostbyname2", __nss_compat_gethostbyname2, _nss_ldap_gethostbyname2_r },
-+
-+{ NSDB_GROUP_COMPAT, "getgrnam_r", __nss_compat_getgrnam_r, _nss_ldap_getgrnam_r },
-+{ NSDB_GROUP_COMPAT, "getgrgid_r", __nss_compat_getgrgid_r, _nss_ldap_getgrgid_r },
-+{ NSDB_GROUP_COMPAT, "getgrent_r", __nss_compat_getgrent_r, _nss_ldap_getgrent_r },
-+{ NSDB_GROUP_COMPAT, "setgrent", __nss_compat_setgrent, _nss_ldap_setgrent },
-+{ NSDB_GROUP_COMPAT, "endgrent", __nss_compat_endgrent, _nss_ldap_endgrent },
-+
-+{ NSDB_PASSWD_COMPAT, "getpwnam_r", __nss_compat_getpwnam_r, _nss_ldap_getpwnam_r },
-+{ NSDB_PASSWD_COMPAT, "getpwuid_r", __nss_compat_getpwuid_r, _nss_ldap_getpwuid_r },
-+{ NSDB_PASSWD_COMPAT, "getpwent_r", __nss_compat_getpwent_r, _nss_ldap_getpwent_r },
-+{ NSDB_PASSWD_COMPAT, "setpwent", __nss_compat_setpwent, _nss_ldap_setpwent },
-+{ NSDB_PASSWD_COMPAT, "endpwent", __nss_compat_endpwent, _nss_ldap_endpwent },
-+
-+};
-+
-+
-+int __nss_compat_gethostbyname(void *retval, void *mdata, va_list ap)
-+{
-+ enum nss_status (*fn)(const char *, struct hostent *, char *, size_t, int *, int *);
-+ const char *name;
-+ struct hostent *result;
-+ char buffer[BUFFER_SIZE];
-+ int errnop;
-+ int h_errnop;
-+ int af;
-+ enum nss_status status;
-+ fn = mdata;
-+ name = va_arg(ap, const char*);
-+ af = va_arg(ap,int);
-+ result = va_arg(ap,struct hostent *);
-+ status = fn(name, result, buffer, sizeof(buffer), &errnop, &h_errnop);
-+ status = __nss_compat_result(status,errnop);
-+ h_errno = h_errnop;
-+ return (status);
-+}
-+
-+int __nss_compat_gethostbyname2(void *retval, void *mdata, va_list ap)
-+{
-+ enum nss_status (*fn)(const char *, struct hostent *, char *, size_t, int *, int *);
-+ const char *name;
-+ struct hostent *result;
-+ char buffer[BUFFER_SIZE];
-+ int errnop;
-+ int h_errnop;
-+ int af;
-+ enum nss_status status;
-+ fn = mdata;
-+ name = va_arg(ap, const char*);
-+ af = va_arg(ap,int);
-+ result = va_arg(ap,struct hostent *);
-+ status = fn(name, result, buffer, sizeof(buffer), &errnop, &h_errnop);
-+ status = __nss_compat_result(status,errnop);
-+ h_errno = h_errnop;
-+ return (status);
-+}
-+
-+int __nss_compat_gethostbyaddr(void *retval, void *mdata, va_list ap)
-+{
-+ struct in_addr *addr;
-+ int len;
-+ int type;
-+ struct hostent *result;
-+ char buffer[BUFFER_SIZE];
-+ int errnop;
-+ int h_errnop;
-+ enum nss_status (*fn)(struct in_addr *, int, int, struct hostent *, char *, size_t, int *, int *);
-+ enum nss_status status;
-+ fn = mdata;
-+ addr = va_arg(ap, struct in_addr*);
-+ len = va_arg(ap,int);
-+ type = va_arg(ap,int);
-+ result = va_arg(ap, struct hostent*);
-+ status = fn(addr, len, type, result, buffer, sizeof(buffer), &errnop, &h_errnop);
-+ status = __nss_compat_result(status,errnop);
-+ h_errno = h_errnop;
-+ return (status);
-+}
-+
-+ns_mtab *
-+nss_module_register(const char *source, unsigned int *mtabsize,
-+ nss_module_unregister_fn *unreg)
-+{
-+ *mtabsize = sizeof(methods)/sizeof(methods[0]);
-+ *unreg = NULL;
-+ return (methods);
-+}
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 e09565af545d..000000000000
--- a/net/nss-pam-ldapd/files/patch-nss__prototypes.h
+++ /dev/null
@@ -1,53 +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
-@@ -24,7 +24,9 @@
- #define _NSS_EXPORTS_H 1
-
- #include <nss.h>
-+#ifdef HAVE_ALIASES_H
- #include <aliases.h>
-+#endif
- #ifdef HAVE_NETINET_ETHER_H
- #include <netinet/ether.h>
- #endif /* HAVE_NETINET_ETHER_H */
-@@ -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__shadow.c b/net/nss-pam-ldapd/files/patch-nss__shadow.c
deleted file mode 100644
index 7ffbc189957d..000000000000
--- a/net/nss-pam-ldapd/files/patch-nss__shadow.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- nss/shadow.c.orig 2009-05-29 21:23:03.000000000 +0000
-+++ nss/shadow.c 2009-08-02 22:32:27.000000000 +0000
-@@ -22,6 +22,7 @@
-
- #include "config.h"
-
-+#ifdef HAVE_SHADOW_H
- #include <string.h>
- #include <nss.h>
- #include <errno.h>
-@@ -73,3 +74,6 @@
- {
- NSS_ENDENT(spentfp);
- }
-+
-+#endif
-+
diff --git a/net/nss-pam-ldapd/files/patch-pam__makefile.in b/net/nss-pam-ldapd/files/patch-pam__makefile.in
deleted file mode 100644
index 864e4123288c..000000000000
--- a/net/nss-pam-ldapd/files/patch-pam__makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
---- pam/Makefile.in.orig 2009-12-20 20:47:00.000000000 +0300
-+++ pam/Makefile.in 2009-12-20 20:48:30.000000000 +0300
-@@ -470,7 +470,8 @@
-
- # install pam_ldap.so
- 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
- 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
deleted file mode 100644
index 7534ff69d43c..000000000000
--- a/net/nss-pam-ldapd/pkg-descr
+++ /dev/null
@@ -1,11 +0,0 @@
-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''.
-
-Key differences from nss_ldap:
-* lighter nss library (no ldap* dependings)
-* server-side connection caching
-
-
-WWW: http://arthurdejong.org/nss-ldapd/
diff --git a/net/nss-pam-ldapd/pkg-plist b/net/nss-pam-ldapd/pkg-plist
deleted file mode 100644
index 5280a2fe6e0d..000000000000
--- a/net/nss-pam-ldapd/pkg-plist
+++ /dev/null
@@ -1,5 +0,0 @@
-etc/%%CONFIG%%.conf
-%%NSS%%lib/nss_ldap.so.1
-%%NSLCD%%sbin/nslcd
-%%PAM%%lib/pam_ldap.so
-%%PAM%%lib/pam_ldap.so.1