summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/src/alias.c
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2001-05-28 17:08:52 +0000
committergshapiro <gshapiro@FreeBSD.org>2001-05-28 17:08:52 +0000
commit5338b6ff5f88e435da457fd0ec979a333012a0ef (patch)
treea5a76aa374529c5644a8991fe62c81f6b9b89964 /contrib/sendmail/src/alias.c
parent8d82727087db5182be90a20f20175cc720c5d1e5 (diff)
downloadFreeBSD-src-5338b6ff5f88e435da457fd0ec979a333012a0ef.zip
FreeBSD-src-5338b6ff5f88e435da457fd0ec979a333012a0ef.tar.gz
Import sendmail 8.11.4
Diffstat (limited to 'contrib/sendmail/src/alias.c')
-rw-r--r--contrib/sendmail/src/alias.c19
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;
OpenPOWER on IntegriCloud