Bug in building, using auth_krb5

Todd Olson tco2 at cornell.edu
Tue Mar 15 18:41:34 UTC 2005


Hi

again in v2.4.1

The configure option

       --with-kerberos=PATH

does not work.  
I'm not quite sure how to suggest fixing it ... code, or documentation 
or both.  Here is the details.


Supposedly the PATH is the full path to where your kerberos code is located.
In my case, on solaris 9, which does not provide kerberos5 lib/headers
that I can build against, I obtained the MIT kerberos5 v1.4 code
and compiled it and installed it in a custom location.
   /l/tool/kerberos5/1.4/001.01

Then from a distclean code base I configured with

     --with-kerberos=/l/tool/kerberos5/1.4/001.01

The configure failed to find -lkrb5
which was right there in  /l/tool/kerberos5/1.4/001.01/lib
and there for it did not build auth_krb5

Close examination of the configure file and config.log
shows that -lkrb5 is being searched for in the default library paths
and not in provided kerberos5 path.

I believe this to be a BUG in the autoconf setup for this probe.


By setting LDFLAGS to -L/l/tool/kerberos5/1.4/001.01/lib

and re-running configure from a distclean code base
the -lkrb5 is found in /l/tool/kerberos5/1.4/001.01/lib
and the AUTH_KRB5 option is set.


HOWEVER, the compile now fails, because the compile of auth_krb5
does not include the /l/tool/kerberos5/1.4/001.01/include directory.

By setting  CCFLAGS to
"-I/l/tool/kerberos5/1.4/001.01/include -L/l/tool/kerberos5/1.4/001.01/lib"

and re-running configure from a distclean code base
now the configure works, and the compile works.


HOWEVER, the auth_krb5 binary won't run when manually tested
because it can't find the kerberos .so libraries.  (ldd is helpful here)
This can be addresses by setting the LD_LIBRARY_PATH

HOWEVER, this is not a fix, because inndstart strips this from the environment
so that innd does not see it, and hence nnrpd does not see it
and hence when auth_krb5 is called there is no LD_LIBRARY_PATH.

The only solution I have so far (which works)
is to use a wrapper shell script that sets LD_LIBRARY_PATH
and then exec-s auth_krb5

====
#!/usr/bin/ksh
LD_LIBRARY_PATH=/l/tool/kerberos5/1.4/001.01/lib  export LD_LIBRARY_PATH
exec /full/path/to/auth_krb5
====

QUESTION:  Am I missing something?
QUESTION:  what might I contribute that would save others this pain?

--
Regards,
Todd Olson
Cornell University



More information about the inn-workers mailing list