be tweaked
SCCS-vsn: usr.sbin/sendmail/src/recipient.c 8.76
SCCS-vsn: usr.sbin/sendmail/src/main.c 8.94
SCCS-vsn: usr.sbin/sendmail/src/envelope.c 8.57
SCCS-vsn: usr.sbin/sendmail/src/conf.h 8.143
SCCS-vsn: usr.sbin/sendmail/src/domain.c 8.34
SCCS-vsn: usr.sbin/sendmail/src/err.c 8.32
SCCS-vsn: usr.sbin/sendmail/src/sendmail.h 8.110
SCCS-vsn: usr.sbin/sendmail/src/savemail.c 8.62
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 8.76
SCCS-vsn: usr.sbin/sendmail/src/util.c 8.59
SCCS-vsn: usr.sbin/sendmail/src/readcf.c 8.77
SCCS-vsn: usr.sbin/sendmail/src/deliver.c 8.140
SCCS-vsn: usr.sbin/sendmail/src/queue.c 8.75
SCCS-vsn: usr.sbin/sendmail/src/conf.c 8.143
SCCS-vsn: usr.sbin/sendmail/src/alias.c 8.41
SCCS-vsn: usr.sbin/sendmail/src/udb.c 8.17
SCCS-vsn: usr.sbin/sendmail/src/map.c 8.51
17 files changed:
*/
# include "sendmail.h"
*/
# include "sendmail.h"
-static char sccsid[] = "@(#)alias.c 8.40 (Berkeley) %G%";
+static char sccsid[] = "@(#)alias.c 8.41 (Berkeley) %G%";
-static char sccsid[] = "@(#)conf.c 8.142 (Berkeley) %G%";
+static char sccsid[] = "@(#)conf.c 8.143 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
# include "pathnames.h"
# include <sys/ioctl.h>
# include <sys/param.h>
#endif /* not lint */
# include "sendmail.h"
# include "pathnames.h"
# include <sys/ioctl.h>
# include <sys/param.h>
-# include <netdb.h>
-# include <pwd.h>
/*
** CONF.C -- Sendmail Configuration Tables.
/*
** CONF.C -- Sendmail Configuration Tables.
static char defuserbuf[40];
DefUser = defuserbuf;
static char defuserbuf[40];
DefUser = defuserbuf;
- if ((defpwent = getpwuid(DefUid)) != NULL)
+ if ((defpwent = sm_getpwuid(DefUid)) != NULL)
strcpy(defuserbuf, defpwent->pw_name);
else
strcpy(defuserbuf, "nobody");
strcpy(defuserbuf, defpwent->pw_name);
else
strcpy(defuserbuf, "nobody");
myname = getlogin();
if (myname == NULL || myname[0] == '\0')
{
myname = getlogin();
if (myname == NULL || myname[0] == '\0')
{
- pw = getpwuid(RealUid);
+ pw = sm_getpwuid(RealUid);
if (pw != NULL)
myname = newstr(pw->pw_name);
}
if (pw != NULL)
myname = newstr(pw->pw_name);
}
uid_t uid = RealUid;
myname = newstr(myname);
uid_t uid = RealUid;
myname = newstr(myname);
- if ((pw = getpwnam(myname)) == NULL ||
+ if ((pw = sm_getpwnam(myname)) == NULL ||
(uid != 0 && uid != pw->pw_uid))
{
(uid != 0 && uid != pw->pw_uid))
{
if (pw != NULL)
myname = newstr(pw->pw_name);
}
if (pw != NULL)
myname = newstr(pw->pw_name);
}
-** SOLARIS_GETHOSTBY{NAME,ADDR} -- compatibility routines for gethostbyXXX
+** SM_GETHOSTBY{NAME,ADDR} -- compatibility routines for gethostbyXXX
-** Solaris versions at least through 2.3 don't properly deliver a
-** canonical h_name field. This tries to work around it.
+** Some operating systems have wierd problems with the gethostbyXXX
+** routines. For example, Solaris versions at least through 2.3
+** don't properly deliver a canonical h_name field. This tries to
+** work around these problems.
-#if defined(SOLARIS) && SOLARIS < 204
-
-extern int h_errno;
-
extern int h_errno;
struct hostent *
extern int h_errno;
struct hostent *
-solaris_gethostbyname(name)
+#if defined(SOLARIS) && SOLARIS < 204
+ extern int h_errno;
+
# if SOLARIS == 203
static struct hostent hp;
static char buf[1000];
# if SOLARIS == 203
static struct hostent hp;
static char buf[1000];
return __switch_gethostbyname(name);
# endif
return __switch_gethostbyname(name);
# endif
+#else
+ return gethostbyname(name);
+#endif
-solaris_gethostbyaddr(addr, len, type)
+sm_gethostbyaddr(addr, len, type)
const char *addr;
int len;
int type;
{
const char *addr;
int len;
int type;
{
+#if defined(SOLARIS) && SOLARIS < 204
+ extern int h_errno;
+
# if SOLARIS == 203
static struct hostent hp;
static char buf[1000];
# if SOLARIS == 203
static struct hostent hp;
static char buf[1000];
return __switch_gethostbyaddr(addr, len, type);
# endif
return __switch_gethostbyaddr(addr, len, type);
# endif
+#else
+ return gethostbyaddr(addr, len, type);
+#endif
+\f/*
+** SM_GETPW{NAM,UID} -- wrapper for getpwnam and getpwuid
+*/
+struct passwd *
+sm_getpwnam(user)
+ const char *user;
+{
+ extern struct passwd *getpwnam();
+
+ return getpwnam(user);
+}
+
+struct passwd *
+sm_getpwuid(uid)
+ uid_t uid;
+{
+ extern struct passwd *getpwuid();
+
+ return getpwuid(uid);
+}
\f/*
** NI_PROPVAL -- netinfo property value lookup routine
**
\f/*
** NI_PROPVAL -- netinfo property value lookup routine
**
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)conf.h 8.142 (Berkeley) %G%
+ * @(#)conf.h 8.143 (Berkeley) %G%
# include <sys/wait.h>
# include <fcntl.h>
# include <signal.h>
# include <sys/wait.h>
# include <fcntl.h>
# include <signal.h>
+# include <netdb.h>
+# include <pwd.h>
/**********************************************************************
** Table sizes, etc....
/**********************************************************************
** Table sizes, etc....
#ifndef lint
#ifdef DAEMON
#ifndef lint
#ifdef DAEMON
-static char sccsid[] = "@(#)daemon.c 8.48.1.5 (Berkeley) %G% (with daemon mode)";
+static char sccsid[] = "@(#)daemon.c 8.76 (Berkeley) %G% (with daemon mode)";
-static char sccsid[] = "@(#)daemon.c 8.48.1.5 (Berkeley) %G% (without daemon mode)";
+static char sccsid[] = "@(#)daemon.c 8.76 (Berkeley) %G% (without daemon mode)";
#endif
#endif /* not lint */
#ifdef DAEMON
#endif
#endif /* not lint */
#ifdef DAEMON
# include <arpa/inet.h>
#if NAMED_BIND
# include <arpa/inet.h>
#if NAMED_BIND
#endif
{
/* try it as a host name (avoid MX lookup) */
#endif
{
/* try it as a host name (avoid MX lookup) */
- hp = gethostbyname(&host[1]);
+ hp = sm_gethostbyname(&host[1]);
if (hp == NULL && p[-1] == '.')
{
#if NAMED_BIND
if (hp == NULL && p[-1] == '.')
{
#if NAMED_BIND
_res.options &= ~(RES_DEFNAMES|RES_DNSRCH);
#endif
p[-1] = '\0';
_res.options &= ~(RES_DEFNAMES|RES_DNSRCH);
#endif
p[-1] = '\0';
- hp = gethostbyname(&host[1]);
+ hp = sm_gethostbyname(&host[1]);
p[-1] = '.';
#if NAMED_BIND
_res.options = oldopts;
p[-1] = '.';
#if NAMED_BIND
_res.options = oldopts;
{
register char *p = &host[strlen(host) - 1];
{
register char *p = &host[strlen(host) - 1];
- hp = gethostbyname(host);
+ hp = sm_gethostbyname(host);
if (hp == NULL && *p == '.')
{
#if NAMED_BIND
if (hp == NULL && *p == '.')
{
#if NAMED_BIND
_res.options &= ~(RES_DEFNAMES|RES_DNSRCH);
#endif
*p = '\0';
_res.options &= ~(RES_DEFNAMES|RES_DNSRCH);
#endif
*p = '\0';
- hp = gethostbyname(host);
+ hp = sm_gethostbyname(host);
*p = '.';
#if NAMED_BIND
_res.options = oldopts;
*p = '.';
#if NAMED_BIND
_res.options = oldopts;
int size;
{
register struct hostent *hp;
int size;
{
register struct hostent *hp;
- extern struct hostent *gethostbyname();
extern bool getcanonname();
extern int h_errno;
extern bool getcanonname();
extern int h_errno;
{
(void) strcpy(hostbuf, "localhost");
}
{
(void) strcpy(hostbuf, "localhost");
}
- hp = gethostbyname(hostbuf);
+ hp = sm_gethostbyname(hostbuf);
if (hp == NULL)
return NULL;
if (strchr(hp->h_name, '.') != NULL || strchr(hostbuf, '.') == NULL)
if (hp == NULL)
return NULL;
if (strchr(hp->h_name, '.') != NULL || strchr(hostbuf, '.') == NULL)
char *cp;
register STAB *s;
char hbuf[MAXNAME + 1];
char *cp;
register STAB *s;
char hbuf[MAXNAME + 1];
- extern struct hostent *gethostbyaddr();
#if NAMED_BIND
extern int h_errno;
#endif
#if NAMED_BIND
extern int h_errno;
#endif
** Try to look it up in /etc/hosts
*/
** Try to look it up in /etc/hosts
*/
- hp = gethostbyname(name);
+ hp = sm_gethostbyname(name);
if (hp == NULL)
{
/* no dice there either */
if (hp == NULL)
{
/* no dice there either */
in_addr.s_addr = inet_addr(&name[1]);
/* nope -- ask the name server */
in_addr.s_addr = inet_addr(&name[1]);
/* nope -- ask the name server */
- hp = gethostbyaddr((char *)&in_addr, INADDRSZ, AF_INET);
+ hp = sm_gethostbyaddr((char *)&in_addr, INADDRSZ, AF_INET);
s->s_namecanon.nc_errno = errno;
#if NAMED_BIND
s->s_namecanon.nc_herrno = h_errno;
s->s_namecanon.nc_errno = errno;
#if NAMED_BIND
s->s_namecanon.nc_herrno = h_errno;
{
#ifdef NETINET
case AF_INET:
{
#ifdef NETINET
case AF_INET:
- hp = gethostbyaddr((char *) &sap->sin.sin_addr,
+ hp = sm_gethostbyaddr((char *) &sap->sin.sin_addr,
INADDRSZ,
AF_INET);
break;
INADDRSZ,
AF_INET);
break;
#ifdef NETISO
case AF_ISO:
#ifdef NETISO
case AF_ISO:
- hp = gethostbyaddr((char *) &sap->siso.siso_addr,
+ hp = sm_gethostbyaddr((char *) &sap->siso.siso_addr,
sizeof sap->siso.siso_addr,
AF_ISO);
break;
sizeof sap->siso.siso_addr,
AF_ISO);
break;
- hp = gethostbyaddr(sap->sa.sa_data,
+ hp = sm_gethostbyaddr(sap->sa.sa_data,
sizeof sap->sa.sa_data,
sap->sa.sa_family);
break;
sizeof sap->sa.sa_data,
sap->sa.sa_family);
break;
{
register struct hostent *hp;
{
register struct hostent *hp;
- hp = gethostbyname(name);
+ hp = sm_gethostbyname(name);
if (hp != NULL)
return hp->h_name;
*statp = EX_NOHOST;
if (hp != NULL)
return hp->h_name;
*statp = EX_NOHOST;
-static char sccsid[] = "@(#)deliver.c 8.139 (Berkeley) %G%";
+static char sccsid[] = "@(#)deliver.c 8.140 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
#include <errno.h>
#if NAMED_BIND
#include <resolv.h>
#include <errno.h>
#if NAMED_BIND
#include <resolv.h>
#ifndef lint
#if NAMED_BIND
#ifndef lint
#if NAMED_BIND
-static char sccsid[] = "@(#)domain.c 8.33 (Berkeley) %G% (with name server)";
+static char sccsid[] = "@(#)domain.c 8.34 (Berkeley) %G% (with name server)";
-static char sccsid[] = "@(#)domain.c 8.33 (Berkeley) %G% (without name server)";
+static char sccsid[] = "@(#)domain.c 8.34 (Berkeley) %G% (without name server)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
#include <errno.h>
#include <resolv.h>
#include <errno.h>
#include <resolv.h>
- (!TryNullMXList || gethostbyname(host) == NULL))
+ (!TryNullMXList || sm_gethostbyname(host) == NULL))
{
/*
** If we have deleted all MX entries, this is
{
/*
** If we have deleted all MX entries, this is
struct hostent *hp;
char *p;
struct hostent *hp;
char *p;
- hp = gethostbyname(host);
+ hp = sm_gethostbyname(host);
if (hp == NULL)
return (FALSE);
p = hp->h_name;
if (hp == NULL)
return (FALSE);
p = hp->h_name;
-static char sccsid[] = "@(#)envelope.c 8.56 (Berkeley) %G%";
+static char sccsid[] = "@(#)envelope.c 8.57 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
/*
** NEWENVELOPE -- allocate a new envelope
/*
** NEWENVELOPE -- allocate a new envelope
char *bp;
char buf[MAXNAME + 2];
char pvpbuf[PSBUFSIZE];
char *bp;
char buf[MAXNAME + 2];
char pvpbuf[PSBUFSIZE];
- extern struct passwd *getpwnam();
extern char *FullName;
if (tTd(45, 1))
extern char *FullName;
if (tTd(45, 1))
- if ((pw = getpwnam(e->e_from.q_user)) != NULL)
+ if ((pw = sm_getpwnam(e->e_from.q_user)) != NULL)
{
/*
** Process passwd file entry.
{
/*
** Process passwd file entry.
-static char sccsid[] = "@(#)err.c 8.31 (Berkeley) %G%";
+static char sccsid[] = "@(#)err.c 8.32 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
# include <errno.h>
#endif /* not lint */
# include "sendmail.h"
# include <errno.h>
-# include <netdb.h>
-# include <pwd.h>
/*
** SYSERR -- Print error message.
/*
** SYSERR -- Print error message.
- pw = getpwuid(getuid());
+ pw = sm_getpwuid(getuid());
if (pw != NULL)
uname = pw->pw_name;
else
if (pw != NULL)
uname = pw->pw_name;
else
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 8.93 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 8.94 (Berkeley) %G%";
#endif /* not lint */
#define _DEFINE
#include "sendmail.h"
#endif /* not lint */
#define _DEFINE
#include "sendmail.h"
#if NAMED_BIND
#include <resolv.h>
#endif
#if NAMED_BIND
#include <resolv.h>
#endif
# ifdef lint
char edata, end;
# ifdef lint
char edata, end;
RealUid = getuid();
RealGid = getgid();
RealUid = getuid();
RealGid = getgid();
- pw = getpwuid(RealUid);
+ pw = sm_getpwuid(RealUid);
if (pw != NULL)
(void) strcpy(RealUserName, pw->pw_name);
else
if (pw != NULL)
(void) strcpy(RealUserName, pw->pw_name);
else
-static char sccsid[] = "@(#)map.c 8.50 (Berkeley) %G%";
+static char sccsid[] = "@(#)map.c 8.51 (Berkeley) %G%";
#endif /* not lint */
#include "sendmail.h"
#endif /* not lint */
#include "sendmail.h"
** USER_MAP_LOOKUP -- look up a user in the passwd file.
*/
** USER_MAP_LOOKUP -- look up a user in the passwd file.
*/
char *
user_map_lookup(map, key, av, statp)
MAP *map;
char *
user_map_lookup(map, key, av, statp)
MAP *map;
printf("user_map_lookup(%s, %s)\n",
map->map_mname, key);
printf("user_map_lookup(%s, %s)\n",
map->map_mname, key);
if (pw == NULL)
return NULL;
if (bitset(MF_MATCHONLY, map->map_mflags))
if (pw == NULL)
return NULL;
if (bitset(MF_MATCHONLY, map->map_mflags))
#ifndef lint
#ifdef QUEUE
#ifndef lint
#ifdef QUEUE
-static char sccsid[] = "@(#)queue.c 8.74 (Berkeley) %G% (with queueing)";
+static char sccsid[] = "@(#)queue.c 8.75 (Berkeley) %G% (with queueing)";
-static char sccsid[] = "@(#)queue.c 8.74 (Berkeley) %G% (without queueing)";
+static char sccsid[] = "@(#)queue.c 8.75 (Berkeley) %G% (without queueing)";
#endif
#endif /* not lint */
# include <errno.h>
#endif
#endif /* not lint */
# include <errno.h>
# include <dirent.h>
# ifdef QUEUE
# include <dirent.h>
# ifdef QUEUE
lastuid = uid;
lastctladdr = a;
lastuid = uid;
lastctladdr = a;
- if (uid == 0 || (pw = getpwuid(uid)) == NULL)
+ if (uid == 0 || (pw = sm_getpwuid(uid)) == NULL)
uname = "";
else
uname = pw->pw_name;
uname = "";
else
uname = pw->pw_name;
p = strchr(user, ':');
if (p != NULL)
*p++ = '\0';
p = strchr(user, ':');
if (p != NULL)
*p++ = '\0';
- if (*user != '\0' && (pw = getpwnam(user)) != NULL)
+ if (*user != '\0' && (pw = sm_getpwnam(user)) != NULL)
{
if (strcmp(pw->pw_dir, "/") == 0)
a->q_home = "";
{
if (strcmp(pw->pw_dir, "/") == 0)
a->q_home = "";
-static char sccsid[] = "@(#)readcf.c 8.76 (Berkeley) %G%";
+static char sccsid[] = "@(#)readcf.c 8.77 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
# include <grp.h>
#if NAMED_BIND
# include <resolv.h>
# include <grp.h>
#if NAMED_BIND
# include <resolv.h>
*p++ = '\0';
if (*p != '\0')
*p++ = '\0';
*p++ = '\0';
if (*p != '\0')
*p++ = '\0';
if (pw == NULL)
syserr("readcf: mailer U= flag: unknown user %s", q);
else
if (pw == NULL)
syserr("readcf: mailer U= flag: unknown user %s", q);
else
register struct passwd *pw;
DefUid = -1;
register struct passwd *pw;
DefUid = -1;
if (pw == NULL)
syserr("readcf: option u: unknown user %s", val);
else
if (pw == NULL)
syserr("readcf: option u: unknown user %s", val);
else
-static char sccsid[] = "@(#)recipient.c 8.75 (Berkeley) %G%";
+static char sccsid[] = "@(#)recipient.c 8.76 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
/*
** SENDTOLIST -- Designate a send list.
/*
** SENDTOLIST -- Designate a send list.
{
register struct passwd *pw;
register char *p;
{
register struct passwd *pw;
register char *p;
- extern struct passwd *getpwent();
- extern struct passwd *getpwnam();
if (tTd(29, 4))
printf("finduser(%s): ", name);
if (tTd(29, 4))
printf("finduser(%s): ", name);
#endif
/* look up this login name using fast path */
#endif
/* look up this login name using fast path */
- if ((pw = getpwnam(name)) != NULL)
+ if ((pw = sm_getpwnam(name)) != NULL)
{
if (tTd(29, 4))
printf("found (non-fuzzy)\n");
{
if (tTd(29, 4))
printf("found (non-fuzzy)\n");
{
register struct passwd *pw;
{
register struct passwd *pw;
- pw = getpwuid(st.st_uid);
+ pw = sm_getpwuid(st.st_uid);
if (pw == NULL)
ctladdr->q_flags |= QBOGUSSHELL;
else
if (pw == NULL)
ctladdr->q_flags |= QBOGUSSHELL;
else
-static char sccsid[] = "@(#)savemail.c 8.61 (Berkeley) %G%";
+static char sccsid[] = "@(#)savemail.c 8.62 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
/*
** SAVEMAIL -- Save mail on error
/*
** SAVEMAIL -- Save mail on error
register char *p;
MCI mcibuf;
char buf[MAXLINE+1];
register char *p;
MCI mcibuf;
char buf[MAXLINE+1];
- extern struct passwd *getpwnam();
extern char *ttypath();
typedef int (*fnptr)();
extern bool writable();
extern char *ttypath();
typedef int (*fnptr)();
extern bool writable();
{
if (e->e_from.q_home != NULL)
p = e->e_from.q_home;
{
if (e->e_from.q_home != NULL)
p = e->e_from.q_home;
- else if ((pw = getpwnam(e->e_from.q_user)) != NULL)
+ else if ((pw = sm_getpwnam(e->e_from.q_user)) != NULL)
p = pw->pw_dir;
}
if (p == NULL)
p = pw->pw_dir;
}
if (p == NULL)
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)sendmail.h 8.109 (Berkeley) %G%
+ * @(#)sendmail.h 8.110 (Berkeley) %G%
# ifdef _DEFINE
# define EXTERN
# ifndef lint
# ifdef _DEFINE
# define EXTERN
# ifndef lint
-static char SmailSccsId[] = "@(#)sendmail.h 8.109 %G%";
+static char SmailSccsId[] = "@(#)sendmail.h 8.110 %G%";
# endif
# else /* _DEFINE */
# define EXTERN extern
# endif
# else /* _DEFINE */
# define EXTERN extern
extern void clrevent __P((EVENT *));
extern void setsender __P((char *, ENVELOPE *, char **, bool));
extern FILE *safefopen __P((char *, int, int, int));
extern void clrevent __P((EVENT *));
extern void setsender __P((char *, ENVELOPE *, char **, bool));
extern FILE *safefopen __P((char *, int, int, int));
+extern struct hostent *sm_gethostbyname __P((const char *));
+extern struct hostent *sm_gethostbyaddr __P((const char *, int, int));
+extern struct passwd *sm_getpwnam __P((const char *));
+extern struct passwd *sm_getpwuid __P((uid_t));
/* ellipsis is a different case though */
#ifdef __STDC__
/* ellipsis is a different case though */
#ifdef __STDC__
#ifndef lint
#ifdef USERDB
#ifndef lint
#ifdef USERDB
-static char sccsid [] = "@(#)udb.c 8.16 (Berkeley) %G% (with USERDB)";
+static char sccsid [] = "@(#)udb.c 8.17 (Berkeley) %G% (with USERDB)";
-static char sccsid [] = "@(#)udb.c 8.16 (Berkeley) %G% (without USERDB)";
+static char sccsid [] = "@(#)udb.c 8.17 (Berkeley) %G% (without USERDB)";
#endif
#endif
#ifdef USERDB
#include <errno.h>
#endif
#endif
#ifdef USERDB
#include <errno.h>
#include <db.h>
#ifdef HESIOD
#include <db.h>
#ifdef HESIOD
for (i = 0; i < nmx; i++)
{
for (i = 0; i < nmx; i++)
{
- h = gethostbyname(mxhosts[i]);
+ h = sm_gethostbyname(mxhosts[i]);
if (h == NULL)
continue;
up->udb_type = UDB_REMOTE;
if (h == NULL)
continue;
up->udb_type = UDB_REMOTE;
-static char sccsid[] = "@(#)util.c 8.58 (Berkeley) %G%";
+static char sccsid[] = "@(#)util.c 8.59 (Berkeley) %G%";
#endif /* not lint */
# include "sendmail.h"
#endif /* not lint */
# include "sendmail.h"
#include <arpa/inet.h>
printopenfds(logit)
#include <arpa/inet.h>
printopenfds(logit)
sprintf(p, "(badsock)");
else
{
sprintf(p, "(badsock)");
else
{
- hp = gethostbyaddr((char *) &sin.sin_addr,
+ hp = sm_gethostbyaddr((char *) &sin.sin_addr,
INADDRSZ, AF_INET);
sprintf(p, "%s/%d", hp == NULL ? inet_ntoa(sin.sin_addr)
: hp->h_name, ntohs(sin.sin_port));
INADDRSZ, AF_INET);
sprintf(p, "%s/%d", hp == NULL ? inet_ntoa(sin.sin_addr)
: hp->h_name, ntohs(sin.sin_port));
sprintf(p, "(badsock)");
else
{
sprintf(p, "(badsock)");
else
{
- hp = gethostbyaddr((char *) &sin.sin_addr,
+ hp = sm_gethostbyaddr((char *) &sin.sin_addr,
INADDRSZ, AF_INET);
sprintf(p, "%s/%d", hp == NULL ? inet_ntoa(sin.sin_addr)
: hp->h_name, ntohs(sin.sin_port));
INADDRSZ, AF_INET);
sprintf(p, "%s/%d", hp == NULL ? inet_ntoa(sin.sin_addr)
: hp->h_name, ntohs(sin.sin_port));