diff options
author | gshapiro <gshapiro@FreeBSD.org> | 2002-06-11 21:12:04 +0000 |
---|---|---|
committer | gshapiro <gshapiro@FreeBSD.org> | 2002-06-11 21:12:04 +0000 |
commit | faacdfb2c2946459651449cedf08a1bc29aee731 (patch) | |
tree | 546131e3b171104de8ab1498603b992a6971ec6a /contrib/sendmail/src/alias.c | |
parent | e226f8e879ed5a8d2f5cc433067b698e07dce0b6 (diff) | |
download | FreeBSD-src-faacdfb2c2946459651449cedf08a1bc29aee731.zip FreeBSD-src-faacdfb2c2946459651449cedf08a1bc29aee731.tar.gz |
Import sendmail 8.12.4
Diffstat (limited to 'contrib/sendmail/src/alias.c')
-rw-r--r-- | contrib/sendmail/src/alias.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/contrib/sendmail/src/alias.c b/contrib/sendmail/src/alias.c index 4d43908..f5bd746 100644 --- a/contrib/sendmail/src/alias.c +++ b/contrib/sendmail/src/alias.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. + * Copyright (c) 1998-2002 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> -SM_RCSID("@(#)$Id: alias.c,v 1.1.1.7 2002/02/17 21:56:38 gshapiro Exp $") +SM_RCSID("@(#)$Id: alias.c,v 8.214 2002/05/24 20:50:16 gshapiro Exp $") #define SEPARATOR ':' # define ALIAS_SPEC_SEPARATORS " ,/:" @@ -393,7 +393,7 @@ aliaswait(map, ext, isopen) bool attimeout = false; time_t mtime; struct stat stb; - char buf[MAXNAME + 1]; + char buf[MAXPATHLEN]; if (tTd(27, 3)) sm_dprintf("aliaswait(%s:%s)\n", @@ -458,8 +458,17 @@ aliaswait(map, ext, isopen) return isopen; } mtime = stb.st_mtime; - (void) sm_strlcpyn(buf, sizeof buf, 2, - map->map_file, ext == NULL ? "" : ext); + if (sm_strlcpyn(buf, sizeof buf, 2, + map->map_file, ext == NULL ? "" : ext) >= sizeof buf) + { + if (LogLevel > 3) + sm_syslog(LOG_INFO, NOQID, + "alias database %s%s name too long", + map->map_file, ext == NULL ? "" : ext); + message("alias database %s%s name too long", + map->map_file, ext == NULL ? "" : ext); + } + if (stat(buf, &stb) < 0 || stb.st_mtime < mtime || attimeout) { if (LogLevel > 3) @@ -913,7 +922,7 @@ forward(user, sendq, aliaslevel, e) for (pp = ForwardPath; pp != NULL; pp = ep) { int err; - char buf[MAXPATHLEN + 1]; + char buf[MAXPATHLEN]; struct stat st; ep = strchr(pp, SEPARATOR); |