summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-fs/autofs/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-fs/autofs/files')
-rw-r--r--net-fs/autofs/files/autofs-5.0.3-heimdal.patch35
-rw-r--r--net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch12
-rw-r--r--net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch18
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch45
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-libtirpc-link.patch10
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-parallel-make.patch48
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch144
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-sasl-def.patch43
-rw-r--r--net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch99
-rw-r--r--net-fs/autofs/files/autofs-5.0.8-ldap-wo-sasl.patch27
-rw-r--r--net-fs/autofs/files/autofs-5.1.0-fix-missing-stdarg.patch43
-rw-r--r--net-fs/autofs/files/autofs5-auto.master24
-rw-r--r--net-fs/autofs/files/autofs5.initd70
13 files changed, 618 insertions, 0 deletions
diff --git a/net-fs/autofs/files/autofs-5.0.3-heimdal.patch b/net-fs/autofs/files/autofs-5.0.3-heimdal.patch
new file mode 100644
index 000000000000..707364df2f97
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.3-heimdal.patch
@@ -0,0 +1,35 @@
+--- autofs-5.0.3.orig/modules/cyrus-sasl.c 2008-04-28 16:17:03.000000000 +0200
++++ autofs-5.0.3/modules/cyrus-sasl.c 2008-04-28 16:41:58.000000000 +0200
+@@ -66,6 +66,15 @@
+ #endif
+ #endif
+
++/**
++ * The type of a principal is different for MIT Krb5 and Heimdal.
++ * These macros are provided by Heimdal, and introduced here for MIT.
++ */
++#ifndef krb5_realm_length
++#define krb5_realm_length(r) ((r).length)
++#define krb5_realm_data(r) ((r).data)
++#endif
++
+ /*
+ * Once a krb5 credentials cache is setup, we need to set the KRB5CCNAME
+ * environment variable so that the library knows where to find it.
+@@ -452,11 +461,11 @@
+
+ /* setup a principal for the ticket granting service */
+ ret = krb5_build_principal_ext(ctxt->krb5ctxt, &tgs_princ,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
++ krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
++ krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ strlen(KRB5_TGS_NAME), KRB5_TGS_NAME,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
++ krb5_realm_length(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
++ krb5_realm_data(*krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ 0);
+ if (ret) {
+ error(logopt,
+
diff --git a/net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch b/net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch
new file mode 100644
index 000000000000..8ab10fcf7471
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.5-fix-install-deadlink.patch
@@ -0,0 +1,12 @@
+--- modules/Makefile.old 2010-06-19 20:43:45.373371321 +0200
++++ modules/Makefile 2010-06-19 20:45:26.062417092 +0200
+@@ -63,7 +63,9 @@ install: all
+ -rm -f $(INSTALLROOT)$(autofslibdir)/mount_smbfs.so
+ ln -fs lookup_file.so $(INSTALLROOT)$(autofslibdir)/lookup_files.so
+ ln -fs lookup_yp.so $(INSTALLROOT)$(autofslibdir)/lookup_nis.so
++ifeq ($(SASL), 1)
+ ln -fs lookup_ldap.so $(INSTALLROOT)$(autofslibdir)/lookup_ldaps.so
++endif
+ ln -fs mount_nfs.so $(INSTALLROOT)$(autofslibdir)/mount_nfs4.so
+ ifeq ($(EXT2FS), 1)
+ ifeq ($(EXT3FS), 1)
diff --git a/net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch b/net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch
new file mode 100644
index 000000000000..49901ddfc69b
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.6-revert-ldap.patch
@@ -0,0 +1,18 @@
+--- modules/lookup_ldap.c
++++ modules/lookup_ldap.c
+@@ -1488,6 +1488,7 @@ int lookup_init(const char *mapfmt, int
+ }
+ }
+
++#ifdef WITH_SASL
+ /*
+ * First, check to see if a preferred authentication method was
+ * specified by the user. parse_ldap_config will return error
+@@ -1500,7 +1501,6 @@ int lookup_init(const char *mapfmt, int
+ return 1;
+ }
+
+-#ifdef WITH_SASL
+ /* Init the sasl callbacks */
+ if (!autofs_sasl_client_init(LOGOPT_NONE)) {
+ error(LOGOPT_ANY, "failed to init sasl client");
diff --git a/net-fs/autofs/files/autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch b/net-fs/autofs/files/autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch
new file mode 100644
index 000000000000..366b1eaaba3b
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-add-missing-endif-HAVE_SASL-in-modules-lookup_ldap.c.patch
@@ -0,0 +1,45 @@
+--- ./modules/lookup_ldap.c
++++ ./modules/lookup_ldap.c
+@@ -591,10 +591,12 @@ static LDAP *do_connect(unsigned logopt, const char *uri, struct lookup_context
+ {
+ LDAP *ldap;
+
++#ifdef HAVE_SASL
+ if (ctxt->extern_cert && ctxt->extern_key) {
+ set_env(logopt, ENV_LDAPTLS_CERT, ctxt->extern_cert);
+ set_env(logopt, ENV_LDAPTLS_KEY, ctxt->extern_key);
+ }
++#endif
+
+ ldap = init_ldap_connection(logopt, uri, ctxt);
+ if (ldap) {
+@@ -1372,10 +1374,12 @@ static void free_context(struct lookup_context *ctxt)
+ defaults_free_searchdns(ctxt->sdns);
+ if (ctxt->dclist)
+ free_dclist(ctxt->dclist);
++#ifdef HAVE_SASL
+ if (ctxt->extern_cert)
+ free(ctxt->extern_cert);
+ if (ctxt->extern_key)
+ free(ctxt->extern_key);
++#endif
+ free(ctxt);
+
+ return;
+ modules/lookup_ldap.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
+index dbec753..ce1e2e5 100644
+--- a/modules/lookup_ldap.c
++++ b/modules/lookup_ldap.c
+@@ -28,7 +28,9 @@
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+ #include <lber.h>
++#ifdef HAVE_SASL
+ #include <libxml/tree.h>
++#endif
+
+ #define MODULE_LOOKUP
+ #include "automount.h"
diff --git a/net-fs/autofs/files/autofs-5.0.7-libtirpc-link.patch b/net-fs/autofs/files/autofs-5.0.7-libtirpc-link.patch
new file mode 100644
index 000000000000..92143f1d3066
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-libtirpc-link.patch
@@ -0,0 +1,10 @@
+diff --git a/modules/Makefile b/modules/Makefile
+index 4ecbd6a..6a17540 100644
+--- a/modules/Makefile
++++ b/modules/Makefile
+@@ -114,4 +114,4 @@ lookup_ldap.so: lookup_ldap.c dclist.o base64.o $(SASL_OBJ)
+
+ mount_nfs.so: mount_nfs.c replicated.o
+ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \
+- mount_nfs.c replicated.o $(AUTOFS_LIB) $(LIBNSL)
++ mount_nfs.c replicated.o $(AUTOFS_LIB) $(LIBNSL) $(TIRPCLIB)
diff --git a/net-fs/autofs/files/autofs-5.0.7-parallel-make.patch b/net-fs/autofs/files/autofs-5.0.7-parallel-make.patch
new file mode 100644
index 000000000000..f510f8fa2015
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-parallel-make.patch
@@ -0,0 +1,48 @@
+From ed85b855e1bcdb814b3dca7f6c768b86e6353fe7 Mon Sep 17 00:00:00 2001
+From: "Lan Yixun (dlan)" <dennis.yxun@gmail.com>
+Date: Thu, 25 Jul 2013 10:04:23 +0800
+Subject: [PATCH] fix occasional build error when enable parallel compiling
+
+the problem here we pass "-jX" ( X> 1) to "make", and "rpc_subs.c"
+occasionally fail to compile due to it can't find "mount.h",
+the root cause it that "mount.h" haven't generated by that time,
+add this patch should fix this problem.
+to make rpc_subs.o explicitly depend on "mount.h".
+
+---
+error message:
+
+x86_64-pc-linux-gnu-gcc -O2 -pipe -march=core2 -D_REENTRANT
+-D_FILE_OFFSET_BITS=64 -I/usr/include/tirp c -D_REENTRANT
+-D_FILE_OFFSET_BITS=64 -I/usr/include/tirpc -I../include -fPIC
+-D_GNU_SOURCE -DAUTOFS_MA P_DIR=\"/etc/autofs\"
+-DAUTOFS_CONF_DIR=\"/etc/conf.d\" -c rpc_subs.c
+rpc_subs.c:46:19: fatal error: mount.h: No such file or directory
+ #include "mount.h"
+ ^
+compilation terminated.
+make[1]: *** [rpc_subs.o] Error 1
+make[1]: *** Waiting for unfinished
+jobs....
+
+Signed-off-by: Lan Yixun (dlan) <dennis.yxun@gmail.com>
+---
+ lib/Makefile | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index 5418009..314779b 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -70,6 +70,8 @@ nss_tok.o: nss_tok.c nss_parse.tab.h
+
+ nss_parse.tab.o: nss_parse.tab.c nss_parse.tab.h
+
++rpc_subs.o: mount.h
++
+ install: all
+
+ clean:
+--
+1.8.3.2
+
diff --git a/net-fs/autofs/files/autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch b/net-fs/autofs/files/autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch
new file mode 100644
index 000000000000..c12d4bbe2b17
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-respect-user-flags-and-fix-asneeded-r3.patch
@@ -0,0 +1,144 @@
+--- a/Makefile.conf.in
++++ b/Makefile.conf.in
+@@ -100,3 +100,6 @@ initdir = @initdir@
+
+ # Location of systemd unit files
+ systemddir = @systemddir@
++
++# Use the compiler determined by configure
++CC := @CC@
+--- a/Makefile.rules
++++ b/Makefile.rules
+@@ -16,44 +16,30 @@ INSTALLROOT = $(DESTDIR)
+ AUTOFS_LIB = ../lib/autofs.a
+
+ # Compilers, linkers and flags
+-# The STRIP defined here *must not* remove any dynamic-loading symbols
+-
+ ifdef DMALLOCLIB
+ DEBUG=1
+ endif
+
+ ifdef DEBUG
+ CFLAGS ?= -g -Wall -DDEBUG
+-LDFLAGS = -g
+-STRIP = :
+ else
+-ifdef DONTSTRIP
+ CFLAGS ?= -O2 -g
+-LDFLAGS = -g
+-STRIP = :
+-else
+-CFLAGS ?= -O2 -Wall
+-LDFLAGS = -s
+-STRIP = strip --strip-debug
+-endif
+ endif
++AUTOFS_LDFLAGS = -g
+
+-CC = gcc
+-CXX = g++
+ CXXFLAGS = $(CFLAGS)
+ LD = ld
+ SOLDFLAGS = -shared
+
+ CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64
+-LDFLAGS += -lpthread
+
+ ifdef TIRPCLIB
+ CFLAGS += -I/usr/include/tirpc
+-LDFLAGS += $(TIRPCLIB)
++AUTOFS_LDFLAGS += $(TIRPCLIB)
+ endif
+
+ ifdef DMALLOCLIB
+-LDFLAGS += $(DMALLOCLIB)
++AUTOFS_LDFLAGS += $(DMALLOCLIB)
+ endif
+
+ ifdef SASL
+@@ -71,5 +57,4 @@ endif
+ $(CC) $(CFLAGS) -S $<
+
+ .c.so:
+- $(CC) $(SOLDFLAGS) $(CFLAGS) -o $*.so $< $(AUTOFS_LIB) $(DMALLOCLIB) $(LIBNSL)
+- $(STRIP) $*.so
++ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o $*.so $< $(AUTOFS_LIB) $(DMALLOCLIB) $(LIBNSL)
+--- a/configure.in
++++ b/configure.in
+@@ -183,7 +183,7 @@ AC_ARG_WITH(hesiod,
+ : Search for Hesiod in normal directory path
+ else
+ : Search for Hesiod in specific directory
+- LDFLAGS="$LDFLAGS -L${withval}/lib"
++ LDFLAGS="$LDFLAGS -Wl,--no-as-needed -L${withval}/lib"
+ LIBHESIOD="-L${withval}/lib"
+ HESIOD_FLAGS="-I${withval}/include"
+ fi
+--- a/daemon/Makefile
++++ b/daemon/Makefile
+@@ -20,7 +20,7 @@ CFLAGS += -DAUTOFS_FIFO_DIR=\"$(autofsfi
+ CFLAGS += -DAUTOFS_FLAG_DIR=\"$(autofsflagdir)\"
+ CFLAGS += -DVERSION_STRING=\"$(version)\"
+ LDFLAGS += -rdynamic
+-LIBS = -ldl
++LIBS += -ldl -lpthread
+
+ ifeq ($(LDAP), 1)
+ CFLAGS += $(XML_FLAGS)
+@@ -30,8 +30,7 @@ endif
+ all: automount
+
+ automount: $(OBJS) $(AUTOFS_LIB)
+- $(CC) $(LDFLAGS) $(DAEMON_LDFLAGS) -o automount $(OBJS) $(AUTOFS_LIB) $(LIBS)
+- $(STRIP) automount
++ $(CC) $(AUTOFS_LDFLAGS) $(DAEMON_LDFLAGS) $(LDFLAGS) -o automount $(OBJS) $(AUTOFS_LIB) $(LIBS)
+
+ clean:
+ rm -f *.o *.s *~ automount
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -41,14 +41,12 @@ mount_clnt.c: mount.h
+
+ mount_clnt.o: mount_clnt.c
+ $(CC) $(CFLAGS) -o mount_clnt.o -c mount_clnt.c
+- $(STRIP) mount_clnt.o
+
+ mount_xdr.c: mount.h
+ $(RPCGEN) -c -o mount_xdr.c mount.x
+
+ mount_xdr.o: mount_xdr.c
+ $(CC) $(CFLAGS) -Wno-unused-variable -o mount_xdr.o -c mount_xdr.c
+- $(STRIP) mount_xdr.o
+
+ master_tok.c: master_tok.l
+ $(LEX) -o$@ -Pmaster_ $?
+--- a/modules/Makefile
++++ b/modules/Makefile
+@@ -87,9 +87,8 @@ endif
+ # Ad hoc compilation rules for modules which need auxilliary libraries
+ #
+ lookup_hesiod.so: lookup_hesiod.c
+- $(CC) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \
++ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) $(HESIOD_FLAGS) -o lookup_hesiod.so \
+ lookup_hesiod.c $(AUTOFS_LIB) $(LIBHESIOD) $(LIBRESOLV)
+- $(STRIP) lookup_hesiod.so
+
+ cyrus-sasl.o: cyrus-sasl.c
+ $(CC) $(CFLAGS) $(LDAP_FLAGS) -c $<
+@@ -98,13 +97,10 @@ cyrus-sasl-extern.o: cyrus-sasl-extern.c
+ $(CC) $(CFLAGS) $(LDAP_FLAGS) -c $<
+
+ lookup_ldap.so: lookup_ldap.c dclist.o base64.o $(SASL_OBJ)
+- $(CC) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \
++ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) $(LDAP_FLAGS) -o lookup_ldap.so \
+ lookup_ldap.c dclist.o base64.o $(SASL_OBJ) \
+ $(AUTOFS_LIB) $(LIBLDAP) $(LIBRESOLV)
+- $(STRIP) lookup_ldap.so
+
+ mount_nfs.so: mount_nfs.c replicated.o
+- $(CC) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \
++ $(CC) $(LDFLAGS) $(SOLDFLAGS) $(CFLAGS) -o mount_nfs.so \
+ mount_nfs.c replicated.o $(AUTOFS_LIB) $(LIBNSL)
+- $(STRIP) mount_nfs.so
+-
diff --git a/net-fs/autofs/files/autofs-5.0.7-sasl-def.patch b/net-fs/autofs/files/autofs-5.0.7-sasl-def.patch
new file mode 100644
index 000000000000..a12d3798bdf0
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-sasl-def.patch
@@ -0,0 +1,43 @@
+diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
+index ce1e2e5..35a2106 100644
+--- a/modules/lookup_ldap.c
++++ b/modules/lookup_ldap.c
+@@ -28,9 +28,6 @@
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+ #include <lber.h>
+-#ifdef HAVE_SASL
+-#include <libxml/tree.h>
+-#endif
+
+ #define MODULE_LOOKUP
+ #include "automount.h"
+@@ -38,6 +35,10 @@
+ #include "lookup_ldap.h"
+ #include "base64.h"
+
++#ifdef WITH_SASL
++#include <libxml/tree.h>
++#endif
++
+ #define MAPFMT_DEFAULT "sun"
+
+ #define MODPREFIX "lookup(ldap): "
+@@ -587,7 +588,7 @@ static LDAP *do_connect(unsigned logopt, const char *uri, struct lookup_context
+ {
+ LDAP *ldap;
+
+-#ifdef HAVE_SASL
++#ifdef WITH_SASL
+ if (ctxt->extern_cert && ctxt->extern_key) {
+ set_env(logopt, ENV_LDAPTLS_CERT, ctxt->extern_cert);
+ set_env(logopt, ENV_LDAPTLS_KEY, ctxt->extern_key);
+@@ -1389,7 +1390,7 @@ static void free_context(struct lookup_context *ctxt)
+ defaults_free_searchdns(ctxt->sdns);
+ if (ctxt->dclist)
+ free_dclist(ctxt->dclist);
+-#ifdef HAVE_SASL
++#ifdef WITH_SASL
+ if (ctxt->extern_cert)
+ free(ctxt->extern_cert);
+ if (ctxt->extern_key)
diff --git a/net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch b/net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch
new file mode 100644
index 000000000000..86e02bce5558
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.7-sloppy-mount.patch
@@ -0,0 +1,99 @@
+From: Ian Kent <ikent@redhat.com>
+
+Historically autofs added an option to mounts, called the sloppy
+option, meant to allow mount(8) to ignore invalid mount options.
+This was done so that mount map entries for sites that needed to
+use different mount options for some machines would still work.
+It was needed for nfs mounts in particular.
+
+Recent changes to mount(8) cause the sloppy option to be passed on
+for all mounts when it is given.
+
+Previously mount(8) only passed on the option to nfs mounts so now,
+for other than nfs mounts, the mount will fail if the file system
+doesn't understand the sloppy option.
+
+Since the option was not passed on to other than nfs mounts before
+it seems sensible for autofs to not add it for other than nfs mounts
+now.
+
+Signed-off-by: Ian Kent <ikent@redhat.com>
+---
+ modules/mount_bind.c | 9 ++++-----
+ modules/mount_changer.c | 6 +++---
+ modules/mount_ext2.c | 6 +++---
+ modules/mount_generic.c | 4 ++--
+ 4 files changed, 12 insertions(+), 13 deletions(-)
+
+--- a/modules/mount_bind.c
++++ b/modules/mount_bind.c
+@@ -158,13 +158,12 @@ int mount_mount(struct autofs_point *ap,
+ if (!status)
+ existed = 0;
+
+- debug(ap->logopt,
+- MODPREFIX
+- "calling mount --bind " SLOPPY " -o %s %s %s",
++ debug(ap->logopt, MODPREFIX
++ "calling mount --bind -o %s %s %s",
+ options, what, fullpath);
+
+- err = spawn_bind_mount(ap->logopt,
+- SLOPPYOPT "-o", options, what, fullpath, NULL);
++ err = spawn_bind_mount(ap->logopt, "-o",
++ options, what, fullpath, NULL);
+
+ if (err) {
+ if (ap->type != LKP_INDIRECT)
+--- a/modules/mount_changer.c
++++ b/modules/mount_changer.c
+@@ -103,12 +103,12 @@ int mount_mount(struct autofs_point *ap,
+ }
+
+ if (options && options[0]) {
+- debug(ap->logopt,
+- MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
++ debug(ap->logopt, MODPREFIX
++ "calling mount -t %s -o %s %s %s",
+ fstype, options, what, fullpath);
+
+ err = spawn_mount(ap->logopt, "-t", fstype,
+- SLOPPYOPT "-o", options, what, fullpath, NULL);
++ "-o", options, what, fullpath, NULL);
+ } else {
+ debug(ap->logopt,
+ MODPREFIX "calling mount -t %s %s %s",
+--- a/modules/mount_ext2.c
++++ b/modules/mount_ext2.c
+@@ -116,11 +116,11 @@ int mount_mount(struct autofs_point *ap,
+ }
+
+ if (options) {
+- debug(ap->logopt,
+- MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
++ debug(ap->logopt, MODPREFIX
++ "calling mount -t %s -o %s %s %s",
+ fstype, options, what, fullpath);
+ err = spawn_mount(ap->logopt, "-t", fstype,
+- SLOPPYOPT "-o", options, what, fullpath, NULL);
++ "-o", options, what, fullpath, NULL);
+ } else {
+ debug(ap->logopt,
+ MODPREFIX "calling mount -t %s %s %s",
+--- a/modules/mount_generic.c
++++ b/modules/mount_generic.c
+@@ -97,11 +97,11 @@ int mount_mount(struct autofs_point *ap,
+
+ if (options && options[0]) {
+ debug(ap->logopt,
+- MODPREFIX "calling mount -t %s " SLOPPY "-o %s %s %s",
++ MODPREFIX "calling mount -t %s -o %s %s %s",
+ fstype, options, loc, fullpath);
+
+ err = spawn_mount(ap->logopt, "-t", fstype,
+- SLOPPYOPT "-o", options, loc, fullpath, NULL);
++ "-o", options, loc, fullpath, NULL);
+ } else {
+ debug(ap->logopt, MODPREFIX "calling mount -t %s %s %s",
+ fstype, loc, fullpath);
+
diff --git a/net-fs/autofs/files/autofs-5.0.8-ldap-wo-sasl.patch b/net-fs/autofs/files/autofs-5.0.8-ldap-wo-sasl.patch
new file mode 100644
index 000000000000..a64ed7e8157f
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.0.8-ldap-wo-sasl.patch
@@ -0,0 +1,27 @@
+diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
+index 2ab1e8c..04b1da7 100644
+--- a/modules/lookup_ldap.c
++++ b/modules/lookup_ldap.c
+@@ -846,20 +846,20 @@ int get_property(unsigned logopt, xmlNodePtr node, const char *prop, char **valu
+ return 0;
+ }
+
+-#ifdef WITH_SASL
+ /*
+ * For plain text, login and digest-md5 authentication types, we need
+ * user and password credentials.
+ */
+ int authtype_requires_creds(const char *authtype)
+ {
++#ifdef WITH_SASL
+ if (!strncmp(authtype, "PLAIN", strlen("PLAIN")) ||
+ !strncmp(authtype, "DIGEST-MD5", strlen("DIGEST-MD5")) ||
+ !strncmp(authtype, "LOGIN", strlen("LOGIN")))
+ return 1;
++#endif
+ return 0;
+ }
+-#endif
+
+ /*
+ * Returns:
diff --git a/net-fs/autofs/files/autofs-5.1.0-fix-missing-stdarg.patch b/net-fs/autofs/files/autofs-5.1.0-fix-missing-stdarg.patch
new file mode 100644
index 000000000000..411a6d088dcc
--- /dev/null
+++ b/net-fs/autofs/files/autofs-5.1.0-fix-missing-stdarg.patch
@@ -0,0 +1,43 @@
+From b9653c08896fcb08c441177e5918458f09111351 Mon Sep 17 00:00:00 2001
+From: "Yixun Lan (dlan)" <dennis.yxun@gmail.com>
+Date: Sat, 14 Jun 2014 23:16:36 +0800
+Subject: [PATCH] fix undefined va_{start,end} error
+
+https://bugs.gentoo.org/show_bug.cgi?id=513196
+
+---
+
+x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -rdynamic -pie -o automount auto
+mount.o indirect.o direct.o spawn.o module.o mount.o lookup.o state.o flag.o ../
+lib/autofs.a -lpthread -lnsl -ldl
+../lib/autofs.a(defaults.o): In function `message':
+/var/tmp/portage/net-fs/autofs-5.1.0/work/autofs-5.1.0/lib/defaults.c:179: undef
+ined reference to `va_start'
+/var/tmp/portage/net-fs/autofs-5.1.0/work/autofs-5.1.0/lib/defaults.c:186: undefined reference to `va_end'
+collect2: error: ld returned 1 exit status
+Makefile:33: recipe for target 'automount' failed
+make[1]: *** [automount] Error 1
+make[1]: Leaving directory '/var/tmp/portage/net-fs/autofs-5.1.0/work/autofs-5.1.0/daemon'
+Makefile:14: recipe for target 'daemon' failed
+make: *** [daemon] Error 2
+
+Signed-off-by: Yixun Lan (dlan) <dennis.yxun@gmail.com>
+---
+ lib/defaults.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/defaults.c b/lib/defaults.c
+index 2b03ea2..5728e67 100644
+--- a/lib/defaults.c
++++ b/lib/defaults.c
+@@ -16,6 +16,7 @@
+
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <stdarg.h>
+ #include <ctype.h>
+ #include <string.h>
+ #include <sys/utsname.h>
+--
+1.8.5.2
+
diff --git a/net-fs/autofs/files/autofs5-auto.master b/net-fs/autofs/files/autofs5-auto.master
new file mode 100644
index 000000000000..8656474647ed
--- /dev/null
+++ b/net-fs/autofs/files/autofs5-auto.master
@@ -0,0 +1,24 @@
+# $Id$
+# Sample auto.master file
+# This is an automounter map and it has the following format
+# key [ -mount-options-separated-by-comma ] location
+# For details of the format look at autofs(5).
+#
+#/misc /etc/autofs/auto.misc
+#/net /etc/autofs/auto.net
+#
+# NOTE: mounts done from a hosts map will be mounted with the
+# "nosuid" and "nodev" options unless the "suid" and "dev"
+# options are explicitly given.
+#
+#/net -hosts
+#
+# Include central master map if it can be found using
+# nsswitch sources.
+#
+# Note that if there are entries for /net or /misc (as
+# above) in the included master map any keys that are the
+# same will not be seen as the first read key seen takes
+# precedence.
+#
+#+auto.master
diff --git a/net-fs/autofs/files/autofs5.initd b/net-fs/autofs/files/autofs5.initd
new file mode 100644
index 000000000000..8152f46c082e
--- /dev/null
+++ b/net-fs/autofs/files/autofs5.initd
@@ -0,0 +1,70 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DAEMON=/usr/sbin/automount
+PIDFILE=/var/run/autofs.pid
+DEVICE=autofs
+
+depend() {
+ need localmount
+ use ypbind nfs slapd portmap net
+}
+
+extra_started_commands="reload"
+
+start() {
+ ebegin "Starting automounter"
+
+ # Ensure autofs support is loaded
+ grep -q autofs /proc/filesystems || modprobe -q autofs4
+ if [ $? -ne 0 ]; then
+ eend 1 "No autofs support available in kernel"
+ return 1
+ fi
+
+ # Check misc device
+ if [ -n "${USE_MISC_DEVICE}" -a "${USE_MISC_DEVICE}" = "yes" ]; then
+ sleep 1
+ if [ -e "/proc/misc" ]; then
+ MINOR=$(awk "/${DEVICE}/ {print \$1}" /proc/misc)
+ if [ -n "${MINOR}" -a ! -c "/dev/${DEVICE}" ]; then
+ mknod -m 0600 "/dev/${DEVICE}" c 10 ${MINOR}
+ if [ $? -ne 0 ]; then
+ eend 1 "Could not create '/dev/${DEVICE}'"
+ return 1
+ fi
+ fi
+ fi
+ if [ -x /sbin/restorecon -a -c "/dev/${DEVICE}" ]; then
+ /sbin/restorecon "/dev/${DEVICE}"
+ if [ $? -ne 0 ]; then
+ eend 1 "Failed to execute '/sbin/restorecon \"/dev/${DEVICE}\"'"
+ return 1
+ fi
+ fi
+ else
+ [ -c "/dev/${DEVICE}" ] && rm -rf "/dev/${DEVICE}"
+ fi
+
+ start-stop-daemon --start --exec ${DAEMON} -- -p ${PIDFILE} ${OPTIONS}
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping automounter"
+ start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading automounter"
+ if [ ! -r "${PIDFILE}" ]; then
+ eend 1 "automount not running"
+ else
+ kill -s HUP $(cat "${PIDFILE}") 2> /dev/null
+ eend $?
+ fi
+}