Subject: lib/3522: undefined symbols in libwrap
To: None <>
From: Jaromir Dolecek <>
List: netbsd-bugs
Date: 04/22/1997 10:06:43
>Number:         3522
>Category:       lib
>Synopsis:       undefined symbols in libwrap
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 22 01:20:02 1997
>Originator:     Jaromir Dolecek
	ICS MU, Brno, Czech republic
>Release:        1.2
System: NetBSD 1.2 NetBSD 1.2 (SARUMAN_12) #21: Mon Mar 24 15:47:33 MET 1997 i386
Architecture: i386

	I've got liwrap sources from -current and compiled it
	happily on i386/1.2 machine. I've also got inetd and
	recompiled it to use libwrap.  The same for sendmail. All
	works okay.
	My problem:
	When I compiled ssh to use libwrap, scp complains about missing
	"_deny_severity" in libwrap:
	/usr/libexec/ Undefined symbol "_deny_severity" in                        
	I've played w/ it a bit and w/ help of my fried found out
	symbol deny_severity is used in libwrap, but not really
	declared anywhere:

	saruman: /home/dolecek/tmp/libwrap ###
	>grep deny_severity *.[ch]
	options.c:      syslog(deny_severity, "twist %s to %s", 
		eval_client(request), value);
	options.c:    allow_severity = deny_severity = level ?
	refuse.c:    syslog(deny_severity, "refused connect from %s", 
	tcpd.h:extern int deny_severity; 
	When shared lib is build, this sybmol gets stripped somehow
	from library.

	So - there are a few variables, which are used w/o being
	declared; they are defined as extern in tcpd.h but not
	defined anywhere else. It's case of deny_severity and
	allow_severity at least.

	I'm sorry if these two are declared somewhere else (libc ?).

	Compile ssh w/ TCPWRAPPERS; wander why scp isn't able to run

	It's a bit hard as libwrap isn't kinda "static" lib, but
	is imported from elsewhere; it should be nice to make
	libwrap2netbsd to "correct" it somehow.  I'm adding the
	patch of options.c just to make see kind of what should be
	done; it's really NOT rocket science ;-)

*** options.c.orig	Fri Jan 24 13:14:03 1997
--- options.c	Tue Apr 22 09:45:59 1997
*** 86,91 ****
--- 86,95 ----
  static void deny_option();		/* execute "deny" option */
  static void banners_option();		/* execute "banners path" option */
+ /* necessary variables */
+ int allow_severity;              /* for connection logging */
+ int deny_severity;               /* for connection logging */
  /* Structure of the options table. */
  struct option {