summaryrefslogtreecommitdiffstats
path: root/libexec/uucpd
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-04-07 08:27:45 +0000
committerbrian <brian@FreeBSD.org>1999-04-07 08:27:45 +0000
commitc6c6c7de65eae103002ebb9bee8881e1e2e903df (patch)
tree18fb09ba4ed57096b2a23fd9d28689784a00024b /libexec/uucpd
parent32ff8071a15df941cbe4d98c0badea284464f320 (diff)
downloadFreeBSD-src-c6c6c7de65eae103002ebb9bee8881e1e2e903df.zip
FreeBSD-src-c6c6c7de65eae103002ebb9bee8881e1e2e903df.tar.gz
Ensure that things returned by gethostname() and
friends are terminated and allow for a maximum host name length of MAXHOSTNAMELEN - 1. Put parenthesis around sizeof args. Make some variables static. Fix telnetd -u (broken by my last commit) Prompted by: bde
Diffstat (limited to 'libexec/uucpd')
-rw-r--r--libexec/uucpd/uucpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c
index e15c05b..dcb3b0e 100644
--- a/libexec/uucpd/uucpd.c
+++ b/libexec/uucpd/uucpd.c
@@ -45,7 +45,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)uucpd.c 8.1 (Berkeley) 6/4/93";
#endif
static const char rcsid[] =
- "$Id: uucpd.c,v 1.16 1999/03/30 10:23:35 joerg Exp $";
+ "$Id: uucpd.c,v 1.17 1999/04/06 23:06:00 brian Exp $";
#endif /* not lint */
/*
@@ -122,8 +122,8 @@ void badlogin(char *name, struct sockaddr_in *sin)
{
char remotehost[MAXHOSTNAMELEN];
- realhostname(remotehost, sizeof remotehost - 1, &sin->sin_addr);
- remotehost[sizeof remotehost - 1] = '\0';
+ realhostname(remotehost, sizeof(remotehost) - 1, &sin->sin_addr);
+ remotehost[sizeof(remotehost) - 1] = '\0';
syslog(LOG_NOTICE, "LOGIN FAILURE FROM %s", remotehost);
syslog(LOG_AUTHPRIV|LOG_NOTICE,
OpenPOWER on IntegriCloud