diff options
Diffstat (limited to 'contrib/sendmail/src/alias.c')
-rw-r--r-- | contrib/sendmail/src/alias.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/contrib/sendmail/src/alias.c b/contrib/sendmail/src/alias.c index 4c6a174..070da59 100644 --- a/contrib/sendmail/src/alias.c +++ b/contrib/sendmail/src/alias.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. * All rights reserved. * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved. * Copyright (c) 1988, 1993 @@ -13,7 +13,7 @@ #include <sendmail.h> #ifndef lint -static char id[] = "@(#)$Id: alias.c,v 8.142.4.9 2000/11/08 20:58:42 geir Exp $"; +static char id[] = "@(#)$Id: alias.c,v 8.142.4.11 2001/05/03 17:24:01 gshapiro Exp $"; #endif /* ! lint */ # define SEPARATOR ':' @@ -405,8 +405,9 @@ aliaswait(map, ext, isopen) dprintf("aliaswait: sleeping for %u seconds\n", sleeptime); + map->map_mflags |= MF_CLOSING; map->map_class->map_close(map); - map->map_mflags &= ~(MF_OPEN|MF_WRITABLE); + map->map_mflags &= ~(MF_OPEN|MF_WRITABLE|MF_CLOSING); (void) sleep(sleeptime); sleeptime *= 2; if (sleeptime > 60) @@ -449,8 +450,9 @@ aliaswait(map, ext, isopen) SuprErrs = TRUE; if (isopen) { + map->map_mflags |= MF_CLOSING; map->map_class->map_close(map); - map->map_mflags &= ~(MF_OPEN|MF_WRITABLE); + map->map_mflags &= ~(MF_OPEN|MF_WRITABLE|MF_CLOSING); } (void) rebuildaliases(map, TRUE); isopen = map->map_class->map_open(map, O_RDONLY); @@ -595,8 +597,9 @@ rebuildaliases(map, automatic) /* add distinguished entries and close the database */ if (bitset(MF_OPEN, map->map_mflags)) { + map->map_mflags |= MF_CLOSING; map->map_class->map_close(map); - map->map_mflags &= ~(MF_OPEN|MF_WRITABLE); + map->map_mflags &= ~(MF_OPEN|MF_WRITABLE|MF_CLOSING); } /* restore the old signals */ @@ -827,11 +830,11 @@ readaliases(map, af, announcestats, logstats) } if (al.q_paddr != NULL) - free(al.q_paddr); + sm_free(al.q_paddr); if (al.q_host != NULL) - free(al.q_host); + sm_free(al.q_host); if (al.q_user != NULL) - free(al.q_user); + sm_free(al.q_user); } CurEnv->e_to = NULL; |