From 8f09bfe9fa0e51c2bd1e2f533eb25655e88ca43b Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 7 Mar 2006 20:45:24 +0000 Subject: Merge from plugin branch Add plugin support: - plugin routines in support library (may break windows build!) - plugin support in KDC location code - sample Python-based plugin for KDC location, not built without tweaking sources - changed service location interface to use an enum instead of passing profile string and DNS strings and port numbers - changed pathnames for plugin locations, including kdb back end - remove locate_service from accessor API Also, do build shared libraries for Darwin just like any other UNIX box. Not present yet: - use new plugin interface for kdb back end - Windows support - Mac bundle support (but dlopen support works) - search path for libkrb5 plugins (only one hard-coded directory for now) - sorting of plugin collections for predictable ordering See the various ChangeLogs for specifics. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17706 dc483132-0cff-0310-8789-dd5450dbe970 --- src/include/k5-plugin.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/include/k5-plugin.h (limited to 'src/include/k5-plugin.h') diff --git a/src/include/k5-plugin.h b/src/include/k5-plugin.h new file mode 100644 index 0000000000..a49c79ad24 --- /dev/null +++ b/src/include/k5-plugin.h @@ -0,0 +1,30 @@ +#ifndef K5_PLUGIN_H_INCLUDED +#define K5_PLUGIN_H_INCLUDED +#include "krb5.h" + +enum locate_service_type { + locate_service_kdc = 1, + locate_service_master_kdc, + locate_service_kadmin, + locate_service_krb524, + locate_service_kpasswd +}; + +struct krb5plugin_service_locate_ftable { + int vmajor, vminor; + /* Per-context setup and teardown. Returned void* blob is + private to the plugin. */ + krb5_error_code (*init)(krb5_context, void **); + void (*fini)(void *); + /* Callback function returns non-zero if the plugin function + should quit and return; this may be because of an error, or may + indicate we've already contacted the service, whatever. The + lookup function should only return an error if it detects a + problem, not if the callback function tells it to quit. */ + krb5_error_code (*lookup)(void *, + enum locate_service_type svc, const char *realm, + int socktype, int family, + int (*cbfunc)(void *,int,struct sockaddr *), + void *cbdata); +}; +#endif -- cgit