summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
118dcfc)
SCCS-vsn: usr.sbin/sendmail/src/alias.c 8.13
# include <pwd.h>
#ifndef lint
# include <pwd.h>
#ifndef lint
-static char sccsid[] = "@(#)alias.c 8.12 (Berkeley) %G%";
+static char sccsid[] = "@(#)alias.c 8.13 (Berkeley) %G%";
if (!bitset(MCF_REBUILDABLE, map->map_class->map_cflags))
return;
if (!bitset(MCF_REBUILDABLE, map->map_class->map_cflags))
return;
-#ifdef LOG
- if (LogLevel > 7)
- {
- syslog(LOG_NOTICE, "alias database %s %srebuilt by %s",
- map->map_file, automatic ? "auto" : "", username());
- }
-#endif /* LOG */
-
/* try to lock the source file */
if ((af = fopen(map->map_file, "r+")) == NULL)
{
/* try to lock the source file */
if ((af = fopen(map->map_file, "r+")) == NULL)
{
if (tTd(27, 1))
printf("Can't open %s: %s\n",
if (tTd(27, 1))
printf("Can't open %s: %s\n",
- map->map_file, errstring(errno));
+ map->map_file, errstring(saveerr));
+ if (!automatic)
+ message("newaliases: cannot open %s: %s",
+ map->map_file, errstring(saveerr));
if (map->map_class->map_open(map, O_RDWR))
{
if (map->map_class->map_open(map, O_RDWR))
{
+#ifdef LOG
+ if (LogLevel > 7)
+ {
+ syslog(LOG_NOTICE, "alias database %s %srebuilt by %s",
+ map->map_file, automatic ? "auto" : "",
+ username());
+ }
+#endif /* LOG */
map->map_mflags |= MF_OPEN|MF_WRITABLE;
readaliases(map, af, automatic);
}
map->map_mflags |= MF_OPEN|MF_WRITABLE;
readaliases(map, af, automatic);
}