SCCS-vsn: usr.sbin/sendmail/src/map.c 8.38
-static char sccsid[] = "@(#)map.c 8.37 (Berkeley) %G%";
+static char sccsid[] = "@(#)map.c 8.38 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
map->map_file);
map->map_mflags |= MF_OPEN;
}
map->map_file);
map->map_mflags |= MF_OPEN;
}
- else if (tTd(38, 4))
- printf("\t%s:%s %s: invalid: %s\n",
- map->map_class->map_cname == NULL ? "NULL" :
- map->map_class->map_cname,
- map->map_mname == NULL ? "NULL" :
- map->map_mname,
- map->map_file == NULL ? "NULL" :
- map->map_file,
- errstring(errno));
+ else
+ {
+ if (tTd(38, 4))
+ printf("\t%s:%s %s: invalid: %s\n",
+ map->map_class->map_cname == NULL ? "NULL" :
+ map->map_class->map_cname,
+ map->map_mname == NULL ? "NULL" :
+ map->map_mname,
+ map->map_file == NULL ? "NULL" :
+ map->map_file,
+ errstring(errno));
+ if (!bitset(MF_OPTIONAL, map->map_mflags))
+ {
+ extern MAPCLASS BogusMapClass;
+
+ map->map_class = &BogusMapClass;
+ map->map_mflags |= MF_OPEN;
+ }
+ }
if (yperr != 0)
{
if (!bitset(MF_OPTIONAL, map->map_mflags))
if (yperr != 0)
{
if (!bitset(MF_OPTIONAL, map->map_mflags))
- syserr("NIS map %s specified, but NIS not running\n",
+ syserr("421 NIS map %s specified, but NIS not running\n",
map->map_file);
return FALSE;
}
map->map_file);
return FALSE;
}
return TRUE;
if (!bitset(MF_OPTIONAL, map->map_mflags))
return TRUE;
if (!bitset(MF_OPTIONAL, map->map_mflags))
- syserr("Cannot bind to domain %s: %s", map->map_domain,
+ syserr("421 Cannot bind to domain %s: %s", map->map_domain,
yperr_string(yperr));
return FALSE;
yperr_string(yperr));
return FALSE;
default: /* all other nisplus errors */
#if 0
if (!bitset(MF_OPTIONAL, map->map_mflags))
default: /* all other nisplus errors */
#if 0
if (!bitset(MF_OPTIONAL, map->map_mflags))
- syserr("Cannot find table %s.%s: %s",
+ syserr("421 Cannot find table %s.%s: %s",
map->map_file, map->map_domain,
nis_sperrno(res->status));
#endif
map->map_file, map->map_domain,
nis_sperrno(res->status));
#endif
printf("nisplus_map_open: %s is not a table\n", qbuf);
#if 0
if (!bitset(MF_OPTIONAL, map->map_mflags))
printf("nisplus_map_open: %s is not a table\n", qbuf);
#if 0
if (!bitset(MF_OPTIONAL, map->map_mflags))
- syserr("%s.%s: %s is not a table",
+ syserr("421 %s.%s: %s is not a table",
map->map_file, map->map_domain,
nis_sperrno(res->status));
#endif
map->map_file, map->map_domain,
nis_sperrno(res->status));
#endif
+
+
+/*
+** BOGUS stubs
+*/
+
+char *
+bogus_map_lookup(map, key, args, pstat)
+ MAP *map;
+ char *key;
+ char **args;
+ int *pstat;
+{
+ *pstat = EX_TEMPFAIL;
+ return NULL;
+}
+
+MAPCLASS BogusMapClass =
+{
+ "bogus-map", NULL, 0,
+ NULL, bogus_map_lookup, null_map_store,
+ null_map_open, null_map_close,
+};