summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2009-06-08 10:01:57 +0000
committerGreg Hudson <ghudson@mit.edu>2009-06-08 10:01:57 +0000
commitaf44e8dee9b5bfffb05eb5a9b89c79c02ab7c2ff (patch)
tree80783e20aa0a982df33d64b6fbba75f63c03ab18 /src/plugins
parent2bb6a5e140cb3d53ff454e624b5fe8aa1d53409f (diff)
downloadkrb5-af44e8dee9b5bfffb05eb5a9b89c79c02ab7c2ff.tar.gz
krb5-af44e8dee9b5bfffb05eb5a9b89c79c02ab7c2ff.tar.xz
krb5-af44e8dee9b5bfffb05eb5a9b89c79c02ab7c2ff.zip
Restore limited support for static linking
Add enough static linking support to run the test suite without shared libraries, to facilitate gcov and other kinds of instrumentation. The necessary changes include: * Undo some of the changes which removed static linking support, and cannibalize the defunct krb5_force_static conditional block in aclocal.m4. * Add --enable-static-only configure option. * For plugins, use a different symbol name for static and dynamic builds, via a macro in k5plugin.h. * Add build machinery for building static libraries for plugins (somewhat grotty due to the difference in names). * Move plugin subdirs earlier in SUBDIRS in src/Makefile.in. * Make the in-tree KDB5 plugins dependencies of libkdb5 in a static build (aclocal.m4 has to know what they are). * In kdb5.c, cannibalize the broken _KDB5_STATIC_LINK support to allow "loading" of statically linked plugin libraries. Preauth, authdata, locate, and GSSAPI plugins are not handled by this change, as they are not currently necessary to the test suite. Supporting GSSAPI plugins may be a bit tricky but the others should be straightforward if they become needed. $(STLIBEXT) changes from .a-nobuild to .a in a normal shared build as a result of these changes (except on AIX where aclocal.m4 changes it). This does not seem to be important as we avoid selecting the static library for building via other means. ticket: 6510 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22406 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/authdata/greet/Makefile.in2
-rw-r--r--src/plugins/kdb/db2/Makefile.in2
-rw-r--r--src/plugins/kdb/db2/db2_exp.c2
-rw-r--r--src/plugins/kdb/ldap/Makefile.in2
-rw-r--r--src/plugins/kdb/ldap/ldap_exp.c2
-rw-r--r--src/plugins/locate/python/Makefile.in2
-rw-r--r--src/plugins/preauth/encrypted_challenge/Makefile.in2
-rw-r--r--src/plugins/preauth/pkinit/Makefile.in2
-rw-r--r--src/plugins/preauth/pkinit/pkinit_clnt.c6
-rw-r--r--src/plugins/preauth/pkinit/pkinit_srv.c6
10 files changed, 18 insertions, 10 deletions
diff --git a/src/plugins/authdata/greet/Makefile.in b/src/plugins/authdata/greet/Makefile.in
index d88ba5bc4f..1c71c4521a 100644
--- a/src/plugins/authdata/greet/Makefile.in
+++ b/src/plugins/authdata/greet/Makefile.in
@@ -27,7 +27,7 @@ STLIBOBJS= greet_auth.o
SRCS= greet_auth.c
-all-unix:: $(LIBBASE)$(SO_EXT)
+all-unix:: all-liblinks
install-unix:: install-libs
clean-unix:: clean-libs clean-libobjs
diff --git a/src/plugins/kdb/db2/Makefile.in b/src/plugins/kdb/db2/Makefile.in
index c355c37739..dd3045c168 100644
--- a/src/plugins/kdb/db2/Makefile.in
+++ b/src/plugins/kdb/db2/Makefile.in
@@ -68,7 +68,7 @@ STLIBOBJS= \
pol_xdr.o \
db2_exp.o
-all-unix:: $(LIBBASE)$(SO_EXT)
+all-unix:: all-liblinks
install-unix:: install-libs
clean-unix:: clean-libs clean-libobjs
diff --git a/src/plugins/kdb/db2/db2_exp.c b/src/plugins/kdb/db2/db2_exp.c
index 5c81624681..85864ac6fe 100644
--- a/src/plugins/kdb/db2/db2_exp.c
+++ b/src/plugins/kdb/db2/db2_exp.c
@@ -220,7 +220,7 @@ hack_cleanup (void)
* Exposed API
*/
-kdb_vftabl kdb_function_table = {
+kdb_vftabl PLUGIN_SYMBOL_NAME(krb5_db2, kdb_function_table) = {
1, /* major version number 1 */
0, /* minor version number 0 */
/* init_library */ hack_init,
diff --git a/src/plugins/kdb/ldap/Makefile.in b/src/plugins/kdb/ldap/Makefile.in
index ae80287371..7f45c15dba 100644
--- a/src/plugins/kdb/ldap/Makefile.in
+++ b/src/plugins/kdb/ldap/Makefile.in
@@ -38,7 +38,7 @@ SRCS= $(srcdir)/ldap_exp.c
STOBJLISTS=OBJS.ST
STLIBOBJS= ldap_exp.o
-all-unix:: $(LIBBASE)$(SO_EXT)
+all-unix:: all-liblinks
install-unix:: install-libs
clean-unix:: clean-libs clean-libobjs
diff --git a/src/plugins/kdb/ldap/ldap_exp.c b/src/plugins/kdb/ldap/ldap_exp.c
index dcfe93cf9e..18a89fd619 100644
--- a/src/plugins/kdb/ldap/ldap_exp.c
+++ b/src/plugins/kdb/ldap/ldap_exp.c
@@ -45,7 +45,7 @@
* Exposed API
*/
-kdb_vftabl kdb_function_table = {
+kdb_vftabl PLUGIN_SYMBOL_NAME(krb5_ldap, kdb_function_table) = {
1, /* major version number 1 */
0, /* minor version number 0 */
/* init_library */ krb5_ldap_lib_init,
diff --git a/src/plugins/locate/python/Makefile.in b/src/plugins/locate/python/Makefile.in
index 175bf6ef0d..1f5f9e2144 100644
--- a/src/plugins/locate/python/Makefile.in
+++ b/src/plugins/locate/python/Makefile.in
@@ -21,7 +21,7 @@ SRCS= \
STOBJLISTS=OBJS.ST
STLIBOBJS= py-locate.o
-all-unix:: $(LIBBASE)$(SO_EXT)
+all-unix:: all-liblinks
install-unix:: install-libs
clean-unix:: clean-libs clean-libobjs
diff --git a/src/plugins/preauth/encrypted_challenge/Makefile.in b/src/plugins/preauth/encrypted_challenge/Makefile.in
index 8f6a8a640b..57c0392f49 100644
--- a/src/plugins/preauth/encrypted_challenge/Makefile.in
+++ b/src/plugins/preauth/encrypted_challenge/Makefile.in
@@ -29,7 +29,7 @@ STLIBOBJS=encrypted_challenge_main.o
SRCS= $(srcdir)/encrypted_challenge_main.c
-all-unix:: $(LIBBASE)$(SO_EXT)
+all-unix:: all-liblinks
install-unix:: install-libs
clean-unix:: clean-libs clean-libobjs
diff --git a/src/plugins/preauth/pkinit/Makefile.in b/src/plugins/preauth/pkinit/Makefile.in
index f066454cab..b6c4ea5098 100644
--- a/src/plugins/preauth/pkinit/Makefile.in
+++ b/src/plugins/preauth/pkinit/Makefile.in
@@ -46,7 +46,7 @@ SRCS= \
$(srcdir)/pkinit_matching.c \
$(srcdir)/pkinit_crypto_openssl.c
-all-unix:: $(LIBBASE)$(SO_EXT)
+all-unix:: all-liblinks
install-unix:: install-libs
clean-unix:: clean-libs clean-libobjs
diff --git a/src/plugins/preauth/pkinit/pkinit_clnt.c b/src/plugins/preauth/pkinit/pkinit_clnt.c
index f7cd99890c..40ec8c058b 100644
--- a/src/plugins/preauth/pkinit/pkinit_clnt.c
+++ b/src/plugins/preauth/pkinit/pkinit_clnt.c
@@ -1489,7 +1489,11 @@ pkinit_client_gic_opt(krb5_context context,
return 0;
}
-struct krb5plugin_preauth_client_ftable_v1 preauthentication_client_1 = {
+/* Only necessary for static plugin linking support. */
+#include "k5-plugin.h"
+
+struct krb5plugin_preauth_client_ftable_v1
+PLUGIN_SYMBOL_NAME(krb5_preauth, preauthentication_client_1) = {
"pkinit", /* name */
supported_client_pa_types, /* pa_type_list */
NULL, /* enctype_list */
diff --git a/src/plugins/preauth/pkinit/pkinit_srv.c b/src/plugins/preauth/pkinit/pkinit_srv.c
index 031752974c..5942c91b16 100644
--- a/src/plugins/preauth/pkinit/pkinit_srv.c
+++ b/src/plugins/preauth/pkinit/pkinit_srv.c
@@ -1409,7 +1409,11 @@ pkinit_fini_kdc_req_context(krb5_context context, void *ctx)
free(reqctx);
}
-struct krb5plugin_preauth_server_ftable_v1 preauthentication_server_1 = {
+/* Only necessary for static plugin linking support. */
+#include "k5-plugin.h"
+
+struct krb5plugin_preauth_server_ftable_v1
+PLUGIN_SYMBOL_NAME(krb5_pkinit, preauthentication_server_1) = {
"pkinit", /* name */
supported_server_pa_types, /* pa_type_list */
pkinit_server_plugin_init, /* (*init_proc) */