Subject: lib/15711: wrong error message in libwrap/fix_options.c
To: None <>
From: None <>
List: netbsd-bugs
Date: 02/23/2002 23:17:55
>Number:         15711
>Category:       lib
>Synopsis:       wrong error message about getsockname() in libwrap/fix_options
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 23 14:18:00 PST 2002
>Originator:     Onno van der Linden
>Release:        NetBSD 1.5ZA
System: NetBSD sheep 1.5ZA NetBSD 1.5ZA (SHEEP) #0: Fri Feb 1 22:38:11 MET 2002 root@sheep:/usr/src/sys/arch/i386/compile/SHEEP i386
Architecture: i386
Machine: i386
Around line 64 of /usr/src/lib/libwrap/fix_options.c the code says:
    if (getsockname(fd, (struct sockaddr *)&ss, &sslen) < 0) {
	syslog(LOG_ERR, "getpeername: %m");
The syslog mentions getpeername which is not correct

Change syslog(LOG_ERR, "getpeername: %m") to
       syslog(LOG_ERR, "getsockname: %m)