aboutsummaryrefslogtreecommitdiffstats
path: root/amd/info_nisplus.c
diff options
context:
space:
mode:
Diffstat (limited to 'amd/info_nisplus.c')
-rw-r--r--amd/info_nisplus.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/amd/info_nisplus.c b/amd/info_nisplus.c
index d392b48fed6a..79df83614700 100644
--- a/amd/info_nisplus.c
+++ b/amd/info_nisplus.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 NISPLUS_KEY "key="
#define NISPLUS_ORGDIR ".org_dir"
@@ -221,7 +218,12 @@ nisplus_search(mnt_map *m, char *map, char *key, char **val, time_t *tp)
if (value != NULL)
data.value = strnsave(ENTRY_VAL(value, 1), ENTRY_LEN(value, 1));
}
- *val = data.value;
+
+ if (m->cfm && (m->cfm->cfm_flags & CFM_SUN_MAP_SYNTAX)) {
+ *val = sun_entry2amd(key, data.value);
+ XFREE(data.value); /* strnsave malloc'ed it above */
+ } else
+ *val = data.value;
if (*val) {
error = 0;