Date: Sun, 26 Nov 2000 18:00:31 +0100 From: Joachim =?iso-8859-1?Q?Str=F6mbergson?= <watchman@ludd.luth.se> To: Kris Kennaway <kris@FreeBSD.ORG>, FreeBSD-Audit <audit@FreeBSD.ORG> Subject: Re: MAXHOSTNAMELEN Message-ID: <3A2141AF.CF7C5318@ludd.luth.se> References: <20001125214903.A14677@citusc17.usc.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------4F6D75CC2491C5CE858CC2F4 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Aloha! Kris Kennaway wrote: > Just wanted to check something..MAXHOSTNAMELEN is defined to be 256, > which is long enough to store the maximum possible DNS name (255 > octets) plus the terminating NULL. So there's no need to declare > arrays to be MAXHOSTNAMELEN+1 in size, right? Sounds right. I haven't checked the defining RFC, but the rationale for 256 would probably be to handle name lengths (including termination) in a single byte makes sense. > I'm seeing great inconsistency within our source tree, and I bumped > across this in some changes I was porting from NetBSD. Ok. I'll try and find these places... Woa! Lot of places and quite a few different settings of the size of MAXHOSTNAMELEN! Included in this mail is a file with all places in the 4.2-STABLE tree as of yesterday. By browsing the list, a few interesting ones pop out: ./contrib/amd/include/am_utils.h:# define MAXHOSTNAMELEN 64 ./contrib/nvi/common/recover.c:#define MAXHOSTNAMELEN 1024 ./contrib/traceroute/traceroute.c:#define MAXHOSTNAMELEN 64 ./contrib/tcsh/sh.h:# define MAXHOSTNAMELEN 255 ./libexec/rbootd/defs.h:#define MAXHOSTNAMELEN 64 ./libexec/telnetd/telnetd.c:#define MAXHOSTNAMELEN 64 ./usr.sbin/traceroute6/traceroute6.c:#define MAXHOSTNAMELEN 64 These are some of the definitions of the length that looks more or less wrong to me. There are more of these in the list. Then, as you can see in the list there are tons of MAXHOSTNAMELEN+1, *2 and all kinds of arithmetic. Looks rather messy and uncoordinated. Addendum: I just realised that there are definitions of MAXNAMELENGTH to 64 in the crypto versions of telnet (see the end of the mail). A buffer overflow problem particularly in these programs doesn't feel right. -- Cheers! Joachim - Alltid i harmonisk svängning --- FairLight ------ FairLight ------ FairLight ------ FairLight --- Joachim Strömbergson ASIC SoC designer, nice to CUTE animals Phone: +46(0)31 - 27 98 47 Web: http://www.ludd.luth.se/~watchman --------------- Spamfodder: regeringen@regeringen.se --------------- --------------4F6D75CC2491C5CE858CC2F4 Content-Type: text/plain; charset=us-ascii; name="MAXHOSTNAMELEN.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="MAXHOSTNAMELEN.txt" ./contrib/amd/TODO:rename HOSTNAMESZ to MAXHOSTNAMELEN ./contrib/amd/amd/amd.c:char pid_fsname[16 + MAXHOSTNAMELEN]; /* "kiska.southseas.nz:(pid%d)" */ ./contrib/amd/amd/amd.c:char hostd[2 * MAXHOSTNAMELEN + 1]; /* Host+domain */ ./contrib/amd/amd/amd.c: char hostname[MAXHOSTNAMELEN + 1] = "localhost"; /* Hostname */ ./contrib/amd/amd/amfs_toplvl.c: char fs_hostname[MAXHOSTNAMELEN + MAXPATHLEN + 1]; ./contrib/amd/amd/amfs_toplvl.c: if (strlen(fs_hostname) >= MAXHOSTNAMELEN) ./contrib/amd/amd/amfs_toplvl.c: strcpy(fs_hostname + MAXHOSTNAMELEN - 3, ".."); ./contrib/amd/amd/info_passwd.c: char rhost[MAXHOSTNAMELEN]; ./contrib/amd/amd/ops_autofs.c: char fs_hostname[MAXHOSTNAMELEN + MAXPATHLEN + 1]; ./contrib/amd/amd/ops_autofs.c: char *map_opt, buf[MAXHOSTNAMELEN]; ./contrib/amd/amd/ops_autofs.c: if (strlen(fs_hostname) >= MAXHOSTNAMELEN) ./contrib/amd/amd/ops_autofs.c: strcpy(fs_hostname + MAXHOSTNAMELEN - 3, ".."); ./contrib/amd/amd/ops_nfs.c: char host[MAXHOSTNAMELEN + MAXPATHLEN + 2]; ./contrib/amd/amd/ops_nfs.c:#ifdef MAXHOSTNAMELEN ./contrib/amd/amd/ops_nfs.c: if (strlen(host) >= MAXHOSTNAMELEN) ./contrib/amd/amd/ops_nfs.c: strcpy(host + MAXHOSTNAMELEN - 3, ".."); ./contrib/amd/amd/ops_nfs.c:#endif /* MAXHOSTNAMELEN */ ./contrib/amd/fixmount/fixmount.c:static char thishost[MAXHOSTNAMELEN + 1] = ""; ./contrib/amd/fixmount/fixmount.c: static char lasthost[MAXHOSTNAMELEN] = ""; ./contrib/amd/fsinfo/fsinfo.c:char hostname[MAXHOSTNAMELEN + 1]; ./contrib/amd/hlfsd/hlfsd.c:char hostname[MAXHOSTNAMELEN + 1] = "localhost"; ./contrib/amd/hlfsd/hlfsd.c: char hostpid_fs[MAXHOSTNAMELEN + 1 + 16]; /* room for ":(pid###)" */ ./contrib/amd/hlfsd/hlfsd.c: if ((int) strlen(progpid_fs) >= (int) MAXHOSTNAMELEN) ./contrib/amd/hlfsd/hlfsd.c: strcpy(progpid_fs + MAXHOSTNAMELEN - 3, ".."); ./contrib/amd/hlfsd/hlfsd.h:#define PROGNAMESZ (MAXHOSTNAMELEN - 5) ./contrib/amd/include/am_utils.h:#ifndef MAXHOSTNAMELEN ./contrib/amd/include/am_utils.h:# define MAXHOSTNAMELEN HOSTNAMESZ ./contrib/amd/include/am_utils.h:# define MAXHOSTNAMELEN 64 ./contrib/amd/include/am_utils.h:#endif /* not MAXHOSTNAMELEN */ ./contrib/amd/libamu/xutil.c:static char am_hostname[MAXHOSTNAMELEN + 1] = "unknown"; /* Hostname */ ./contrib/amd/libamu/xutil.c: strncpy(am_hostname, hn, MAXHOSTNAMELEN); ./contrib/amd/libamu/xutil.c: am_hostname[MAXHOSTNAMELEN] = '\0'; ./contrib/amd/wire-test/wire-test.c:char hostname[MAXHOSTNAMELEN + 1]; ./contrib/bind/CHANGES: 181. [bug] MAXHOSTNAMELEN wasn't defined on Solaris. ./contrib/bind/CHANGES: 175. [security] libirs now limits hostnames to MAXHOSTNAMELEN ./contrib/bind/bin/dig/dig.c:#ifndef MAXHOSTNAMELEN ./contrib/bind/bin/dig/dig.c:#define MAXHOSTNAMELEN 256 ./contrib/bind/bin/dig/dig.c:static char myhostname[MAXHOSTNAMELEN]; ./contrib/bind/bin/irpd/irpd.c:#ifndef MAXHOSTNAMELEN ./contrib/bind/bin/irpd/irpd.c:#define MAXHOSTNAMELEN 256 ./contrib/bind/bin/irpd/irpd.c: char hname[MAXHOSTNAMELEN]; ./contrib/bind/bin/irpd/irpd.c: char hname[MAXHOSTNAMELEN]; ./contrib/bind/bin/irpd/irpd.c: char haddr[MAXHOSTNAMELEN]; ./contrib/bind/bin/irpd/irpd.c: char haddr[MAXHOSTNAMELEN]; ./contrib/bind/lib/irs/dns_ho.c: if (n > MAXHOSTNAMELEN) { ./contrib/bind/lib/irs/dns_ho.c: if (n > buflen || n > MAXHOSTNAMELEN) { ./contrib/bind/lib/irs/dns_ho.c: n >= MAXHOSTNAMELEN) { ./contrib/bind/lib/irs/dns_ho.c: if (nn >= MAXHOSTNAMELEN) { ./contrib/bind/lib/irs/dns_ho.c: if (n > buflen || n >= MAXHOSTNAMELEN) ./contrib/cvs/src/ChangeLog-97: * logmsg (MAXHOSTNAMELEN): Removed; not used. ./contrib/cvs/src/main.c:#ifndef MAXHOSTNAMELEN ./contrib/cvs/src/main.c:#define MAXHOSTNAMELEN 256 ./contrib/cvs/src/main.c:char hostname[MAXHOSTNAMELEN]; ./contrib/cvs/src/server.c:#ifndef MAXHOSTNAMELEN ./contrib/cvs/src/server.c:#define MAXHOSTNAMELEN (256) ./contrib/cvs/src/server.c: char hostname[MAXHOSTNAMELEN]; ./contrib/groff/tmac/groff_mdoc.samples.man:.Bl -tag -width ".Dv MAXHOSTNAMELEN" -compact -offset 14n ./contrib/groff/tmac/groff_mdoc.samples.man:.It Li ".Dv MAXHOSTNAMELEN" ./contrib/groff/tmac/groff_mdoc.samples.man:.Dv MAXHOSTNAMELEN ./contrib/ipfilter/fils.c: static char hostbuf[MAXHOSTNAMELEN+1]; ./contrib/ipfilter/fils.c: hostbuf[MAXHOSTNAMELEN] = '\0'; ./contrib/ipfilter/ipmon.c: static char hostbuf[MAXHOSTNAMELEN+1]; ./contrib/ipfilter/ipmon.c: hostbuf[MAXHOSTNAMELEN] = '\0'; ./contrib/ipfilter/ipnat.c:static char thishost[MAXHOSTNAMELEN]; ./contrib/ipfilter/FWTK/fwtk-2.1-transparency.txt:+ if (strlen(psychic) <= MAXHOSTNAMELEN) { ./contrib/ipfilter/FWTK/fwtk_transparent.diff:+ if(strlen(psychic)<=MAXHOSTNAMELEN) { ./contrib/ipfilter/FWTK/fwtkp:+ if(strlen(psychic)<=MAXHOSTNAMELEN) { ./contrib/ipfilter/ipsend/ipsend.c: char *name = argv[0], host[MAXHOSTNAMELEN + 1]; ./contrib/ipfilter/ipsend/iptest.c: char *name = argv[0], host[MAXHOSTNAMELEN + 1]; ./contrib/ipfilter/common.c:static char thishost[MAXHOSTNAMELEN]; ./contrib/nvi/common/recover.c: * MAXHOSTNAMELEN is in various places on various systems, including ./contrib/nvi/common/recover.c:#ifndef MAXHOSTNAMELEN ./contrib/nvi/common/recover.c:#define MAXHOSTNAMELEN 1024 ./contrib/nvi/common/recover.c: char host[MAXHOSTNAMELEN]; ./contrib/opie/opieftpd.c:char remotehost[MAXHOSTNAMELEN]; ./contrib/sendmail/src/conf.c: char hnb[MAXHOSTNAMELEN]; ./contrib/sendmail/src/conf.h:#if !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYSTEM_V) ./contrib/sendmail/src/conf.h:# define MAXHOSTNAMELEN 256 ./contrib/sendmail/src/conf.h:#endif /* !defined(MAXHOSTNAMELEN) && !defined(_SCO_unix_) && !defined(NonStop_UX_BXX) && !defined(ALTOS_SYSTEM_V) */ ./contrib/sendmail/src/daemon.c: char jbuf[MAXHOSTNAMELEN]; ./contrib/sendmail/src/daemon.c: char jbuf[MAXHOSTNAMELEN]; ./contrib/sendmail/src/main.c: char jbuf[MAXHOSTNAMELEN]; /* holds MyHostName */ ./contrib/sendmail/src/main.c: char host[MAXHOSTNAMELEN]; ./contrib/sendmail/src/map.c: char buf[MAXHOSTNAMELEN]; ./contrib/sendmail/src/mci.c: char host[MAXHOSTNAMELEN]; ./contrib/sendmail/src/mci.c: char t_host[MAXHOSTNAMELEN]; ./contrib/tcp_wrappers/socket.c: char dot_name[MAXHOSTNAMELEN + 1]; ./contrib/tcp_wrappers/socket.c: if (strchr(name, '.') == 0 || strlen(name) >= MAXHOSTNAMELEN - 1) { ./contrib/tcp_wrappers/workarounds.c: * Some AIX versions advertise a too small MAXHOSTNAMELEN value (32). ./contrib/tcp_wrappers/workarounds.c:#if (MAXHOSTNAMELEN < 64) ./contrib/tcp_wrappers/workarounds.c:#undef MAXHOSTNAMELEN ./contrib/tcp_wrappers/workarounds.c:#ifndef MAXHOSTNAMELEN ./contrib/tcp_wrappers/workarounds.c:#define MAXHOSTNAMELEN 256 /* storage for host name */ ./contrib/tcp_wrappers/workarounds.c: static char mydomain[MAXHOSTNAMELEN]; ./contrib/tcp_wrappers/workarounds.c: return (getdomainname(mydomain, MAXHOSTNAMELEN)); ./contrib/tcpdump/print-atalk.c: char nambuf[MAXHOSTNAMELEN + 20]; ./contrib/tcpdump/print-bgp.c: char buf[MAXHOSTNAMELEN + 100]; ./contrib/tcpdump/print-bgp.c: char buf[MAXHOSTNAMELEN + 100]; ./contrib/tcpdump/print-icmp.c: char buf[MAXHOSTNAMELEN + 100]; ./contrib/traceroute/traceroute.c:#ifndef MAXHOSTNAMELEN ./contrib/traceroute/traceroute.c:#define MAXHOSTNAMELEN 64 ./contrib/traceroute/traceroute.c: static char domain[MAXHOSTNAMELEN + 1], line[MAXHOSTNAMELEN + 1]; ./contrib/traceroute/traceroute.c: if (gethostname(domain, MAXHOSTNAMELEN) == 0 && ./contrib/tcsh/sh.c: char cbuff[MAXHOSTNAMELEN]; ./contrib/tcsh/sh.h:# undef MAXHOSTNAMELEN /* Busted headers? */ ./contrib/tcsh/sh.h:#ifndef MAXHOSTNAMELEN ./contrib/tcsh/sh.h:# define MAXHOSTNAMELEN 255 ./contrib/tcsh/sh.h:#endif /* MAXHOSTNAMELEN */ ./gnu/libexec/uucp/contrib/uupoll.shar:X char name[MAXHOSTNAMELEN+1]; /* name of site as supplied by uuname */ ./gnu/libexec/uucp/contrib/uupoll.shar:X char This_Site[MAXHOSTNAMELEN+1]; /* our site name */ ./gnu/libexec/uucp/contrib/uupoll.shar:X char Single_Site[MAXHOSTNAMELEN+1]; /* name of site found as arg */ ./gnu/libexec/uucp/contrib/uupoll.shar:X if ((gethostname(sCom_Sto->This_Site,MAXHOSTNAMELEN+1)) != 0) { ./gnu/libexec/uucp/contrib/uupoll.shar:X char curr_site[MAXHOSTNAMELEN+11] = ""; /* keyword + sitename */ ./gnu/libexec/uucp/contrib/uupoll.shar:X while(fgets(sCom_Sto->Sitetab[i].name,MAXHOSTNAMELEN+1,infile)) { ./gnu/libexec/uucp/contrib/uupoll.shar:X char name[MAXHOSTNAMELEN+1]; /* name of site as supplied by uuname */ ./gnu/libexec/uucp/contrib/uupoll.shar:X char This_Site[MAXHOSTNAMELEN+1]; /* our site name */ ./gnu/libexec/uucp/contrib/uupoll.shar:X char System[MAXHOSTNAMELEN+1]; /* intermediate to hold sitename */ ./gnu/libexec/uucp/contrib/uupoll.shar:X if ((gethostname(sCom_Sto->This_Site,MAXHOSTNAMELEN+1)) != 0) { ./gnu/libexec/uucp/contrib/uupoll.shar:X while(fgets(sCom_Sto->Sitetab[i].name,MAXHOSTNAMELEN+1,infile)) { ./gnu/libexec/uucp/contrib/uurate.c: char Hostname[MAXHOSTNAMELEN]; /* def taken from <sys/param.h> */ ./include/protocols/timed.h: char tsp_name[MAXHOSTNAMELEN]; ./lib/libc/gen/getdomainname.3:.Dv MAXHOSTNAMELEN ./lib/libc/gen/gethostname.3:.Dv MAXHOSTNAMELEN ./lib/libc/gen/getnetgrent.c: char _key[MAXHOSTNAMELEN]; ./lib/libc/net/ether_addr.c: char local_host[MAXHOSTNAMELEN]; ./lib/libc/net/ether_addr.c: char local_host[MAXHOSTNAMELEN]; ./lib/libc/net/getaddrinfo.c: if (n >= MAXHOSTNAMELEN) { ./lib/libc/net/getaddrinfo.c: if (n > buflen || n >= MAXHOSTNAMELEN) { ./lib/libc/net/gethostbydns.c: if (n >= MAXHOSTNAMELEN) { ./lib/libc/net/gethostbydns.c: if (n >= MAXHOSTNAMELEN) { ./lib/libc/net/gethostbydns.c: if (n > buflen || n >= MAXHOSTNAMELEN) { ./lib/libc/net/gethostbydns.c: if (n > buflen || n >= MAXHOSTNAMELEN) { ./lib/libc/net/gethostbydns.c: if (n >= MAXHOSTNAMELEN) { ./lib/libc/net/gethostbydns.c: if (n >= MAXHOSTNAMELEN) { ./lib/libc/net/gethostbydns.c: if (n > buflen || n >= MAXHOSTNAMELEN) ./lib/libc/net/getnameinfo.c: char scopebuf[MAXHOSTNAMELEN]; ./lib/libc/net/getnetbydns.c: char aux1[MAXHOSTNAMELEN], aux2[MAXHOSTNAMELEN], ans[MAXHOSTNAMELEN]; ./lib/libc/net/name6.c: if (n >= MAXHOSTNAMELEN) { ./lib/libc/net/name6.c: DNS_FATAL(n < MAXHOSTNAMELEN); ./lib/libc/net/name6.c: DNS_FATAL(n < MAXHOSTNAMELEN); ./lib/libc/net/name6.c: if (n > buflen || n >= MAXHOSTNAMELEN) { ./lib/libc/net/name6.c: if (n >= MAXHOSTNAMELEN) { ./lib/libc/net/name6.c: if (n > buflen || n >= MAXHOSTNAMELEN) ./lib/libc/net/rcmd.c: char buf[MAXHOSTNAMELEN + 128]; /* host + login */ ./lib/libc/net/rcmd.c: char hname[MAXHOSTNAMELEN]; ./lib/libc/rpc/clnt_simple.c: crp->oldhost = malloc(MAXHOSTNAMELEN); ./lib/libc/rpc/netname.c:#ifndef MAXHOSTNAMELEN ./lib/libc/rpc/netname.c:#define MAXHOSTNAMELEN 256 ./lib/libc/rpc/netname.c: char hostname[MAXHOSTNAMELEN+1]; ./lib/libc/yp/yplib.c:static char _yp_domain[MAXHOSTNAMELEN]; ./lib/libcompat/4.3/rexec.c: char myname[MAXHOSTNAMELEN], *mydomain; ./lib/libfetch/fetch.3: char host[MAXHOSTNAMELEN+1]; ./lib/libfetch/fetch.c: if ((i = q - p - 2) > MAXHOSTNAMELEN) ./lib/libfetch/fetch.c: i = MAXHOSTNAMELEN; ./lib/libfetch/fetch.c: if (i < MAXHOSTNAMELEN) ./lib/libfetch/fetch.h: char host[MAXHOSTNAMELEN+1]; ./lib/libfetch/ftp.c: char localhost[MAXHOSTNAMELEN]; ./lib/libfetch/ftp.c: char pbuf[MAXHOSTNAMELEN + MAXLOGNAME + 1]; ./lib/libfetch/http.c: char hbuf[MAXHOSTNAMELEN + 1]; ./lib/libpam/modules/pam_kerberosIV/klogin.c: char realm[REALM_SZ], savehost[MAXHOSTNAMELEN]; ./lib/libpam/modules/pam_kerberosIV/pam_kerberosIV.c: char localhost[MAXHOSTNAMELEN + 1]; ./lib/libpam/modules/pam_radius/pam_radius.c: char host[MAXHOSTNAMELEN]; ./lib/libskey/skeyaccess.c: char buf[MAXHOSTNAMELEN + 1]; ./lib/libskey/skeyaccess.c: strncpy(buf, hp->h_name, MAXHOSTNAMELEN); ./lib/libskey/skeyaccess.c: buf[MAXHOSTNAMELEN] = 0; ./lib/libskey/skeyaccess.c: char host[MAXHOSTNAMELEN + 1]; ./lib/libskey/skeyaccess.c: hp->h_name : argv[3], MAXHOSTNAMELEN); ./lib/libskey/skeyaccess.c: host[MAXHOSTNAMELEN] = 0; ./lib/libstand/bootparam.c: hostnamelen = MAXHOSTNAMELEN-1; ./lib/libstand/bootparam.c: domainnamelen = MAXHOSTNAMELEN-1; ./lib/libstand/dev_net.c: char buf[MAXHOSTNAMELEN]; ./lib/libutil/logwtmp.c: static char domain[MAXHOSTNAMELEN]; ./lib/libutil/logwtmp.c: char fullhost[MAXHOSTNAMELEN]; ./lib/libutil/realhostname.c: char lookup[MAXHOSTNAMELEN]; ./libexec/bootpd/bootpd.c:static char default_hostname[MAXHOSTNAMELEN]; ./libexec/comsat/comsat.c:char hostname[MAXHOSTNAMELEN]; ./libexec/fingerd/fingerd.c: char rhost[MAXHOSTNAMELEN]; ./libexec/ftpd/ftpd.c:char remotehost[MAXHOSTNAMELEN]; ./libexec/ftpd/ftpd.c: if ((hostname = malloc(MAXHOSTNAMELEN)) == NULL) ./libexec/ftpd/ftpd.c: (void) gethostname(hostname, MAXHOSTNAMELEN - 1); ./libexec/ftpd/ftpd.c: hostname[MAXHOSTNAMELEN - 1] = '\0'; ./libexec/ftpd/ftpd.c: char remote_ip[MAXHOSTNAMELEN]; ./libexec/ftpd/ftpd.c: char who_name[MAXHOSTNAMELEN]; ./libexec/getty/main.c:char hostname[MAXHOSTNAMELEN]; ./libexec/getty/subr.c:char editedhost[MAXHOSTNAMELEN]; ./libexec/pppoed/pppoed.c: char hostname[MAXHOSTNAMELEN], *exec, rhook[NG_HOOKLEN + 1]; ./libexec/rbootd/conf.c:char MyHost[MAXHOSTNAMELEN]; /* host name */ ./libexec/rbootd/defs.h:#ifndef MAXHOSTNAMELEN ./libexec/rbootd/defs.h:#define MAXHOSTNAMELEN 64 ./libexec/rbootd/rbootd.c: if (gethostname(MyHost, MAXHOSTNAMELEN - 1) < 0) { ./libexec/rbootd/rbootd.c: MyHost[MAXHOSTNAMELEN - 1] = '\0'; ./libexec/rexecd/rexecd.c:char remote[MAXHOSTNAMELEN]; ./libexec/rlogind/rlogind.c: char hostname[2 * MAXHOSTNAMELEN + 1]; ./libexec/rshd/rshd.c: char fromhost[2 * MAXHOSTNAMELEN + 1]; ./libexec/rshd/rshd.c: char remote_ip[MAXHOSTNAMELEN]; ./libexec/rshd/rshd.c: char localhost[MAXHOSTNAMELEN]; ./libexec/talkd/talkd.c:char hostname[MAXHOSTNAMELEN]; ./libexec/telnetd/telnetd.c:char remote_hostname[MAXHOSTNAMELEN]; ./libexec/telnetd/telnetd.c:#ifndef MAXHOSTNAMELEN ./libexec/telnetd/telnetd.c:#define MAXHOSTNAMELEN 64 ./libexec/telnetd/telnetd.c:#endif /* MAXHOSTNAMELEN */ ./libexec/telnetd/telnetd.c:char host_name[MAXHOSTNAMELEN]; ./libexec/tftpd/tftpd.c: char host[MAXHOSTNAMELEN]; ./libexec/uucpd/uucpd.c: char remotehost[MAXHOSTNAMELEN]; ./release/sysinstall/media.c: char *cp, hbuf[MAXHOSTNAMELEN], *hostname, *dir; ./release/sysinstall/media.c: char *cp, *idx, hbuf[MAXHOSTNAMELEN], *hostname; ./bin/date/netdate.c: char hostname[MAXHOSTNAMELEN]; ./bin/domainname/domainname.c: char domainname[MAXHOSTNAMELEN]; ./bin/hostname/hostname.c: char *p, hostname[MAXHOSTNAMELEN]; ./sbin/ifconfig/ifconfig.c:char addr_buf[MAXHOSTNAMELEN *2 + 1]; /*for getnameinfo()*/ ./sbin/mount_portal/pt_tcp.c: char host[MAXHOSTNAMELEN]; ./sbin/mount_portal/pt_tcp.c: char port[MAXHOSTNAMELEN]; ./sbin/mount_portal/pt_tcplisten.c: char host[MAXHOSTNAMELEN]; ./sbin/mount_portal/pt_tcplisten.c: char port[MAXHOSTNAMELEN]; ./sbin/ping/ping.c: char *source = NULL, *target, hnamebuf[MAXHOSTNAMELEN]; ./sbin/ping/ping.c: char snamebuf[MAXHOSTNAMELEN]; ./sbin/ping/ping.c: static char buf[16 + 3 + MAXHOSTNAMELEN]; ./sbin/ping6/ping6.c: static char buf[MAXHOSTNAMELEN]; ./sbin/route/route.c:char name_buf[MAXHOSTNAMELEN * 2 + 1]; /*for getnameinfo()*/ ./sbin/route/route.c: static char line[MAXHOSTNAMELEN + 1]; ./sbin/route/route.c: static char domain[MAXHOSTNAMELEN + 1]; ./sbin/route/route.c: if (gethostname(domain, MAXHOSTNAMELEN) == 0 && ./sbin/route/route.c: domain[MAXHOSTNAMELEN] = '\0'; ./sbin/route/route.c: static char line[MAXHOSTNAMELEN + 1]; ./sbin/route/route.c: static char mybuf[50+MAXHOSTNAMELEN], cport[10], chost[25]; ./sbin/routed/main.c:char myname[MAXHOSTNAMELEN+1]; ./sbin/routed/parms.c: char hname[MAXHOSTNAMELEN+1]; ./sbin/routed/rtquery/rtquery.c: char hname[MAXHOSTNAMELEN+1]; ./sbin/shutdown/shutdown.c: static char hostname[MAXHOSTNAMELEN + 1]; ./share/doc/psd/05.sysman/1.1.t:name of up to 64 characters (as defined by MAXHOSTNAMELEN in ./share/doc/psd/05.sysman/spell.ok:MAXHOSTNAMELEN ./share/man/man7/mdoc.samples.7:.Bl -tag -width ".Dv MAXHOSTNAMELEN" -compact -offset 14n ./share/man/man7/mdoc.samples.7:.It Li ".Dv MAXHOSTNAMELEN" ./share/man/man7/mdoc.samples.7:.Dv MAXHOSTNAMELEN ./sys/boot/common/dev_net.c: char buf[MAXHOSTNAMELEN]; ./sys/i386/boot/dosboot/sysparam.h:#define MAXHOSTNAMELEN 256 /* max hostname size */ ./sys/i386/ibcs2/ibcs2_socksys.c: char hname[MAXHOSTNAMELEN], *dptr; ./sys/i386/ibcs2/ibcs2_socksys.c: char hname[MAXHOSTNAMELEN], *ptr; ./sys/kern/kern_mib.c:char hostname[MAXHOSTNAMELEN]; ./sys/kern/kern_mib.c:char domainname[MAXHOSTNAMELEN]; ./sys/netinet6/icmp6.c: /* because MAXHOSTNAMELEN is usually 256, we use cluster mbuf */ ./sys/netkey/key.c: static char fqdn[MAXHOSTNAMELEN + 1]; ./sys/netkey/key.c: static char userfqdn[MAXHOSTNAMELEN + MAXLOGNAME + 2]; ./sys/nfs/bootp_subr.c: if (gctx->tag.taglen >= MAXHOSTNAMELEN) ./sys/nfs/bootp_subr.c: MAXHOSTNAMELEN); ./sys/nfs/nfs_vfsops.c: MAXHOSTNAMELEN); ./sys/nfs/nfs_vfsops.c: bcopy(nd->my_hostnam, hostname, MAXHOSTNAMELEN); ./sys/nfs/nfs_vfsops.c: hostname[MAXHOSTNAMELEN - 1] = '\0'; ./sys/nfs/nfs_vfsops.c: for (i = 0; i < MAXHOSTNAMELEN; i++) ./sys/nfs/nfsdiskless.h: char my_hostnam[MAXHOSTNAMELEN]; /* Client host name */ ./sys/nfs/nfsdiskless.h: char my_hostnam[MAXHOSTNAMELEN]; /* Client host name */ ./sys/sys/jail.h: char pr_host[MAXHOSTNAMELEN]; ./sys/sys/kernel.h:extern char hostname[MAXHOSTNAMELEN]; ./sys/sys/kernel.h:extern char domainname[MAXHOSTNAMELEN]; ./sys/sys/param.h:#define MAXHOSTNAMELEN 256 /* max hostname size */ ./usr.bin/ftp/cmds.c: static char gsbuf[MAXHOSTNAMELEN]; ./usr.bin/ftp/fetch.c: static char lasthost[MAXHOSTNAMELEN]; ./usr.bin/ftp/ftp.c: static char hostnamebuf[MAXHOSTNAMELEN]; ./usr.bin/ftp/ftp.c: char name[MAXHOSTNAMELEN]; ./usr.bin/ftp/ruserpass.c: char myname[MAXHOSTNAMELEN], *mydomain; ./usr.bin/ftp/util.c: char anonpass[MAXLOGNAME + 1 + MAXHOSTNAMELEN]; /* "user@hostname" */ ./usr.bin/ftp/util.c: char hostname[MAXHOSTNAMELEN]; ./usr.bin/ftp/util.c: gethostname(hostname, MAXHOSTNAMELEN); ./usr.bin/last/last.c: static char *hostdot, name[MAXHOSTNAMELEN]; ./usr.bin/lock/lock.c: char hostname[MAXHOSTNAMELEN], s[BUFSIZ], s1[BUFSIZ]; ./usr.bin/login/login.c:char full_hostname[MAXHOSTNAMELEN]; ./usr.bin/login/login.c: char hostbuf[MAXHOSTNAMELEN]; ./usr.bin/login/login.c: char hostbuf[MAXHOSTNAMELEN]; ./usr.bin/netstat/inet.c: static char line[MAXHOSTNAMELEN + 1]; ./usr.bin/netstat/inet6.c: static char domain[MAXHOSTNAMELEN + 1]; ./usr.bin/netstat/inet6.c: if (gethostname(domain, MAXHOSTNAMELEN) == 0 && ./usr.bin/netstat/main.c: static char domain[MAXHOSTNAMELEN + 1]; ./usr.bin/netstat/main.c: if (gethostname(domain, MAXHOSTNAMELEN) == 0 && ./usr.bin/netstat/route.c: static char line[MAXHOSTNAMELEN + 1]; ./usr.bin/netstat/route.c: static char line[MAXHOSTNAMELEN + 1]; ./usr.bin/netstat/route.c: static char line[MAXHOSTNAMELEN + 1]; ./usr.bin/netstat/route.c: static char line[MAXHOSTNAMELEN + 1]; ./usr.bin/rwall/rwall.c: char *whom, hostname[MAXHOSTNAMELEN], lbuf[256], tmpname[64]; ./usr.bin/su/su.c: char hostname[MAXHOSTNAMELEN], savehost[MAXHOSTNAMELEN]; ./usr.bin/systat/main.c:char hostname[MAXHOSTNAMELEN]; ./usr.bin/talk/get_names.c: char hostname[MAXHOSTNAMELEN]; ./usr.bin/telnet/commands.c:#ifndef MAXHOSTNAMELEN ./usr.bin/telnet/commands.c:#define MAXHOSTNAMELEN 64 ./usr.bin/telnet/commands.c:#endif MAXHOSTNAMELEN ./usr.bin/telnet/commands.c:static char _hostname[MAXHOSTNAMELEN]; ./usr.bin/tftp/main.c:char hostname[MAXHOSTNAMELEN]; ./usr.bin/w/w.c:char domain[MAXHOSTNAMELEN]; ./usr.bin/w/w.c: char buf[MAXHOSTNAMELEN], errbuf[256]; ./usr.bin/wall/wall.c: char *p, *whom, hostname[MAXHOSTNAMELEN], lbuf[256], tmpname[64]; ./usr.bin/write/write.c: char path[MAXPATHLEN], host[MAXHOSTNAMELEN], line[512]; ./usr.sbin/cron/cron/cron.h:#ifndef MAXHOSTNAMELEN ./usr.sbin/cron/cron/cron.h:#define MAXHOSTNAMELEN 64 ./usr.sbin/cron/cron/do_command.c: auto char hostname[MAXHOSTNAMELEN]; ./usr.sbin/cron/cron/do_command.c: (void) gethostname(hostname, MAXHOSTNAMELEN); ./usr.sbin/faithd/faithd.c: char src[MAXHOSTNAMELEN]; ./usr.sbin/faithd/faithd.c: char dst6[MAXHOSTNAMELEN]; ./usr.sbin/faithd/faithd.c: char dst4[MAXHOSTNAMELEN]; ./usr.sbin/lpr/common_source/lp.h:extern char host[MAXHOSTNAMELEN]; ./usr.sbin/lpr/common_source/net.c:char host[MAXHOSTNAMELEN]; ./usr.sbin/lpr/common_source/net.c: char name[MAXHOSTNAMELEN]; ./usr.sbin/lpr/lpd/lpd.c:char fromb[MAXHOSTNAMELEN]; /* buffer for client's machine name */ ./usr.sbin/mrouted/cfparse.y: char buf[MAXHOSTNAMELEN + 100]; ./usr.sbin/mrouted/cfparse.y: char buf[MAXHOSTNAMELEN + 100]; ./usr.sbin/mrouted/mtrace.c: char myhostname[MAXHOSTNAMELEN]; ./usr.sbin/mtree/create.c: char *argv[2], host[MAXHOSTNAMELEN]; ./usr.sbin/newsyslog/newsyslog.c:char hostname[MAXHOSTNAMELEN + 1]; /* hostname */ ./usr.sbin/pim6sd/inet6.c: static char ip6buf[8][MAXHOSTNAMELEN]; ./usr.sbin/pim6sd/inet6.c: getnameinfo((struct sockaddr *)sa6, sa6->sin6_len, cp, MAXHOSTNAMELEN, ./usr.sbin/pim6sd/mtrace6/mtrace6.c: static char buf[MAXHOSTNAMELEN]; ./usr.sbin/ppp/ip.c: char name[MAXHOSTNAMELEN + 1], *n; ./usr.sbin/ppp/ip.c: if (end - ptr > MAXHOSTNAMELEN) ./usr.sbin/ppp/ip.c: end = ptr + MAXHOSTNAMELEN; ./usr.sbin/ppp/ipcp.c: char name[MAXHOSTNAMELEN]; ./usr.sbin/ppp/prompt.c: static char shostname[MAXHOSTNAMELEN]; ./usr.sbin/ppp/radius.c: char hostname[MAXHOSTNAMELEN]; ./usr.sbin/rpc.lockd/procs.c:#include <sys/param.h> /* for MAXHOSTNAMELEN */ ./usr.sbin/rpc.yppasswdd/yppasswdd_main.c: char myname[MAXHOSTNAMELEN + 2]; ./usr.sbin/rwhod/rwhod.c:char myname[MAXHOSTNAMELEN]; ./usr.sbin/syslogd/syslogd.c: char f_hname[MAXHOSTNAMELEN+1]; ./usr.sbin/syslogd/syslogd.c: char f_prevhost[MAXHOSTNAMELEN+1]; /* host from which recd. */ ./usr.sbin/syslogd/syslogd.c:char LocalHostName[MAXHOSTNAMELEN+1]; /* our hostname */ ./usr.sbin/syslogd/syslogd.c: char host[MAXHOSTNAMELEN+1]; ./usr.sbin/syslogd/syslogd.c: for (i = 1; i < MAXHOSTNAMELEN; i++) { ./usr.sbin/syslogd/syslogd.c: char *cp, name[MAXHOSTNAMELEN]; ./usr.sbin/timed/timed/globals.h: char name[MAXHOSTNAMELEN]; ./usr.sbin/timed/timed/master.c: char tname[MAXHOSTNAMELEN]; ./usr.sbin/timed/timed/master.c: char tname[MAXHOSTNAMELEN]; ./usr.sbin/timed/timed/slave.c:static char master_name[MAXHOSTNAMELEN]; ./usr.sbin/timed/timed/slave.c: char tname[MAXHOSTNAMELEN]; ./usr.sbin/timed/timed/timed.c: char name[MAXHOSTNAMELEN]; ./usr.sbin/timed/timed/timed.c: char tname[MAXHOSTNAMELEN]; ./usr.sbin/timed/timed/timed.c: char mastername[MAXHOSTNAMELEN]; ./usr.sbin/timed/timedc/cmds.c:char myname[MAXHOSTNAMELEN]; ./usr.sbin/traceroute6/traceroute6.c:#ifndef MAXHOSTNAMELEN ./usr.sbin/traceroute6/traceroute6.c:#define MAXHOSTNAMELEN 64 ./usr.sbin/traceroute6/traceroute6.c: static char domain[MAXHOSTNAMELEN + 1]; ./usr.sbin/traceroute6/traceroute6.c: if (gethostname(domain, MAXHOSTNAMELEN) == 0 && ./usr.sbin/yp_mkdb/yp_mkdb.c: char hname[MAXHOSTNAMELEN + 2]; ./usr.sbin/yppush/yppush_main.c: char myname[MAXHOSTNAMELEN]; ./usr.sbin/ypserv/yp_dnslookup.c: static char result[MAXHOSTNAMELEN * 2]; ./usr.sbin/ypserv/yp_dnslookup.c: char retrybuf[MAXHOSTNAMELEN]; ./usr.sbin/ypserv/yp_dnslookup.c: char buf[MAXHOSTNAMELEN]; ./crypto/heimdal/appl/kf/kfd.c: char hostname[MAXHOSTNAMELEN]; ./crypto/heimdal/appl/login/login_access.c: static char name[MAXHOSTNAMELEN + 1] = ""; ./crypto/heimdal/appl/login/login_access.c: name[MAXHOSTNAMELEN] = 0; ./crypto/heimdal/appl/test/tcp_server.c: char hostname[MAXHOSTNAMELEN]; ./crypto/heimdal/lib/gssapi/import_name.c: char local_hostname[MAXHOSTNAMELEN]; ./crypto/heimdal/lib/krb5/get_addrs.c: char hostname[MAXHOSTNAMELEN]; ./crypto/heimdal/lib/krb5/get_host_realm.c: char dom[MAXHOSTNAMELEN]; ./crypto/heimdal/lib/krb5/get_host_realm.c: char hostname[MAXHOSTNAMELEN]; ./crypto/heimdal/lib/krb5/verify_init.c: char local_hostname[MAXHOSTNAMELEN]; ./crypto/heimdal/lib/roken/getaddrinfo_hostspec.c: char host[MAXHOSTNAMELEN]; ./crypto/heimdal/lib/roken/roken_gethostby.c: char host[MAXHOSTNAMELEN]; ./crypto/kerberosIV/ChangeLog: * appl/bsd/rlogind.c (local_domain): MAXHOSTNAMELEN -> MaxHostNameLen. ./crypto/kerberosIV/appl/bsd/login_access.c: static char name[MAXHOSTNAMELEN + 1] = ""; ./crypto/kerberosIV/appl/bsd/login_access.c: name[MAXHOSTNAMELEN] = 0; ./crypto/kerberosIV/lib/roken/roken_gethostby.c: char host[MAXHOSTNAMELEN]; ./crypto/kerberosIV/man/krb_realmofhost.3:hold any hostname (MAXHOSTNAMELEN from <sys/param.h>). ./crypto/openssh/auth-krb4.c: char localhost[MAXHOSTNAMELEN]; ./crypto/openssh/canohost.c: char name[MAXHOSTNAMELEN]; ./crypto/openssh/channels.c: char hostname[MAXHOSTNAMELEN]; ./crypto/openssh/pam_ssh/pam_ssh.c: char hname[MAXHOSTNAMELEN]; /* local hostname */ ./crypto/openssh/session.c: char hostname[MAXHOSTNAMELEN]; ./crypto/openssh/ssh-keygen.c:char hostname[MAXHOSTNAMELEN]; ./crypto/openssh/sshd.c:unsigned int utmp_len = MAXHOSTNAMELEN; ./crypto/telnet/telnet/commands.c:#ifndef MAXHOSTNAMELEN ./crypto/telnet/telnet/commands.c:#define MAXHOSTNAMELEN 64 ./crypto/telnet/telnet/commands.c:#endif MAXHOSTNAMELEN ./crypto/telnet/telnet/commands.c:static char _hostname[MAXHOSTNAMELEN]; ./crypto/telnet/telnetd/telnetd.c:char remote_hostname[MAXHOSTNAMELEN]; ./crypto/telnet/telnetd/telnetd.c:#ifndef MAXHOSTNAMELEN ./crypto/telnet/telnetd/telnetd.c:#define MAXHOSTNAMELEN 64 ./crypto/telnet/telnetd/telnetd.c:#endif /* MAXHOSTNAMELEN */ ./crypto/telnet/telnetd/telnetd.c:char host_name[MAXHOSTNAMELEN]; --------------4F6D75CC2491C5CE858CC2F4-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A2141AF.CF7C5318>
