SCCS-vsn: usr.sbin/sendmail/src/map.c 8.20
-static char sccsid[] = "@(#)map.c 8.19 (Berkeley) %G%";
+static char sccsid[] = "@(#)map.c 8.20 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
checkfd012("entering initmaps");
#endif
CurEnv = e;
checkfd012("entering initmaps");
#endif
CurEnv = e;
- stabapply(map_init, rebuild);
+ if (rebuild)
+ {
+ stabapply(map_init, 1);
+ stabapply(map_init, 2);
+ }
+ else
+ {
+ stabapply(map_init, 0);
+ }
#ifdef XDEBUG
checkfd012("exiting initmaps");
#endif
#ifdef XDEBUG
checkfd012("exiting initmaps");
#endif
- printf("map_init(%s:%s)\n",
+ printf("map_init(%s:%s, %d)\n",
map->map_class->map_cname == NULL ? "NULL" :
map->map_class->map_cname,
map->map_class->map_cname == NULL ? "NULL" :
map->map_class->map_cname,
- map->map_file == NULL ? "NULL" : map->map_file);
+ map->map_file == NULL ? "NULL" : map->map_file,
+ rebuild);
+
+ if (rebuild == (bitset(MF_ALIAS, map->map_mflags) &&
+ bitset(MCF_REBUILDABLE, map->map_class->map_cflags) ? 1 : 2))
+ {
+ if (tTd(38, 3))
+ printf("\twrong pass\n");
+ return;
+ }
/* if already open, close it (for nested open) */
if (bitset(MF_OPEN, map->map_mflags))
/* if already open, close it (for nested open) */
if (bitset(MF_OPEN, map->map_mflags))
map->map_mflags &= ~(MF_OPEN|MF_WRITABLE);
}
map->map_mflags &= ~(MF_OPEN|MF_WRITABLE);
}
- if (bitset(MF_ALIAS, map->map_mflags) &&
- bitset(MCF_REBUILDABLE, map->map_class->map_cflags))
- rebuildaliases(map, FALSE);
+ rebuildaliases(map, FALSE);
}
else
{
if (map->map_class->map_open(map, O_RDONLY))
{
if (tTd(38, 4))
}
else
{
if (map->map_class->map_open(map, O_RDONLY))
{
if (tTd(38, 4))
- printf("%s:%s: valid\n",
+ printf("\t%s:%s: valid\n",
map->map_class->map_cname == NULL ? "NULL" :
map->map_class->map_cname,
map->map_file == NULL ? "NULL" :
map->map_class->map_cname == NULL ? "NULL" :
map->map_class->map_cname,
map->map_file == NULL ? "NULL" :
map->map_mflags |= MF_OPEN;
}
else if (tTd(38, 4))
map->map_mflags |= MF_OPEN;
}
else if (tTd(38, 4))
- printf("%s:%s: invalid: %s\n",
+ printf("\t%s:%s: invalid: %s\n",
map->map_class->map_cname == NULL ? "NULL" :
map->map_class->map_cname,
map->map_file == NULL ? "NULL" :
map->map_class->map_cname == NULL ? "NULL" :
map->map_class->map_cname,
map->map_file == NULL ? "NULL" :