summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1cd5500)
SCCS-vsn: usr.sbin/sendmail/src/main.c 8.56
SCCS-vsn: usr.sbin/sendmail/src/daemon.c 8.50
#ifndef lint
#ifdef DAEMON
#ifndef lint
#ifdef DAEMON
-static char sccsid[] = "@(#)daemon.c 8.49 (Berkeley) %G% (with daemon mode)";
+static char sccsid[] = "@(#)daemon.c 8.50 (Berkeley) %G% (with daemon mode)";
-static char sccsid[] = "@(#)daemon.c 8.49 (Berkeley) %G% (without daemon mode)";
+static char sccsid[] = "@(#)daemon.c 8.50 (Berkeley) %G% (without daemon mode)";
#endif
#endif /* not lint */
#endif
#endif /* not lint */
** Adds numeric codes to $=w.
*/
** Adds numeric codes to $=w.
*/
myhostname(hostbuf, size)
char hostbuf[];
int size;
myhostname(hostbuf, size)
char hostbuf[];
int size;
-
- if (hp->h_addrtype == AF_INET && hp->h_length == 4)
- {
- register int i;
-
- for (i = 0; hp->h_addr_list[i] != NULL; i++)
- {
- char ipbuf[100];
-
- sprintf(ipbuf, "[%s]",
- inet_ntoa(*((struct in_addr *) hp->h_addr_list[i])));
- if (tTd(0, 4))
- printf("\ta.k.a.: %s\n", ipbuf);
- setclass('w', ipbuf);
- }
- }
-
- return (hp->h_aliases);
}
\f/*
** GETAUTHINFO -- get the real host name asociated with a file descriptor
}
\f/*
** GETAUTHINFO -- get the real host name asociated with a file descriptor
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 8.55 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 8.56 (Berkeley) %G%";
#endif /* not lint */
#define _DEFINE
#include "sendmail.h"
#endif /* not lint */
#define _DEFINE
#include "sendmail.h"
#if NAMED_BIND
#include <arpa/nameser.h>
#include <resolv.h>
#if NAMED_BIND
#include <arpa/nameser.h>
#include <resolv.h>
char *argv0 = argv[0];
struct passwd *pw;
struct stat stb;
char *argv0 = argv[0];
struct passwd *pw;
struct stat stb;
char jbuf[MAXHOSTNAMELEN]; /* holds MyHostName */
extern int DtableSize;
extern int optind;
extern time_t convtime();
extern putheader(), putbody();
extern void intsig();
char jbuf[MAXHOSTNAMELEN]; /* holds MyHostName */
extern int DtableSize;
extern int optind;
extern time_t convtime();
extern putheader(), putbody();
extern void intsig();
- extern char **myhostname();
+ extern struct hostent *myhostname();
extern char *arpadate();
extern char *getauthinfo();
extern char *getcfname();
extern char *arpadate();
extern char *getauthinfo();
extern char *getcfname();
define('v', Version, CurEnv);
/* hostname */
define('v', Version, CurEnv);
/* hostname */
- av = myhostname(jbuf, sizeof jbuf);
+ hp = myhostname(jbuf, sizeof jbuf);
if (jbuf[0] != '\0')
{
struct utsname utsname;
if (jbuf[0] != '\0')
{
struct utsname utsname;
p = jbuf;
}
if (tTd(0, 4))
p = jbuf;
}
if (tTd(0, 4))
- printf("UUCP nodename: %s\n", p);
+ printf(" UUCP nodename: %s\n", p);
p = newstr(p);
define('k', p, CurEnv);
setclass('k', p);
setclass('w', p);
}
p = newstr(p);
define('k', p, CurEnv);
setclass('k', p);
setclass('w', p);
}
- while (av != NULL && *av != NULL)
- if (tTd(0, 4))
- printf("\ta.k.a.: %s\n", *av);
- setclass('w', *av++);
+ for (av = hp->h_aliases; av != NULL && *av != NULL; av++)
+ {
+ if (tTd(0, 4))
+ printf("\ta.k.a.: %s\n", *av);
+ setclass('w', *av);
+ }
+ if (hp->h_addrtype == AF_INET && hp->h_length == 4)
+ {
+ register int i;
+
+ for (i = 0; hp->h_addr_list[i] != NULL; i++)
+ {
+ char ipbuf[100];
+
+ sprintf(ipbuf, "[%s]",
+ inet_ntoa(*((struct in_addr *) hp->h_addr_list[i])));
+ if (tTd(0, 4))
+ printf("\ta.k.a.: %s\n", ipbuf);
+ setclass('w', ipbuf);
+ }
+ }
{
register char *p;
static char hostbuf[48];
{
register char *p;
static char hostbuf[48];
- extern char **myhostname();
+ extern struct hostent *myhostname();
if (hostbuf[0] == '\0')
(void) myhostname(hostbuf, sizeof hostbuf);
if (hostbuf[0] == '\0')
(void) myhostname(hostbuf, sizeof hostbuf);