1 diff -uNr autofs-3.1.4/Makefile.conf.in autofs-3.1.4/Makefile.conf.in
2 --- autofs-3.1.4/Makefile.conf.in Fri Jan 21 14:08:10 2000
3 +++ autofs-3.1.4/Makefile.conf.in Tue Feb 29 10:34:33 2000
6 # Hesiod support: yes (1) no (0)
8 +HESIOD_BIND = @HAVE_HESIOD_BIND@
9 LIBHESIOD = @LIBHESIOD@
10 HESIOD_FLAGS = @HESIOD_FLAGS@
12 diff -uNr autofs-3.1.4/configure.in autofs-3.1.4/configure.in
13 --- autofs-3.1.4/configure.in Fri Jan 21 14:08:10 2000
14 +++ autofs-3.1.4/configure.in Tue Feb 29 10:40:43 2000
18 AC_CHECK_LIB(hesiod, hes_resolve, HAVE_HESIOD=1 LIBHESIOD="$LIBHESIOD -lhesiod", , $LIBRESOLV)
19 +AC_CHECK_LIB(bind, hesiod_resolve, HAVE_HESIOD=1 HAVE_HESIOD_BIND=1 LIBHESIOD="$LIBHESIOD -lbind", , $LIBRESOLV)
21 +AC_SUBST(HAVE_HESIOD_BIND)
23 AC_SUBST(HESIOD_FLAGS)
24 LDFLAGS="${AF_tmp_ldflags}"
25 diff -uNr autofs-3.1.4/modules/Makefile autofs-3.1.4/modules/Makefile
26 --- autofs-3.1.4/modules/Makefile Tue Feb 29 10:48:15 2000
27 +++ autofs-3.1.4/modules/Makefile Tue Feb 29 10:36:07 2000
32 + ifeq ($(HESIOD_BIND), 1)
33 + CFLAGS += -DHESIOD_BIND
35 SRCS += lookup_hesiod.c parse_hesiod.c
36 MODS += lookup_hesiod.so parse_hesiod.so
38 diff -uNr autofs-3.1.4/modules/lookup_hesiod.c autofs-3.1.4/modules/lookup_hesiod.c
39 --- autofs-3.1.4/modules/lookup_hesiod.c Fri Jan 21 14:08:09 2000
40 +++ autofs-3.1.4/modules/lookup_hesiod.c Wed Mar 1 10:07:43 2000
43 struct lookup_context {
44 struct parse_mod *parser;
46 + void *hesiod_context;
50 int lookup_version = AUTOFS_LOOKUP_VERSION; /* Required by protocol */
52 /* Initialize the resolver. */
56 + /* Initialize the hesiod context. */
57 + if(hesiod_init(&(ctxt->hesiod_context)) != 0) {
58 + syslog(LOG_CRIT, MODPREFIX "hesiod_init(): %m");
63 /* If a map type isn't explicitly given, parse it as hesiod entries. */
65 mapfmt = MAPFMT_DEFAULT;
67 chdir("/"); /* If this is not here the filesystem stays
68 busy, for some reason... */
71 + hes_result = hesiod_resolve(ctxt->hesiod_context, name, "filsys");
73 hes_result = hes_resolve(name, "filsys");
77 syslog(LOG_NOTICE, MODPREFIX "entry \"%s\" not found in map\n", name);
79 syslog(LOG_DEBUG, MODPREFIX "lookup for \"%s\" gave \"%s\"",
81 rv = ctxt->parser->parse_mount(root,name,name_len,hes_result[0],ctxt->parser->context);
83 + hesiod_free_list(ctxt->hesiod_context, hes_result);
92 struct lookup_context *ctxt = (struct lookup_context *) context;
93 int rv = close_parse(ctxt->parser);
95 + hesiod_end(ctxt->hesiod_context);