svn rev #23915: branches/plugins/src/ config/ lib/ lib/crypto/crypto_tests/ ...

tsitkova@MIT.EDU tsitkova at MIT.EDU
Wed Apr 21 15:03:41 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=23915
Commit By: tsitkova
Log Message:
Moved plugin initialization into krb5int_lib_init from the applications. (It is still needed in the appl, e.g. t_prng, where krb5 lib is not initialized). 
Make check works until it reaches ./t_gssapi.py



Changed Files:
U   branches/plugins/src/Makefile.in
U   branches/plugins/src/config/pre.in
U   branches/plugins/src/lib/Makefile.in
U   branches/plugins/src/lib/crypto/crypto_tests/Makefile.in
U   branches/plugins/src/lib/crypto/crypto_tests/t_prng.c
U   branches/plugins/src/lib/krb5/Makefile.in
U   branches/plugins/src/lib/krb5/krb5_libinit.c
U   branches/plugins/src/plugin_core/Makefile.in
U   branches/plugins/src/plugin_core/impl/Makefile.in
U   branches/plugins/src/plugin_core/impl/plugin_default_factory.c
U   branches/plugins/src/plugin_core/impl/plugin_default_factory.h
A   branches/plugins/src/plugin_core/libplugin_core.exports
D   branches/plugins/src/plugin_core/plugin_core.exports
U   branches/plugins/src/plugins/prng/Makefile.in
U   branches/plugins/src/plugins/prng/plugin_yarrow/Makefile.in
U   branches/plugins/src/plugins/prng/plugin_yarrow/deps
D   branches/plugins/src/plugins/prng/prng.exports
Modified: branches/plugins/src/Makefile.in
===================================================================
--- branches/plugins/src/Makefile.in	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/Makefile.in	2010-04-21 19:03:41 UTC (rev 23915)
@@ -7,8 +7,7 @@
 #	plugins/preauth/wpse
 #	plugins/preauth/cksum_body
 #	plugins/authdata/greet
-SUBDIRS=util include plugins/prng   plugin_core  lib \
-	plugins/prng/plugin_yarrow   plugin_core/impl   \
+SUBDIRS=util include plugin_core   plugins/prng lib \
 	@ldap_plugin_dir@ \
 	plugins/kdb/db2 \
 	plugins/preauth/pkinit \
@@ -18,6 +17,8 @@
 BUILDTOP=$(REL)$(C)
 LOCALINCLUDES = -I$(srcdir) 
 
+#	plugins/prng/plugin_yarrow   
+
 SRCS =  
 HDRS = 
 

Modified: branches/plugins/src/config/pre.in
===================================================================
--- branches/plugins/src/config/pre.in	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/config/pre.in	2010-04-21 19:03:41 UTC (rev 23915)
@@ -324,8 +324,8 @@
 GSS_DEPLIB	= $(TOPLIBD)/libgssapi_krb5$(DEPLIBEXT)
 KRB5_DEPLIB	= $(TOPLIBD)/libkrb5$(DEPLIBEXT)
 CRYPTO_DEPLIB	= $(TOPLIBD)/libk5crypto$(DEPLIBEXT)
-PLUGIN_CORE_DEPLIB	= $(TOPLIBD)/../plugin_core/plugin_core$(DEPLIBEXT)
-PLUGIN_PRNG_DEPLIB	= $(TOPLIBD)/../plugins/prng/plugin_prng$(DEPLIBEXT)
+PLUGIN_CORE_DEPLIB	= $(TOPLIBD)/../plugin_core/libplugin_core$(DEPLIBEXT)
+PLUGIN_PRNG_DEPLIB	= $(TOPLIBD)/../plugins/prng/libplugin_prng.a
 COM_ERR_DEPLIB	= $(COM_ERR_DEPLIB- at COM_ERR_VERSION@)
 COM_ERR_DEPLIB-sys = # empty
 COM_ERR_DEPLIB-k5 = $(TOPLIBD)/libcom_err$(DEPLIBEXT)

Modified: branches/plugins/src/lib/Makefile.in
===================================================================
--- branches/plugins/src/lib/Makefile.in	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/lib/Makefile.in	2010-04-21 19:03:41 UTC (rev 23915)
@@ -1,5 +1,5 @@
 mydir=lib
-SUBDIRS=crypto krb5 gssapi rpc kdb kadm5 apputils
+SUBDIRS=crypto ../plugins/prng/plugin_yarrow ../plugin_core/impl krb5 gssapi rpc kdb kadm5 apputils
 BUILDTOP=$(REL)..
 
 all-unix::

Modified: branches/plugins/src/lib/crypto/crypto_tests/Makefile.in
===================================================================
--- branches/plugins/src/lib/crypto/crypto_tests/Makefile.in	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/lib/crypto/crypto_tests/Makefile.in	2010-04-21 19:03:41 UTC (rev 23915)
@@ -15,11 +15,7 @@
 DEFS=
 
 PLUGINS_LIBS = \
-	../../../plugin_core/impl/plugin_default_manager.so 	\
-	../../../plugin_core/impl/plugin_default_factory.so 	\
-	../../../plugins/prng/plugin_yarrow/plugin_prng_impl.so \
-	../../../plugins/prng/plugin_yarrow/yarrow.so 	\
-	../../../plugins/prng/plugin_yarrow/ycipher.so
+	$(srcdir)/../../libplugin_impl.a $(srcdir)/../../libplugin_yarrow.a
 
 EXTRADEPSRCS=\
 	$(srcdir)/t_nfold.c	\
@@ -51,15 +47,15 @@
 # checksums that interoperate.
 #  check-unix:: t_nfold t_encrypt t_prf t_prng t_hmac \
 #
-check-unix:: t_prng t_nfold t_encrypt t_hmac t_prf\
+check-unix:: t_encrypt t_prng t_nfold t_encrypt t_hmac t_prf\
 		t_cksum4 t_cksum5 \
 		aes-test  \
 		t_mddriver4 t_mddriver \
 		t_crc t_cts t_short
+	$(RUN_SETUP) $(VALGRIND) ./t_encrypt
 	$(RUN_SETUP) $(VALGRIND) ./t_prng <$(srcdir)/t_prng.seed >t_prng.output && \
 	diff t_prng.output $(srcdir)/t_prng.expected
 	$(RUN_SETUP) $(VALGRIND) ./t_nfold
-	$(RUN_SETUP) $(VALGRIND) ./t_encrypt
 	$(RUN_SETUP) $(VALGRIND) ./t_hmac
 	$(RUN_SETUP) $(VALGRIND) ./t_prf <$(srcdir)/t_prf.in >t_prf.output
 	diff t_prf.output $(srcdir)/t_prf.expected

Modified: branches/plugins/src/lib/crypto/crypto_tests/t_prng.c
===================================================================
--- branches/plugins/src/lib/crypto/crypto_tests/t_prng.c	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/lib/crypto/crypto_tests/t_prng.c	2010-04-21 19:03:41 UTC (rev 23915)
@@ -48,6 +48,7 @@
     krb5_data input, output;
     unsigned int source_id, seed_length;
     unsigned int i;
+//#if 0
     plugin_manager* default_manager;
     const char conf_path[] = "plugin_conf.yml";
 
@@ -56,7 +57,7 @@
 
         plugin_manager_configure(conf_path);
         plugin_manager_start();
-
+//#endif
     while (1) {
         /* Read source*/
         if (scanf ("%u", &source_id ) == EOF )

Modified: branches/plugins/src/lib/krb5/Makefile.in
===================================================================
--- branches/plugins/src/lib/krb5/Makefile.in	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/lib/krb5/Makefile.in	2010-04-21 19:03:41 UTC (rev 23915)
@@ -1,9 +1,16 @@
 mydir=lib/krb5
 BUILDTOP=$(REL)..$(S)..
-LOCALINCLUDES = -I$(srcdir)/ccache -I$(srcdir)/keytab -I$(srcdir)/rcache -I$(srcdir)/os -I$(srcdir)/unicode
+LOCALINCLUDES = -I$(srcdir)/ccache -I$(srcdir)/keytab -I$(srcdir)/rcache -I$(srcdir)/os -I$(srcdir)/unicode	\
+	-I$(srcdir)/../../plugin_core/ -I$(srcdir)/../../plugins/prng/ -I$(srcdir)/../../plugin_core/impl
+
 SUBDIRS= error_tables asn.1 ccache keytab krb os rcache unicode
 DEFS=
 
+PLUGINS_LIBS = \
+	../../plugin_core/impl/libplugin_impl.a $(PLUGIN_CORE_DEPLIB) 	\
+	../../plugins/prng/plugin_yarrow/libplugin_yarrow.a
+
+
 ##DOSBUILDTOP = ..\..
 ##DOSLIBNAME=$(OUTPRE)krb5.lib
 ##DOSOBJFILEDEP=$(OUTPRE)asn1.lst $(OUTPRE)ccache.lst $(OUTPRE)err_tbls.lst $(OUTPRE)keytab.lst $(OUTPRE)krb.lst $(OUTPRE)os.lst $(OUTPRE)posix.lst $(OUTPRE)rcache.lst $(OUTPRE)krb5.lst $(OUTPRE)unicode.lst
@@ -54,8 +61,8 @@
 RELDIR=krb5
 SHLIB_EXPDEPS = \
 	$(TOPLIBD)/libk5crypto$(SHLIBEXT) \
-	$(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB)
-SHLIB_EXPLIBS=-lk5crypto -lcom_err $(SUPPORT_LIB) @GEN_LIB@ $(LIBS)
+	$(COM_ERR_DEPLIB) $(SUPPORT_DEPLIB) 
+SHLIB_EXPLIBS=-lk5crypto -lcom_err $(SUPPORT_LIB) @GEN_LIB@ $(LIBS)   $(PLUGINS_LIBS)
 SHLIB_DIRS=-L$(TOPLIBD)
 SHLIB_RDIRS=$(KRB5_LIBDIR)
 
@@ -63,8 +70,10 @@
 
 all-windows::
 
-clean-unix:: clean-liblinks clean-libs clean-libobjs
+clean-unix:: clean-liblinks clean-libs clean-libobjs 
 
+	
+
 clean-windows::
 	$(RM) $(OUTPRE)krb5.lib krb5.bak
 

Modified: branches/plugins/src/lib/krb5/krb5_libinit.c
===================================================================
--- branches/plugins/src/lib/krb5/krb5_libinit.c	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/lib/krb5/krb5_libinit.c	2010-04-21 19:03:41 UTC (rev 23915)
@@ -15,7 +15,10 @@
 #include "kt-int.h"
 #include "rc-int.h"
 #include "os-proto.h"
+#include <plugin_default_manager.h>
+#include <plugin_prng.h>
 
+
 /*
  * Initialize the Kerberos v5 library.
  */
@@ -27,6 +30,8 @@
 int krb5int_lib_init(void)
 {
     int err;
+    plugin_manager* default_manager;
+    const char conf_path[] = "/tmp/plugin_conf.yml";
 
     krb5int_set_error_info_callout_fn (error_message);
 
@@ -39,7 +44,6 @@
     add_error_table(&et_kdb5_error_table);
     add_error_table(&et_asn1_error_table);
     add_error_table(&et_k524_error_table);
-
     err = krb5int_rc_finish_init();
     if (err)
         return err;
@@ -51,6 +55,13 @@
     err = krb5int_cc_initialize();
     if (err)
         return err;
+
+    /* Plugin initialization */
+    default_manager = plugin_default_manager_get_instance();
+    set_plugin_manager_instance(default_manager);
+    plugin_manager_configure(conf_path);
+    plugin_manager_start();
+
     err = k5_mutex_finish_init(&krb5int_us_time_mutex);
     if (err)
         return err;

Modified: branches/plugins/src/plugin_core/Makefile.in
===================================================================
--- branches/plugins/src/plugin_core/Makefile.in	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/plugin_core/Makefile.in	2010-04-21 19:03:41 UTC (rev 23915)
@@ -1,12 +1,13 @@
 mydir=plugin_core
 BUILDTOP=$(REL)..
+RELDIR=../plugin_core
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 DEFS=
 
 LOCALINCLUDES = -I$(srcdir)/include/krb5  -I$(srcdir)/. -I$(srcdir)/../plugins/prng
 
-LIBBASE=plugin_core
+LIBBASE= plugin_core
 LIBMAJOR=0
 LIBMINOR=0
 SO_EXT=.so
@@ -15,7 +16,7 @@
 
 SHLIB_DIRS=-L$(TOPLIBD)
 SHLIB_RDIRS=$(KRB5_LIBDIR)
-STOBJLISTS=OBJS.ST ../plugins/prng/OBJS.SH  
+STOBJLISTS=OBJS.ST
 
 SHLIB_EXPLIBS=  $(LIBS_UTILS)
  
@@ -23,14 +24,13 @@
 
 SRCS= plugin_manager.c plugin_factory.c yaml_parser.c
 
-# all-unix:: all-libobjs
 all-unix:: all-liblinks
 install-unix:: install-libs
-clean-unix:: clean-libs clean-libobjs
+clean-unix:: clean-libs clean-libobjs clean-liblinks
 
 clean::
 	$(RM) lib$(LIBBASE)$(SO_EXT)
 
- at libnover_frag@
+ at lib_frag@
 @libobj_frag@
 

Modified: branches/plugins/src/plugin_core/impl/Makefile.in
===================================================================
--- branches/plugins/src/plugin_core/impl/Makefile.in	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/plugin_core/impl/Makefile.in	2010-04-21 19:03:41 UTC (rev 23915)
@@ -1,5 +1,6 @@
 mydir=impl
 BUILDTOP=$(REL)../..
+RELDIR=../plugin_core/impl
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 DEFS=
@@ -8,22 +9,26 @@
 		-I$(srcdir)/../../plugins/prng/plugin_yarrow -I$(srcdir)/../../plugins/prng 	\
 		-I$(srcdir)/..
 
- 
+LIBBASE=plugin_impl
+
 STLIBOBJS= plugin_default_factory.o plugin_default_manager.o
 
-OBJS=\
-	$(OUTPRE)plugin_default_manager.$(OBJEXT) \
-	$(OUTPRE)plugin_default_factory.$(OBJEXT) 
-
 SRCS= plugin_default_factory.c plugin_default_manager.c
 
-all-unix:: all-libobjs
+STOBJLISTS=OBJS.ST
 
-includes:: depend
+LIBS_UTILS = ../plugin_core$(SO_EXT) \
+	../../plugins/prng/plugin_yarrow/plugin_prng_impl$(SO_EXT) 	\
+	../../plugins/prng/plugin_yarrow/ycipher$(SO_EXT) 		\
+	../../plugins/prng/plugin_yarrow/yarrow$(SO_EXT) 
 
-depend:: $(SRCS)
+SHLIB_EXPLIBS=  $(LIBS_UTILS) $(CRYPTO_DEPLIB) $(SUPPORT_DEPLIB)
 
-clean-unix:: clean-libobjs
+all-unix:: all-liblinks
+clean-unix:: clean-liblinks clean-libs clean-libobjs
+install-unix:: install-libs
 
+
+ at libpriv_frag@
+ at lib_frag@
 @libobj_frag@
-

Modified: branches/plugins/src/plugin_core/impl/plugin_default_factory.c
===================================================================
--- branches/plugins/src/plugin_core/impl/plugin_default_factory.c	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/plugin_core/impl/plugin_default_factory.c	2010-04-21 19:03:41 UTC (rev 23915)
@@ -13,20 +13,19 @@
 
 static plugin_factory* _default_factory_instance = NULL;
 
-static plugin_descr _table[] = {
+static plugin_descr  plugin_default_factory_table[] = {
         {"plugin_yarrow_prng", plugin_yarrow_prng_create},
         //{"plugin_simple_prng", plugin_simple_prng_create},
         {"plugin_ldap_audit", NULL},
         {NULL,NULL}
 };
 
-
 /* Factory API implementation */
 static void
 _get_factory_content (const char* container[]) {
     plugin_descr *ptr = NULL;
     int i = 0;
-    for( ptr = _table; ptr->plugin_name != NULL; ptr++,i++) {
+    for( ptr = plugin_default_factory_table; ptr->plugin_name != NULL; ptr++,i++) {
         container[i] = ptr->plugin_name;
     }
 }
@@ -38,7 +37,7 @@
     plugin_descr *ptr = NULL;
 
     handle.api = NULL;
-    for( ptr = _table; ptr->plugin_name != NULL; ptr++) {
+    for( ptr = plugin_default_factory_table; ptr->plugin_name != NULL; ptr++) {
         if (strcmp(ptr->plugin_name, plugin_name) == 0) {
             handle = ptr->plugin_creator();
             break;

Modified: branches/plugins/src/plugin_core/impl/plugin_default_factory.h
===================================================================
--- branches/plugins/src/plugin_core/impl/plugin_default_factory.h	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/plugin_core/impl/plugin_default_factory.h	2010-04-21 19:03:41 UTC (rev 23915)
@@ -3,12 +3,14 @@
  *
  */
 
-#ifndef SIMPLE_PLUGIN_FACTORY_H_
-#define SIMPLE_PLUGIN_FACTORY_H_
+#ifndef PLUGIN_DEFAULT_FACTORY_H_
+#define PLUGIN_DEFAULT_FACTORY_H_
 
 #include <plugin_factory.h>
+#include "plugin_prng_impl.h"
 
+
 factory_handle plugin_default_factory_get_instance(void);
 
 
-#endif /* SIMPLE_PLUGIN_FACTORY_H_ */
+#endif /* PLUGIN_DEFAULT_FACTORY_H_ */

Copied: branches/plugins/src/plugin_core/libplugin_core.exports (from rev 23904, branches/plugins/src/plugin_core/plugin_core.exports)
===================================================================
--- branches/plugins/src/plugin_core/libplugin_core.exports	                        (rev 0)
+++ branches/plugins/src/plugin_core/libplugin_core.exports	2010-04-21 19:03:41 UTC (rev 23915)
@@ -0,0 +1,8 @@
+get_factory_content
+plugin_manager_configure
+plugin_manager_get_service
+set_plugin_manager_instance
+plugin_manager_start
+plugin_manager_stop
+create_api
+parse_file


Added: svn:mergeinfo
   + 

Modified: branches/plugins/src/plugins/prng/Makefile.in
===================================================================
--- branches/plugins/src/plugins/prng/Makefile.in	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/plugins/prng/Makefile.in	2010-04-21 19:03:41 UTC (rev 23915)
@@ -1,26 +1,22 @@
 mydir=plugins/prng
 BUILDTOP=$(REL)../..
-KRB5_RUN_ENV = @KRB5_RUN_ENV@
-KRB5_CONFIG_SETUP =
+RELDIR=../plugins/prng
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
-MODULE_INSTALL_DIR = 
-DEFS=@DEFS@
+DEFS=
 
 LOCALINCLUDES = -I../../include/krb5 -I. -I../../plugin_core
 
-STLIBOBJS=  plugin_prng.o  
-OBJS= $(OUTPRE)plugin_prng.$(OBJEXT)
-SRCS=  plugin_prng.c  
+LIBBASE=plugin_prng
 
-#all-unix:: all-liblinks
-all-unix:: all-libobjs
+STLIBOBJS= plugin_prng.o  
+SRCS= plugin_prng.c  
+STOBJLISTS=OBJS.ST
 
-includes:: depend
+all-unix:: all-liblinks
+clean-unix:: clean-liblinks clean-libs clean-libobjs
+install-unix:: install-libs
 
-depend:: $(SRCS)
-
-clean-unix::  clean-libobjs
-
+ at libpriv_frag@
+ at lib_frag@
 @libobj_frag@
-

Modified: branches/plugins/src/plugins/prng/plugin_yarrow/Makefile.in
===================================================================
--- branches/plugins/src/plugins/prng/plugin_yarrow/Makefile.in	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/plugins/prng/plugin_yarrow/Makefile.in	2010-04-21 19:03:41 UTC (rev 23915)
@@ -1,5 +1,6 @@
 mydir=plugins/prng/plugin_yarrow
 BUILDTOP=$(REL)../../..
+RELDIR=../plugins/prng/plugin_yarrow
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 DEFS=
@@ -9,29 +10,21 @@
 		-I$(srcdir)/../../../lib/crypto/@CRYPTO_IMPL@/sha1    \
 		-I$(srcdir)/../../../lib/crypto/@CRYPTO_IMPL@/enc_provider
 
+LIBBASE=plugin_yarrow
 
-
-STLIBOBJS=\
-	yarrow.o \
-	ycipher.o \
-	plugin_prng_impl.o
-
-OBJS=\
-	$(OUTPRE)yarrow.$(OBJEXT) \
-	$(OUTPRE)ycipher.$(OBJEXT) \
-	$(OUTPRE)plugin_prng_impl.$(OBJEXT)
-
+STLIBOBJS= yarrow.o  ycipher.o  plugin_prng_impl.o
 SRCS=\
 	$(srcdir)/yarrow.c \
 	$(srcdir)/ycipher.c \
 	$(srcdir)/plugin_prng_impl.c
 
-all-unix:: all-libobjs
+STOBJLISTS=OBJS.ST
 
-includes:: depend
+all-unix:: all-liblinks
+clean-unix:: clean-liblinks clean-libs clean-libobjs
+install-unix:: install-libs
 
-depend:: $(SRCS)
 
-clean-unix:: clean-libobjs
-
+ at libpriv_frag@
+ at lib_frag@
 @libobj_frag@

Modified: branches/plugins/src/plugins/prng/plugin_yarrow/deps
===================================================================
--- branches/plugins/src/plugins/prng/plugin_yarrow/deps	2010-04-20 22:37:22 UTC (rev 23914)
+++ branches/plugins/src/plugins/prng/plugin_yarrow/deps	2010-04-21 19:03:41 UTC (rev 23915)
@@ -29,5 +29,7 @@
   $(BUILDTOP)/include/krb5/krb5.h $(COM_ERR_DEPS) $(top_srcdir)/plugins/prng/plugin_yarrow/plugin_prng_impl.h \
   $(top_srcdir)/plugin_core/plugin_manager.h \
   $(top_srcdir)/plugin_core/plugin_factory.h \
+  $(srcdir)/../../../lib/crypto/builtin/yhash.h \
+  $(srcdir)/../../../lib/crypto/builtin/enc_provider/enc_provider.h \
   plugin_prng_impl.c
 

Property changes on: branches/plugins/src/plugin_core/libplugin_core.exports
___________________________________________________________________



More information about the cvs-krb5 mailing list