Project review: kuserok/an2ln pluggable interface
Greg Hudson
ghudson at MIT.EDU
Wed Feb 6 16:57:48 EST 2013
Simo suggested on IRC that the an2ln_all method could be eliminated from
the interface if we take an2ln_types == NULL as a cue that the module
wants to intercept all aname-to-lname operations. I've edited the
project proposal accordingly. Some of my answers to Sumit change
because of this reivision:
On 02/06/2013 04:25 AM, Sumit Bose wrote:
> Can a module implement both an2ln_all and an2ln?
Not any more. (However, note that a shared object can implement
multiple modules.)
> I guess module registration will fail if an2ln is implemented without
> an2ln_types and if an2ln_types is implemented without an2ln?
Implementing an2ln without setting an2ln_types now has a meaning, so
that wouldn't cause module registration to fail.
Setting an2ln_types without implementing an2ln is still invalid.
Normally speaking, if a module doesn't implement a mandatory method, we
don't check for that during module registration; we just call the
function pointer and crash. Although there's an argument for being
defensive against bad modules, there's also an argument against it. We
can't really prevent a plugin module from crashing the process, after all.
More information about the krbdev
mailing list