Subject: lib/15711: wrong error message in libwrap/fix_options.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <o.vd.linden@quicknet.nl>
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
>Closed-Date:
>Last-Modified:
>Originator:     Onno van der Linden
>Release:        NetBSD 1.5ZA
>Organization:
	
>Environment:
	
	
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
>Description:
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");
	clean_exit(request);
    }
The syslog mentions getpeername which is not correct
>How-To-Repeat:
	
>Fix:

Change syslog(LOG_ERR, "getpeername: %m") to
       syslog(LOG_ERR, "getsockname: %m)
>Release-Note:
>Audit-Trail:
>Unformatted: