aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README4
-rw-r--r--TODO1
-rw-r--r--modules/lookup_hesiod.c17
3 files changed, 15 insertions, 7 deletions
diff --git a/README b/README
index 5306214..4bd9784 100644
--- a/README
+++ b/README
@@ -9,6 +9,10 @@ to see if there are any options you need to change, then you can:
make ... make the daemon and modules
make install ... install the daemon and modules
+IMPORTANT: If you are building on a glibc system, or want to build
+hesiod or NIS+ support, you *MUST* change the options at the top of
+Makefile.rules.
+
The kernel code is no longer distributed with the autofs daemon; it is
now only distributed with the kernel code. A diff is included for
kernel version 2.0.30; autofs will be included directly into 2.0.31
diff --git a/TODO b/TODO
index 6747365..7ebd329 100644
--- a/TODO
+++ b/TODO
@@ -2,6 +2,7 @@ autofs v3 TODO list
-------------------
* Additional lookup modules: [ng]dbm, db/hash...
* Document the intermodule interface.
+* Use autoconf to set all the bloody options.
autofs v4 TODO list
-------------------
diff --git a/modules/lookup_hesiod.c b/modules/lookup_hesiod.c
index 231377e..757cec2 100644
--- a/modules/lookup_hesiod.c
+++ b/modules/lookup_hesiod.c
@@ -64,6 +64,7 @@ int lookup_mount(char *root, char *name, int name_len, void *context)
{
char **hes_result, mapent[HESIOD_LEN + 1];
struct lookup_context *ctxt = (struct lookup_context *) context;
+ int rv;
syslog(LOG_DEBUG, MODPREFIX "looking up root=\"%s\", name=\"%s\"",
root, name);
@@ -73,14 +74,16 @@ int lookup_mount(char *root, char *name, int name_len, void *context)
hes_result = hes_resolve(name, "filsys");
- if(hes_result) {
- strncpy(mapent, hes_result[0], sizeof(mapent) - 1);
- syslog(LOG_DEBUG, MODPREFIX "lookup for \"%s\" gave \"%s\"",
- name, mapent);
- free(hes_result);
+ if ( !hes_result ) {
+ syslog(LOG_NOTICE, MODPREFIX "entry \"%s\" not found in map\n", name);
+ return 1;
}
-
- return ctxt->parser->parse_mount(root,name,name_len,mapent,ctxt->parser->context);
+
+ syslog(LOG_DEBUG, MODPREFIX "lookup for \"%s\" gave \"%s\"",
+ name, hes_result[0]);
+ rv = ctxt->parser->parse_mount(root,name,name_len,hes_result[0],ctxt->parser->context);
+ free(hes_result);
+ return rv;
}
/* This destroys a context for queries to this module. It releases the parser