Blame SOURCES/autofs-5.1.1-add-reinit-entry-point-to-modules.patch

4d476f
autofs-5.1.1 - add reinit entry point to modules
4d476f
4d476f
From: Ian Kent <raven@themaw.net>
4d476f
4d476f
In order to avoid closing and then re-opening lookup modules
4d476f
on HUP signal (since there init entry point needs to be called
4d476f
for initialization) add a reinit entry point to lookup, parse
4d476f
and mount modules.
4d476f
4d476f
Signed-off-by: Ian Kent <raven@themaw.net>
4d476f
---
4d476f
 daemon/module.c           |   39 +++++++++++++++++++++++++++++++++++++++
4d476f
 include/automount.h       |   15 +++++++++++++++
4d476f
 modules/lookup_dir.c      |    9 ++++++++-
4d476f
 modules/lookup_file.c     |    9 ++++++++-
4d476f
 modules/lookup_hesiod.c   |    9 ++++++++-
4d476f
 modules/lookup_hosts.c    |    9 ++++++++-
4d476f
 modules/lookup_ldap.c     |    9 ++++++++-
4d476f
 modules/lookup_multi.c    |    9 ++++++++-
4d476f
 modules/lookup_nisplus.c  |    9 ++++++++-
4d476f
 modules/lookup_program.c  |    9 ++++++++-
4d476f
 modules/lookup_sss.c      |    9 ++++++++-
4d476f
 modules/lookup_userhome.c |    9 ++++++++-
4d476f
 modules/lookup_yp.c       |    9 ++++++++-
4d476f
 modules/mount_afs.c       |    5 +++++
4d476f
 modules/mount_autofs.c    |    5 +++++
4d476f
 modules/mount_bind.c      |    5 +++++
4d476f
 modules/mount_changer.c   |    5 +++++
4d476f
 modules/mount_ext2.c      |    5 +++++
4d476f
 modules/mount_generic.c   |    5 +++++
4d476f
 modules/mount_nfs.c       |    5 +++++
4d476f
 modules/parse_amd.c       |    5 +++++
4d476f
 modules/parse_hesiod.c    |    5 +++++
4d476f
 modules/parse_sun.c       |    5 +++++
4d476f
 23 files changed, 192 insertions(+), 11 deletions(-)
4d476f
4d476f
diff --git a/daemon/module.c b/daemon/module.c
4d476f
index 9028aaa..3bd7a0c 100644
4d476f
--- a/daemon/module.c
4d476f
+++ b/daemon/module.c
4d476f
@@ -105,6 +105,7 @@ int open_lookup(const char *name, const char *err_prefix, const char *mapfmt,
4d476f
 	}
4d476f
 
4d476f
 	if (!(mod->lookup_init = (lookup_init_t) dlsym(dh, "lookup_init")) ||
4d476f
+	    !(mod->lookup_reinit = (lookup_reinit_t) dlsym(dh, "lookup_reinit")) ||
4d476f
 	    !(mod->lookup_read_master = (lookup_read_master_t) dlsym(dh, "lookup_read_master")) ||
4d476f
 	    !(mod->lookup_read_map = (lookup_read_map_t) dlsym(dh, "lookup_read_map")) ||
4d476f
 	    !(mod->lookup_mount = (lookup_mount_t) dlsym(dh, "lookup_mount")) ||
4d476f
@@ -127,6 +128,19 @@ int open_lookup(const char *name, const char *err_prefix, const char *mapfmt,
4d476f
 	return NSS_STATUS_SUCCESS;
4d476f
 }
4d476f
 
4d476f
+int reinit_lookup(struct lookup_mod *mod, const char *name,
4d476f
+		  const char *err_prefix, const char *mapfmt,
4d476f
+		  int argc, const char *const *argv)
4d476f
+{
4d476f
+	if (mod->lookup_reinit(mapfmt, argc, argv, &mod->context)) {
4d476f
+		if (err_prefix)
4d476f
+			logerr("%scould not reinit lookup module %s",
4d476f
+			       err_prefix, name);
4d476f
+		return 1;
4d476f
+	}
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int close_lookup(struct lookup_mod *mod)
4d476f
 {
4d476f
 	int rv = mod->lookup_done(mod->context);
4d476f
@@ -185,6 +199,7 @@ struct parse_mod *open_parse(const char *name, const char *err_prefix,
4d476f
 	}
4d476f
 
4d476f
 	if (!(mod->parse_init = (parse_init_t) dlsym(dh, "parse_init")) ||
4d476f
+	    !(mod->parse_reinit = (parse_reinit_t) dlsym(dh, "parse_reinit")) ||
4d476f
 	    !(mod->parse_mount = (parse_mount_t) dlsym(dh, "parse_mount")) ||
4d476f
 	    !(mod->parse_done = (parse_done_t) dlsym(dh, "parse_done"))) {
4d476f
 		if (err_prefix)
4d476f
@@ -204,6 +219,18 @@ struct parse_mod *open_parse(const char *name, const char *err_prefix,
4d476f
 	return mod;
4d476f
 }
4d476f
 
4d476f
+int reinit_parse(struct parse_mod *mod, const char *name,
4d476f
+		 const char *err_prefix, int argc, const char *const *argv)
4d476f
+{
4d476f
+	if (mod->parse_reinit(argc, argv, &mod->context)) {
4d476f
+		if (err_prefix)
4d476f
+			logerr("%scould not reinit parse module %s",
4d476f
+			       err_prefix, name);
4d476f
+		return 1;
4d476f
+	}
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int close_parse(struct parse_mod *mod)
4d476f
 {
4d476f
 	int rv = mod->parse_done(mod->context);
4d476f
@@ -261,6 +288,7 @@ struct mount_mod *open_mount(const char *name, const char *err_prefix)
4d476f
 	}
4d476f
 
4d476f
 	if (!(mod->mount_init = (mount_init_t) dlsym(dh, "mount_init")) ||
4d476f
+	    !(mod->mount_reinit = (mount_reinit_t) dlsym(dh, "mount_reinit")) ||
4d476f
 	    !(mod->mount_mount = (mount_mount_t) dlsym(dh, "mount_mount")) ||
4d476f
 	    !(mod->mount_done = (mount_done_t) dlsym(dh, "mount_done"))) {
4d476f
 		if (err_prefix)
4d476f
@@ -280,6 +308,17 @@ struct mount_mod *open_mount(const char *name, const char *err_prefix)
4d476f
 	return mod;
4d476f
 }
4d476f
 
4d476f
+int reinit_mount(struct mount_mod *mod, const char *name, const char *err_prefix)
4d476f
+{
4d476f
+	if (mod->mount_reinit(&mod->context)) {
4d476f
+		if (err_prefix)
4d476f
+			logerr("%scould not reinit mount module %s",
4d476f
+			       err_prefix, name);
4d476f
+		return 1;
4d476f
+	}
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int close_mount(struct mount_mod *mod)
4d476f
 {
4d476f
 	int rv = mod->mount_done(mod->context);
4d476f
diff --git a/include/automount.h b/include/automount.h
4d476f
index d614c10..ab3e360 100644
4d476f
--- a/include/automount.h
4d476f
+++ b/include/automount.h
4d476f
@@ -281,12 +281,14 @@ int lookup_source_close_ioctlfd(struct autofs_point *ap, const char *key);
4d476f
 
4d476f
 #ifdef MODULE_LOOKUP
4d476f
 int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **context);
4d476f
+int lookup_reinit(const char *mapfmt, int argc, const char *const *argv, void **context);
4d476f
 int lookup_read_master(struct master *master, time_t age, void *context);
4d476f
 int lookup_read_map(struct autofs_point *, time_t, void *context);
4d476f
 int lookup_mount(struct autofs_point *, const char *, int, void *);
4d476f
 int lookup_done(void *);
4d476f
 #endif
4d476f
 typedef int (*lookup_init_t) (const char *, int, const char *const *, void **);
4d476f
+typedef int (*lookup_reinit_t) (const char *, int, const char *const *, void **);
4d476f
 typedef int (*lookup_read_master_t) (struct master *master, time_t, void *);
4d476f
 typedef int (*lookup_read_map_t) (struct autofs_point *, time_t, void *);
4d476f
 typedef int (*lookup_mount_t) (struct autofs_point *, const char *, int, void *);
4d476f
@@ -294,6 +296,7 @@ typedef int (*lookup_done_t) (void *);
4d476f
 
4d476f
 struct lookup_mod {
4d476f
 	lookup_init_t lookup_init;
4d476f
+	lookup_reinit_t lookup_reinit;
4d476f
 	lookup_read_master_t lookup_read_master;
4d476f
 	lookup_read_map_t lookup_read_map;
4d476f
 	lookup_mount_t lookup_mount;
4d476f
@@ -304,6 +307,9 @@ struct lookup_mod {
4d476f
 
4d476f
 int open_lookup(const char *name, const char *err_prefix, const char *mapfmt,
4d476f
 		int argc, const char *const *argv, struct lookup_mod **lookup);
4d476f
+int reinit_lookup(struct lookup_mod *mod, const char *name,
4d476f
+		  const char *err_prefix, const char *mapfmt,
4d476f
+		  int argc, const char *const *argv);
4d476f
 int close_lookup(struct lookup_mod *);
4d476f
 
4d476f
 /* parse module */
4d476f
@@ -312,16 +318,19 @@ int close_lookup(struct lookup_mod *);
4d476f
 
4d476f
 #ifdef MODULE_PARSE
4d476f
 int parse_init(int argc, const char *const *argv, void **context);
4d476f
+int parse_reinit(int argc, const char *const *argv, void **context);
4d476f
 int parse_mount(struct autofs_point *ap, const char *name,
4d476f
 		int name_len, const char *mapent, void *context);
4d476f
 int parse_done(void *);
4d476f
 #endif
4d476f
 typedef int (*parse_init_t) (int, const char *const *, void **);
4d476f
+typedef int (*parse_reinit_t) (int, const char *const *, void **);
4d476f
 typedef int (*parse_mount_t) (struct autofs_point *, const char *, int, const char *, void *);
4d476f
 typedef int (*parse_done_t) (void *);
4d476f
 
4d476f
 struct parse_mod {
4d476f
 	parse_init_t parse_init;
4d476f
+	parse_reinit_t parse_reinit;
4d476f
 	parse_mount_t parse_mount;
4d476f
 	parse_done_t parse_done;
4d476f
 	void *dlhandle;
4d476f
@@ -330,6 +339,8 @@ struct parse_mod {
4d476f
 
4d476f
 struct parse_mod *open_parse(const char *name, const char *err_prefix,
4d476f
 			     int argc, const char *const *argv);
4d476f
+int reinit_parse(struct parse_mod *, const char *name,
4d476f
+		 const char *err_prefix, int argc, const char *const *argv);
4d476f
 int close_parse(struct parse_mod *);
4d476f
 
4d476f
 /* mount module */
4d476f
@@ -338,17 +349,20 @@ int close_parse(struct parse_mod *);
4d476f
 
4d476f
 #ifdef MODULE_MOUNT
4d476f
 int mount_init(void **context);
4d476f
+int mount_reinit(void **context);
4d476f
 int mount_mount(struct autofs_point *ap, const char *root, const char *name, int name_len,
4d476f
 		const char *what, const char *fstype, const char *options, void *context);
4d476f
 int mount_done(void *context);
4d476f
 #endif
4d476f
 typedef int (*mount_init_t) (void **);
4d476f
+typedef int (*mount_reinit_t) (void **);
4d476f
 typedef int (*mount_mount_t) (struct autofs_point *, const char *, const char *, int,
4d476f
 				const char *, const char *, const char *, void *);
4d476f
 typedef int (*mount_done_t) (void *);
4d476f
 
4d476f
 struct mount_mod {
4d476f
 	mount_init_t mount_init;
4d476f
+	mount_reinit_t mount_reinit;
4d476f
 	mount_mount_t mount_mount;
4d476f
 	mount_done_t mount_done;
4d476f
 	void *dlhandle;
4d476f
@@ -356,6 +370,7 @@ struct mount_mod {
4d476f
 };
4d476f
 
4d476f
 struct mount_mod *open_mount(const char *name, const char *err_prefix);
4d476f
+int reinit_mount(struct mount_mod *mod, const char *name, const char *err_prefix);
4d476f
 int close_mount(struct mount_mod *);
4d476f
 
4d476f
 /* buffer management */
4d476f
diff --git a/modules/lookup_dir.c b/modules/lookup_dir.c
4d476f
index cbeda1f..7a95e24 100644
4d476f
--- a/modules/lookup_dir.c
4d476f
+++ b/modules/lookup_dir.c
4d476f
@@ -51,7 +51,8 @@ struct lookup_context {
4d476f
 int lookup_version = AUTOFS_LOOKUP_VERSION;	/* Required by protocol */
4d476f
 
4d476f
 
4d476f
-int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **context)
4d476f
+int lookup_init(const char *mapfmt,
4d476f
+		int argc, const char *const *argv, void **context)
4d476f
 {
4d476f
 	struct lookup_context *ctxt;
4d476f
 	char buf[MAX_ERR_BUF];
4d476f
@@ -105,6 +106,12 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int lookup_reinit(const char *mapfmt,
4d476f
+		  int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 static int acceptable_dirent_p(const struct dirent *e)
4d476f
 {
4d476f
   size_t namesz;
4d476f
diff --git a/modules/lookup_file.c b/modules/lookup_file.c
4d476f
index 7c982c6..c32a4cd 100644
4d476f
--- a/modules/lookup_file.c
4d476f
+++ b/modules/lookup_file.c
4d476f
@@ -50,7 +50,8 @@ struct lookup_context {
4d476f
 
4d476f
 int lookup_version = AUTOFS_LOOKUP_VERSION;	/* Required by protocol */
4d476f
 
4d476f
-int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **context)
4d476f
+int lookup_init(const char *mapfmt,
4d476f
+		int argc, const char *const *argv, void **context)
4d476f
 {
4d476f
 	struct lookup_context *ctxt;
4d476f
 	char buf[MAX_ERR_BUF];
4d476f
@@ -112,6 +113,12 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int lookup_reinit(const char *mapfmt,
4d476f
+		  int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 static int read_one(unsigned logopt, FILE *f, char *key, unsigned int *k_len, char *mapent, unsigned int *m_len)
4d476f
 {
4d476f
 	char *kptr, *p;
4d476f
diff --git a/modules/lookup_hesiod.c b/modules/lookup_hesiod.c
4d476f
index 526f294..de5ec08 100644
4d476f
--- a/modules/lookup_hesiod.c
4d476f
+++ b/modules/lookup_hesiod.c
4d476f
@@ -39,7 +39,8 @@ int lookup_version = AUTOFS_LOOKUP_VERSION;	/* Required by protocol */
4d476f
 
4d476f
 /* This initializes a context (persistent non-global data) for queries to
4d476f
    this module. */
4d476f
-int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **context)
4d476f
+int lookup_init(const char *mapfmt,
4d476f
+		int argc, const char *const *argv, void **context)
4d476f
 {
4d476f
 	struct lookup_context *ctxt = NULL;
4d476f
 	char buf[MAX_ERR_BUF];
4d476f
@@ -96,6 +97,12 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int lookup_reinit(const char *mapfmt,
4d476f
+		  int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int lookup_read_master(struct master *master, time_t age, void *context)
4d476f
 {
4d476f
 	return NSS_STATUS_UNKNOWN;
4d476f
diff --git a/modules/lookup_hosts.c b/modules/lookup_hosts.c
4d476f
index 53aa9d6..8ba0a4a 100644
4d476f
--- a/modules/lookup_hosts.c
4d476f
+++ b/modules/lookup_hosts.c
4d476f
@@ -46,7 +46,8 @@ int lookup_version = AUTOFS_LOOKUP_VERSION;	/* Required by protocol */
4d476f
 exports rpc_get_exports(const char *host, long seconds, long micros, unsigned int option);
4d476f
 void rpc_exports_free(exports list);
4d476f
 
4d476f
-int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **context)
4d476f
+int lookup_init(const char *mapfmt,
4d476f
+		int argc, const char *const *argv, void **context)
4d476f
 {
4d476f
 	struct lookup_context *ctxt;
4d476f
 	char buf[MAX_ERR_BUF];
4d476f
@@ -73,6 +74,12 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int lookup_reinit(const char *mapfmt,
4d476f
+		  int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int lookup_read_master(struct master *master, time_t age, void *context)
4d476f
 {
4d476f
 	return NSS_STATUS_UNKNOWN;
4d476f
diff --git a/modules/lookup_ldap.c b/modules/lookup_ldap.c
4d476f
index d846d8e..0f5bc48 100644
4d476f
--- a/modules/lookup_ldap.c
4d476f
+++ b/modules/lookup_ldap.c
4d476f
@@ -1687,7 +1687,8 @@ static void validate_uris(struct list_head *list)
4d476f
  * This initializes a context (persistent non-global data) for queries to
4d476f
  * this module.  Return zero if we succeed.
4d476f
  */
4d476f
-int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **context)
4d476f
+int lookup_init(const char *mapfmt,
4d476f
+		int argc, const char *const *argv, void **context)
4d476f
 {
4d476f
 	unsigned int is_amd_format;
4d476f
 	struct lookup_context *ctxt;
4d476f
@@ -1835,6 +1836,12 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int lookup_reinit(const char *mapfmt,
4d476f
+		  int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int lookup_read_master(struct master *master, time_t age, void *context)
4d476f
 {
4d476f
 	struct lookup_context *ctxt = (struct lookup_context *) context;
4d476f
diff --git a/modules/lookup_multi.c b/modules/lookup_multi.c
4d476f
index ba8d4f0..0ee20f5 100644
4d476f
--- a/modules/lookup_multi.c
4d476f
+++ b/modules/lookup_multi.c
4d476f
@@ -150,7 +150,8 @@ static struct lookup_mod *nss_open_lookup(const char *format, int argc, const ch
4d476f
 	return NULL;
4d476f
 }
4d476f
 
4d476f
-int lookup_init(const char *my_mapfmt, int argc, const char *const *argv, void **context)
4d476f
+int lookup_init(const char *my_mapfmt,
4d476f
+		int argc, const char *const *argv, void **context)
4d476f
 {
4d476f
 	struct lookup_context *ctxt;
4d476f
 	char buf[MAX_ERR_BUF];
4d476f
@@ -244,6 +245,12 @@ error_out:
4d476f
 	return 1;
4d476f
 }
4d476f
 
4d476f
+int lookup_reinit(const char *my_mapfmt,
4d476f
+		  int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int lookup_read_master(struct master *master, time_t age, void *context)
4d476f
 {
4d476f
         return NSS_STATUS_UNKNOWN;
4d476f
diff --git a/modules/lookup_nisplus.c b/modules/lookup_nisplus.c
4d476f
index d5eba47..0c66152 100644
4d476f
--- a/modules/lookup_nisplus.c
4d476f
+++ b/modules/lookup_nisplus.c
4d476f
@@ -30,7 +30,8 @@ struct lookup_context {
4d476f
 
4d476f
 int lookup_version = AUTOFS_LOOKUP_VERSION;	/* Required by protocol */
4d476f
 
4d476f
-int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **context)
4d476f
+int lookup_init(const char *mapfmt,
4d476f
+		int argc, const char *const *argv, void **context)
4d476f
 {
4d476f
 	struct lookup_context *ctxt;
4d476f
 	char buf[MAX_ERR_BUF];
4d476f
@@ -76,6 +77,12 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int lookup_reinit(const char *mapfmt,
4d476f
+		  int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int lookup_read_master(struct master *master, time_t age, void *context)
4d476f
 {
4d476f
 	struct lookup_context *ctxt = (struct lookup_context *) context;
4d476f
diff --git a/modules/lookup_program.c b/modules/lookup_program.c
4d476f
index a3a7e98..fa4f54d 100644
4d476f
--- a/modules/lookup_program.c
4d476f
+++ b/modules/lookup_program.c
4d476f
@@ -49,7 +49,8 @@ struct parse_context {
4d476f
 
4d476f
 int lookup_version = AUTOFS_LOOKUP_VERSION;	/* Required by protocol */
4d476f
 
4d476f
-int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **context)
4d476f
+int lookup_init(const char *mapfmt,
4d476f
+		int argc, const char *const *argv, void **context)
4d476f
 {
4d476f
 	struct lookup_context *ctxt;
4d476f
 	char buf[MAX_ERR_BUF];
4d476f
@@ -100,6 +101,12 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int lookup_reinit(const char *mapfmt,
4d476f
+		  int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int lookup_read_master(struct master *master, time_t age, void *context)
4d476f
 {
4d476f
         return NSS_STATUS_UNKNOWN;
4d476f
diff --git a/modules/lookup_sss.c b/modules/lookup_sss.c
4d476f
index 720b5e3..c58a272 100644
4d476f
--- a/modules/lookup_sss.c
4d476f
+++ b/modules/lookup_sss.c
4d476f
@@ -56,7 +56,8 @@ struct lookup_context {
4d476f
 
4d476f
 int lookup_version = AUTOFS_LOOKUP_VERSION;	/* Required by protocol */
4d476f
 
4d476f
-int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **context)
4d476f
+int lookup_init(const char *mapfmt,
4d476f
+		int argc, const char *const *argv, void **context)
4d476f
 {
4d476f
 	struct lookup_context *ctxt;
4d476f
 	char buf[MAX_ERR_BUF];
4d476f
@@ -137,6 +138,12 @@ lib_names_fail:
4d476f
 	return 1;
4d476f
 }
4d476f
 
4d476f
+int lookup_reinit(const char *mapfmt,
4d476f
+		  int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 static int setautomntent(unsigned int logopt,
4d476f
 			 struct lookup_context *ctxt, const char *mapname,
4d476f
 			 void **sss_ctxt)
4d476f
diff --git a/modules/lookup_userhome.c b/modules/lookup_userhome.c
4d476f
index fb3caaa..c21dee9 100644
4d476f
--- a/modules/lookup_userhome.c
4d476f
+++ b/modules/lookup_userhome.c
4d476f
@@ -29,7 +29,14 @@
4d476f
 
4d476f
 int lookup_version = AUTOFS_LOOKUP_VERSION;	/* Required by protocol */
4d476f
 
4d476f
-int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **context)
4d476f
+int lookup_init(const char *mapfmt,
4d476f
+		int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;		/* Nothing to do */
4d476f
+}
4d476f
+
4d476f
+int lookup_reinit(const char *mapfmt,
4d476f
+		  int argc, const char *const *argv, void **context)
4d476f
 {
4d476f
 	return 0;		/* Nothing to do */
4d476f
 }
4d476f
diff --git a/modules/lookup_yp.c b/modules/lookup_yp.c
4d476f
index fcf470a..1e5a7ed 100644
4d476f
--- a/modules/lookup_yp.c
4d476f
+++ b/modules/lookup_yp.c
4d476f
@@ -103,7 +103,8 @@ static unsigned int get_map_order(const char *domain, const char *map)
4d476f
 	return (unsigned int) last_changed;
4d476f
 }
4d476f
 
4d476f
-int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **context)
4d476f
+int lookup_init(const char *mapfmt,
4d476f
+		int argc, const char *const *argv, void **context)
4d476f
 {
4d476f
 	struct lookup_context *ctxt;
4d476f
 	char buf[MAX_ERR_BUF];
4d476f
@@ -165,6 +166,12 @@ int lookup_init(const char *mapfmt, int argc, const char *const *argv, void **co
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int lookup_reinit(const char *mapfmt,
4d476f
+		  int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int yp_all_master_callback(int status, char *ypkey, int ypkeylen,
4d476f
 		    char *val, int vallen, char *ypcb_data)
4d476f
 {
4d476f
diff --git a/modules/mount_afs.c b/modules/mount_afs.c
4d476f
index 50628ce..2a776bd 100644
4d476f
--- a/modules/mount_afs.c
4d476f
+++ b/modules/mount_afs.c
4d476f
@@ -25,6 +25,11 @@ int mount_init(void **context)
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int mount_reinit(void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int mount_mount(struct autofs_point *ap, const char *root, const char *name, int name_len,
4d476f
 		const char *what, const char *fstype, const char *options, void *context)
4d476f
 {
4d476f
diff --git a/modules/mount_autofs.c b/modules/mount_autofs.c
4d476f
index 4846e7f..39948e6 100644
4d476f
--- a/modules/mount_autofs.c
4d476f
+++ b/modules/mount_autofs.c
4d476f
@@ -39,6 +39,11 @@ int mount_init(void **context)
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int mount_reinit(void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int mount_mount(struct autofs_point *ap, const char *root, const char *name,
4d476f
 		int name_len, const char *what, const char *fstype,
4d476f
 		const char *c_options, void *context)
4d476f
diff --git a/modules/mount_bind.c b/modules/mount_bind.c
4d476f
index ac954e3..4864ea5 100644
4d476f
--- a/modules/mount_bind.c
4d476f
+++ b/modules/mount_bind.c
4d476f
@@ -67,6 +67,11 @@ out:
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int mount_reinit(void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int mount_mount(struct autofs_point *ap, const char *root, const char *name, int name_len,
4d476f
 		const char *what, const char *fstype, const char *options, void *context)
4d476f
 {
4d476f
diff --git a/modules/mount_changer.c b/modules/mount_changer.c
4d476f
index 5e2b47c..798f23b 100644
4d476f
--- a/modules/mount_changer.c
4d476f
+++ b/modules/mount_changer.c
4d476f
@@ -41,6 +41,11 @@ int mount_init(void **context)
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int mount_reinit(void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int mount_mount(struct autofs_point *ap, const char *root, const char *name, int name_len,
4d476f
 		const char *what, const char *fstype, const char *options, void *context)
4d476f
 {
4d476f
diff --git a/modules/mount_ext2.c b/modules/mount_ext2.c
4d476f
index 3c87512..c00e3d5 100644
4d476f
--- a/modules/mount_ext2.c
4d476f
+++ b/modules/mount_ext2.c
4d476f
@@ -33,6 +33,11 @@ int mount_init(void **context)
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int mount_reinit(void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int mount_mount(struct autofs_point *ap, const char *root, const char *name, int name_len,
4d476f
 		const char *what, const char *fstype, const char *options, void *context)
4d476f
 {
4d476f
diff --git a/modules/mount_generic.c b/modules/mount_generic.c
4d476f
index c4108e6..ae63787 100644
4d476f
--- a/modules/mount_generic.c
4d476f
+++ b/modules/mount_generic.c
4d476f
@@ -33,6 +33,11 @@ int mount_init(void **context)
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int mount_reinit(void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int mount_mount(struct autofs_point *ap, const char *root, const char *name, int name_len,
4d476f
 		const char *what, const char *fstype, const char *options,
4d476f
 		void *context)
4d476f
diff --git a/modules/mount_nfs.c b/modules/mount_nfs.c
4d476f
index 315fc99..15e1043 100644
4d476f
--- a/modules/mount_nfs.c
4d476f
+++ b/modules/mount_nfs.c
4d476f
@@ -54,6 +54,11 @@ int mount_init(void **context)
4d476f
 	return !mount_bind;
4d476f
 }
4d476f
 
4d476f
+int mount_reinit(void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int mount_mount(struct autofs_point *ap, const char *root, const char *name, int name_len,
4d476f
 		const char *what, const char *fstype, const char *options,
4d476f
 		void *context)
4d476f
diff --git a/modules/parse_amd.c b/modules/parse_amd.c
4d476f
index 2e3d21f..0626bf4 100644
4d476f
--- a/modules/parse_amd.c
4d476f
+++ b/modules/parse_amd.c
4d476f
@@ -130,6 +130,11 @@ int parse_init(int argc, const char *const *argv, void **context)
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int parse_reinit(int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 static struct substvar *add_lookup_vars(struct autofs_point *ap,
4d476f
 					const char *key, int key_len,
4d476f
 					struct map_source *source,
4d476f
diff --git a/modules/parse_hesiod.c b/modules/parse_hesiod.c
4d476f
index 237fd50..0b2b57f 100644
4d476f
--- a/modules/parse_hesiod.c
4d476f
+++ b/modules/parse_hesiod.c
4d476f
@@ -261,6 +261,11 @@ int parse_init(int argc, const char *const *argv, void **context)
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int parse_reinit(int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 int parse_done(void *context)
4d476f
 {
4d476f
 	return 0;
4d476f
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
4d476f
index 10dbd0c..35d6da5 100644
4d476f
--- a/modules/parse_sun.c
4d476f
+++ b/modules/parse_sun.c
4d476f
@@ -413,6 +413,11 @@ options_done:
4d476f
 	return 0;
4d476f
 }
4d476f
 
4d476f
+int parse_reinit(int argc, const char *const *argv, void **context)
4d476f
+{
4d476f
+	return 0;
4d476f
+}
4d476f
+
4d476f
 static const char *parse_options(const char *str, char **ret, unsigned int logopt)
4d476f
 {
4d476f
 	const char *cp = str;