summaryrefslogtreecommitdiff
path: root/net/nss-pam-ldapd/files
diff options
context:
space:
mode:
Diffstat (limited to 'net/nss-pam-ldapd/files')
-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.conf13
-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.h43
-rw-r--r--net/nss-pam-ldapd/files/patch-nss__shadow.c17
-rw-r--r--net/nss-pam-ldapd/files/patch-pam__makefile.in12
10 files changed, 0 insertions, 733 deletions
diff --git a/net/nss-pam-ldapd/files/nslcd.in b/net/nss-pam-ldapd/files/nslcd.in
deleted file mode 100644
index 5daab7ba603f..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"}
-
-. /etc/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 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.conf b/net/nss-pam-ldapd/files/patch-nslcd.conf
deleted file mode 100644
index 4c2a5b05b461..000000000000
--- a/net/nss-pam-ldapd/files/patch-nslcd.conf
+++ /dev/null
@@ -1,13 +0,0 @@
---- nslcd.conf.orig 2010-04-29 07:44:58.355014955 -0500
-+++ nslcd.conf 2010-04-29 07:45:10.741047860 -0500
-@@ -4,6 +4,10 @@
- # information in the directory.
- # See the manual page nslcd.conf(5) for more information.
-
-+# The underprivileged user and group used for running the daemon.
-+uid nslcd
-+gid nslcd
-+
- # The uri pointing to the LDAP server to use for name lookups.
- # Multiple entries may be specified. The address that is used
- # here should be resolvable without using LDAP (obviously).
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 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__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
-