1 --- ./modules/Makefile.orig Sat Jun 23 14:16:40 2001
2 +++ ./modules/Makefile Sat Jun 23 14:17:51 2001
7 + ifeq ($(HESIOD_BIND), 1)
8 + CFLAGS += -DHESIOD_BIND
10 SRCS += lookup_hesiod.c parse_hesiod.c
11 MODS += lookup_hesiod.so parse_hesiod.so
13 --- ./modules/lookup_hesiod.c.orig Sat Jun 23 14:18:07 2001
14 +++ ./modules/lookup_hesiod.c Sat Jun 23 14:22:42 2001
17 struct lookup_context {
18 struct parse_mod *parser;
20 + void *hesiod_context;
24 int lookup_version = AUTOFS_LOOKUP_VERSION; /* Required by protocol */
26 /* Initialize the resolver. */
30 + /* Initialize the hesiod context. */
31 + if(hesiod_init(&(ctxt->hesiod_context)) != 0) {
32 + syslog(LOG_CRIT, MODPREFIX "hesiod_init(): %m");
37 /* If a map type isn't explicitly given, parse it as hesiod entries. */
39 mapfmt = MAPFMT_DEFAULT;
42 chdir("/"); /* If this is not here the filesystem stays
43 busy, for some reason... */
46 + hes_result = hesiod_resolve(ctxt->hesiod_context, name, "filsys");
48 hes_result = hes_resolve(name, "filsys");
52 syslog(LOG_NOTICE, MODPREFIX "entry \"%s\" not found in map\n", name);
54 syslog(LOG_DEBUG, MODPREFIX "lookup for \"%s\" gave \"%s\"",
56 rv = ctxt->parser->parse_mount(root,name,name_len,hes_result[0],ctxt->parser->context);
58 + hesiod_free_list(ctxt->hesiod_context, hes_result);
67 struct lookup_context *ctxt = (struct lookup_context *) context;
68 int rv = close_parse(ctxt->parser);
70 + hesiod_end(ctxt->hesiod_context);
75 --- ./Makefile.conf.in.orig Sat Jun 23 14:12:16 2001
76 +++ ./Makefile.conf.in Sat Jun 23 14:12:43 2001
79 # Hesiod support: yes (1) no (0)
80 HESIOD = @HAVE_HESIOD@
81 +HESIOD_BIND = @HAVE_HESIOD_BIND@
82 LIBHESIOD = @LIBHESIOD@
83 HESIOD_FLAGS = @HESIOD_FLAGS@
85 --- ./configure.in.orig Sat Jun 23 14:12:58 2001
86 +++ ./configure.in Sat Jun 23 14:16:32 2001
88 if test -z "$HAVE_HESIOD"
91 - AC_CHECK_LIB(hesiod, hes_resolve, HAVE_HESIOD=1 LIBHESIOD="$LIBHESIOD -lhesiod", ,
93 + AC_CHECK_LIB(bind, hesiod_resolve, HAVE_HESIOD=1 HAVE_HESIOD_BIND=1 LIBHESIOD="$LIBHESIOD -lbind", , $LIBRESOLV)
96 +AC_SUBST(HAVE_HESIOD_BIND)
98 AC_SUBST(HESIOD_FLAGS)
99 LDFLAGS="${AF_tmp_ldflags}"