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