summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/vacation
diff options
context:
space:
mode:
authorgshapiro <gshapiro@FreeBSD.org>2005-02-14 02:30:00 +0000
committergshapiro <gshapiro@FreeBSD.org>2005-02-14 02:30:00 +0000
commit9883351c45502bc6aec878ba11d8ef5fe1843397 (patch)
treed9cfa9f19110fa167a0fec9f07c6fcfacd77aafb /contrib/sendmail/vacation
parent1fc446a819a244515d9461fa50d34ee191414d6f (diff)
downloadFreeBSD-src-9883351c45502bc6aec878ba11d8ef5fe1843397.zip
FreeBSD-src-9883351c45502bc6aec878ba11d8ef5fe1843397.tar.gz
Import sendmail 8.13.3
Diffstat (limited to 'contrib/sendmail/vacation')
-rw-r--r--contrib/sendmail/vacation/vacation.c32
1 files changed, 22 insertions, 10 deletions
diff --git a/contrib/sendmail/vacation/vacation.c b/contrib/sendmail/vacation/vacation.c
index 45aeba1..afccbf7 100644
--- a/contrib/sendmail/vacation/vacation.c
+++ b/contrib/sendmail/vacation/vacation.c
@@ -20,7 +20,7 @@ SM_IDSTR(copyright,
The Regents of the University of California. All rights reserved.\n\
Copyright (c) 1983 Eric P. Allman. All rights reserved.\n")
-SM_IDSTR(id, "@(#)$Id: vacation.c,v 8.141 2002/11/01 16:49:40 ca Exp $")
+SM_IDSTR(id, "@(#)$Id: vacation.c,v 8.142 2004/11/02 18:25:33 ca Exp $")
#include <ctype.h>
@@ -78,6 +78,7 @@ ALIAS *Names = NULL;
SMDB_DATABASE *Db;
char From[MAXLINE];
+bool CloseMBDB = false;
#if defined(__hpux) || defined(__osf__)
# ifndef SM_CONF_SYSLOG_INT
@@ -100,17 +101,27 @@ static void eatmsg __P((void));
static void listdb __P((void));
/* exit after reading input */
-#define EXITIT(excode) \
-{ \
- eatmsg(); \
- return excode; \
+#define EXITIT(excode) \
+{ \
+ eatmsg(); \
+ if (CloseMBDB) \
+ { \
+ sm_mbdb_terminate(); \
+ CloseMBDB = false; \
+ } \
+ return excode; \
}
-#define EXITM(excode) \
-{ \
- if (!initdb && !list) \
- eatmsg(); \
- exit(excode); \
+#define EXITM(excode) \
+{ \
+ if (!initdb && !list) \
+ eatmsg(); \
+ if (CloseMBDB) \
+ { \
+ sm_mbdb_terminate(); \
+ CloseMBDB = false; \
+ } \
+ exit(excode); \
}
int
@@ -330,6 +341,7 @@ main(argc, argv)
sm_strexit(err));
EXITM(err);
}
+ CloseMBDB = true;
err = sm_mbdb_lookup(*argv, &user);
if (err == EX_NOUSER)
{
OpenPOWER on IntegriCloud