[15679] in Kerberos_V5_Development

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

Re: Proper way to do logging (KDC) from preauth plugin?

daemon@ATHENA.MIT.EDU (Greg Hudson)
Thu Apr 15 18:18:27 2010

From: Greg Hudson <ghudson@mit.edu>
To: Jeff Blaine <jblaine@kickflop.net>
In-Reply-To: <4BC7660C.7070609@kickflop.net>
Date: Thu, 15 Apr 2010 18:18:21 -0400
Message-ID: <1271369901.23242.537.camel@ray>
Mime-Version: 1.0
Cc: "krbdev@mit.edu" <krbdev@mit.edu>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu

On Thu, 2010-04-15 at 15:16 -0400, Jeff Blaine wrote:
> Hmm.  I'm at a loss.

It worked for me... once I correctly got my preauth module linked
against the same libkadm5srv_mit as the KDC.  If you manage to load in
two different libraries, the one used by the preauth module won't have a
filled-in log_control structure.

If you attach to the krb5kdc process with gdb, you should be able to
recognize improper linkage by staring at the "Reading symbols from"
lines.  When I had it wrong, mine looked like:

[...]
Reading symbols from /me/krb5/build/lib/libkadm5srv_mit.so.7...done.
Loaded symbols for /me/krb5/build/lib/libkadm5srv_mit.so.7
[...]
Reading symbols from /me/krb5/build/util/fakedest/me/inst/lib/krb5/plugins/preauth/encrypted_challenge.so...done.
Loaded symbols for /me/krb5/build/util/fakedest/me/inst/lib/krb5/plugins/preauth/encrypted_challenge.so
Reading symbols from /usr/lib/libkadm5srv.so.5...done.
Loaded symbols for /usr/lib/libkadm5srv.so.5
[...]

(See also Nico's recent discussion of library global state and DLL hell.
Here's a place where we use library global state and it can bite
people.)


_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

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