[2889] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

pending/559: BUG: krb5-1.0.x aclocal.m4

daemon@ATHENA.MIT.EDU (Larry Schwimmer)
Mon Mar 16 21:38:09 1998

Resent-From: gnats@rt-11.MIT.EDU (GNATS Management)
Resent-To: gnats-admin@rt-11.MIT.EDU
Resent-Reply-To: krb5-bugs@MIT.EDU,
        Larry Schwimmer <schwim@whatmore.Stanford.EDU>
Date: Mon, 16 Mar 1998 18:37:01 -0800 (PST)
From: Larry Schwimmer <schwim@whatmore.Stanford.EDU>
To: krb5-bugs@MIT.EDU
Cc: schwim@leland.Stanford.EDU


>Number:         559
>Category:       pending
>Synopsis:       BUG: krb5-1.0.x aclocal.m4
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Mon Mar 16 21:38:01 EST 1998
>Last-Modified:
>Originator:
>Organization:
>Release:
>Environment:
>Description:
>How-To-Repeat:
>Fix:
>Audit-Trail:
>Unformatted:
Submitter-Id:	net
Originator:	Larry Schwimmer
Confidential:	no
Synopsis:	configure should not check for nsl on IRIX
Severity:	serious
Priority:	medium
Category:	krb5-build
Class:		sw-bug
Release:	1.0.5 and earlier
Environment:

	IRIX

Description:

	configure does not know how to check the network libraries
correctly.  The relevant code is in aclocal.m4.  It currently uses
an incomplete kludge.

	The socket and nsl libraries are optional libraries which
should not be used for socket applications.  libc contains all the
necessary calls.

	aclocal.m4 contains a kludge which causes it not to check
for libsocket on IRIX.  But nsl is still checked.  Linking with libnsl
on IRIX breaks calls to NIS, which means that programs like login,
klogind, and telnetd break.

How-To-Repeat:

	Configure krb5-1.0.x on an IRIX system which has libnsl
installed.

Fix:

	I'd send a patch to aclocal.m4, but it does not work with the
standard autoconf.  aclocal.m4 refers to AC_LOCALDIR, which is not
defined in the normal autoconf.  The autoconf in util/autoconf refers
to it, but it would be nice if aclocal.m4 was fixed so that it worked
with the stock autoconf.

	Anyhow, this is the problem code in the WITH_NETLIB macro of
aclocal.m4:

[if test "`(uname) 2>/dev/null`" != IRIX ; then
  AC_CHECK_LIB(socket,main)
fi
AC_CHECK_LIB(nsl,main)]

	One could move the nsl check into the if section, but an
approach which does not hard-code OS's is preferable.  This is the
code I normally use to handle socket and nsl libraries:

AC_CHECK_FUNC(gethostbyname)
if test $ac_cv_func_gethostbyname = no; then
    AC_CHECK_LIB(nsl, gethostbyname)
fi
AC_CHECK_FUNC(connect)
if test $ac_cv_func_connect = no; then
    AC_CHECK_LIB(socket, connect)
fi

			yours,
				Larry Schwimmer
				schwim@leland.stanford.edu
				Leland Systems Group

home help back first fref pref prev next nref lref last post