summaryrefslogtreecommitdiffstats
path: root/contrib/amd/amd/info_hesiod.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/amd/amd/info_hesiod.c')
-rw-r--r--contrib/amd/amd/info_hesiod.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/contrib/amd/amd/info_hesiod.c b/contrib/amd/amd/info_hesiod.c
index e345c99..0293f43 100644
--- a/contrib/amd/amd/info_hesiod.c
+++ b/contrib/amd/amd/info_hesiod.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2006 Erez Zadok
+ * Copyright (c) 1997-2014 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -16,11 +16,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -50,6 +46,7 @@
#endif /* HAVE_CONFIG_H */
#include <am_defs.h>
#include <amd.h>
+#include <sun_map.h>
#define HES_PREFIX "hesiod."
#define HES_PREFLEN 7
@@ -127,7 +124,11 @@ hesiod_search(mnt_map *m, char *map, char *key, char **pval, time_t *tp)
* it (and free subsequent replies)
*/
if (rvec && *rvec) {
- *pval = *rvec;
+ if (m->cfm && (m->cfm->cfm_flags & CFM_SUN_MAP_SYNTAX)) {
+ *pval = sun_entry2amd(key, *rvec);
+ XFREE(*rvec);
+ } else
+ *pval = *rvec;
while (*++rvec)
XFREE(*rvec);
return 0;
OpenPOWER on IntegriCloud