Deleted Added
full compact
conf.c (223067) conf.c (244833)
1/*
1/*
2 * Copyright (c) 1998-2010 Sendmail, Inc. and its suppliers.
2 * Copyright (c) 1998-2012 Sendmail, Inc. and its suppliers.
3 * All rights reserved.
4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
5 * Copyright (c) 1988, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * By using this file, you agree to the terms and conditions set
9 * forth in the LICENSE file which can be found at the top level of
10 * the sendmail distribution.
11 *
12 */
13
14#include <sendmail.h>
15
3 * All rights reserved.
4 * Copyright (c) 1983, 1995-1997 Eric P. Allman. All rights reserved.
5 * Copyright (c) 1988, 1993
6 * The Regents of the University of California. All rights reserved.
7 *
8 * By using this file, you agree to the terms and conditions set
9 * forth in the LICENSE file which can be found at the top level of
10 * the sendmail distribution.
11 *
12 */
13
14#include <sendmail.h>
15
16SM_RCSID("@(#)$Id: conf.c,v 8.1168 2011/01/25 18:31:30 ca Exp $")
16SM_RCSID("@(#)$Id: conf.c,v 8.1176 2012/12/07 03:59:54 ca Exp $")
17
18#include <sm/sendmail.h>
19#include <sendmail/pathnames.h>
20#if NEWDB
21# include "sm/bdb.h"
22#endif /* NEWDB */
23
24#include <daemon.h>

--- 23 unchanged lines hidden (view full) ---

48static void setupqueues __P((void));
49static int get_num_procs_online __P((void));
50static int add_hostnames __P((SOCKADDR *));
51
52#if NETINET6 && NEEDSGETIPNODE
53static struct hostent *sm_getipnodebyname __P((const char *, int, int, int *));
54static struct hostent *sm_getipnodebyaddr __P((const void *, size_t, int, int *));
55#else /* NETINET6 && NEEDSGETIPNODE */
17
18#include <sm/sendmail.h>
19#include <sendmail/pathnames.h>
20#if NEWDB
21# include "sm/bdb.h"
22#endif /* NEWDB */
23
24#include <daemon.h>

--- 23 unchanged lines hidden (view full) ---

48static void setupqueues __P((void));
49static int get_num_procs_online __P((void));
50static int add_hostnames __P((SOCKADDR *));
51
52#if NETINET6 && NEEDSGETIPNODE
53static struct hostent *sm_getipnodebyname __P((const char *, int, int, int *));
54static struct hostent *sm_getipnodebyaddr __P((const void *, size_t, int, int *));
55#else /* NETINET6 && NEEDSGETIPNODE */
56#define sm_getipnodebyname getipnodebyname
56#define sm_getipnodebyname getipnodebyname
57#define sm_getipnodebyaddr getipnodebyaddr
58#endif /* NETINET6 && NEEDSGETIPNODE */
59
60
61/*
62** CONF.C -- Sendmail Configuration Tables.
63**
64** Defines the configuration of this installation.

--- 4532 unchanged lines hidden (view full) ---

4597 return -1;
4598 }
4599
4600 if (hp == NULL)
4601 {
4602 int save_errno = errno;
4603
4604 if (LogLevel > 3 &&
57#define sm_getipnodebyaddr getipnodebyaddr
58#endif /* NETINET6 && NEEDSGETIPNODE */
59
60
61/*
62** CONF.C -- Sendmail Configuration Tables.
63**
64** Defines the configuration of this installation.

--- 4532 unchanged lines hidden (view full) ---

4597 return -1;
4598 }
4599
4600 if (hp == NULL)
4601 {
4602 int save_errno = errno;
4603
4604 if (LogLevel > 3 &&
4605#if NETINET && defined(IN_LINKLOCAL)
4606 !(sa->sa.sa_family == AF_INET &&
4607 IN_LINKLOCAL(ntohl(sa->sin.sin_addr.s_addr))) &&
4608#endif /* NETINET && defined(IN_LINKLOCAL) */
4605#if NETINET6
4606 !(sa->sa.sa_family == AF_INET6 &&
4607 IN6_IS_ADDR_LINKLOCAL(&sa->sin6.sin6_addr)) &&
4608#endif /* NETINET6 */
4609 true)
4610 sm_syslog(LOG_WARNING, NOQID,
4611 "gethostbyaddr(%.100s) failed: %d",
4612 anynet_ntoa(sa),

--- 756 unchanged lines hidden (view full) ---

5369
5370 /* clean up buf after it has been expanded with args */
5371 newstring = str2prt(buf);
5372 if ((strlen(newstring) + idlen + 1) < SYSLOG_BUFSIZE)
5373 {
5374#if LOG
5375 if (*id == '\0')
5376 {
4609#if NETINET6
4610 !(sa->sa.sa_family == AF_INET6 &&
4611 IN6_IS_ADDR_LINKLOCAL(&sa->sin6.sin6_addr)) &&
4612#endif /* NETINET6 */
4613 true)
4614 sm_syslog(LOG_WARNING, NOQID,
4615 "gethostbyaddr(%.100s) failed: %d",
4616 anynet_ntoa(sa),

--- 756 unchanged lines hidden (view full) ---

5373
5374 /* clean up buf after it has been expanded with args */
5375 newstring = str2prt(buf);
5376 if ((strlen(newstring) + idlen + 1) < SYSLOG_BUFSIZE)
5377 {
5378#if LOG
5379 if (*id == '\0')
5380 {
5377 if (tTd(89, 8))
5381 if (tTd(89, 10))
5382 {
5383 struct timeval tv;
5384
5385 gettimeofday(&tv, NULL);
5386 sm_dprintf("%ld.%06ld %s\n", (long) tv.tv_sec,
5387 (long) tv.tv_usec, newstring);
5388 }
5389 else if (tTd(89, 8))
5378 sm_dprintf("%s\n", newstring);
5379 else
5380 syslog(level, "%s", newstring);
5381 }
5382 else
5383 {
5390 sm_dprintf("%s\n", newstring);
5391 else
5392 syslog(level, "%s", newstring);
5393 }
5394 else
5395 {
5384 if (tTd(89, 8))
5396 if (tTd(89, 10))
5397 {
5398 struct timeval tv;
5399
5400 gettimeofday(&tv, NULL);
5401 sm_dprintf("%ld.%06ld %s: %s\n", (long) tv.tv_sec,
5402 (long) tv.tv_usec, id, newstring);
5403 }
5404 else if (tTd(89, 8))
5385 sm_dprintf("%s: %s\n", id, newstring);
5386 else
5387 syslog(level, "%s: %s", id, newstring);
5388 }
5389#else /* LOG */
5390 /*XXX should do something more sensible */
5391 if (*id == '\0')
5392 (void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT, "%s\n",

--- 1052 unchanged lines hidden ---
5405 sm_dprintf("%s: %s\n", id, newstring);
5406 else
5407 syslog(level, "%s: %s", id, newstring);
5408 }
5409#else /* LOG */
5410 /*XXX should do something more sensible */
5411 if (*id == '\0')
5412 (void) sm_io_fprintf(smioerr, SM_TIME_DEFAULT, "%s\n",

--- 1052 unchanged lines hidden ---