Branch to host a new plugins architecture work

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@23887 dc483132-0cff-0310-8789-dd5450dbe970
Branch for new plugin architecture work

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@23889 dc483132-0cff-0310-8789-dd5450dbe970
New plugin architecture code -  first draft.
This design provides the following advantages:

1. Simple and clear additions of new plugin APIs and new implementations of the existing plugins
2. Handle both static and dynamic plugins
3. Handle two types of plugins: Listener and Service
4. Uniform way to supply parameters for plugin configuration
5. Possible versioning of configuration
6. Potentially, configuration file  may contain hash values for the library validity verification
7. Tables of functions are created during make.

It was tested by implementing yarrow as PRNG plugin. (There is also a bogus plugin_prng_os implementation which uses system rand calls just for the demonstration purpose)
t_prng and all other tests in crypto_tests work (need to run "make check" from crypto_tests dir)
This particular version suggests using plugin configuration file in yaml format. It can be alternated by hardcoded or any other configuration.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@23902 dc483132-0cff-0310-8789-dd5450dbe970
Add missing files

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@23903 dc483132-0cff-0310-8789-dd5450dbe970
renamed factory_handle type

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@23904 dc483132-0cff-0310-8789-dd5450dbe970
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

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@23915 dc483132-0cff-0310-8789-dd5450dbe970
For the experiment and as a proof of the concept, implement preauth/encrypted_challenge server side as a new plugin under the new arch.
This commit is for plugin implementation and initialization only. Next step is to invoke the code in kdc.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@23923 dc483132-0cff-0310-8789-dd5450dbe970
Add omitted in r23923 files

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@23924 dc483132-0cff-0310-8789-dd5450dbe970
Build libs/tests with libencrypted_challenge.a

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@23949 dc483132-0cff-0310-8789-dd5450dbe970
Support plugin configuration in krb5 config format.
Example of plugin section in  krb5.conf:
[plugins]
        plugin_prng = {
                plugin_factory_name = plugin_default_factory
                plugin_factory_type = static
                plugin_name =  plugin_yarrow_prng
                plugin_type = service
        }
        plugin_pa = {
                plugin_factory_name = plugin_default_factory
                plugin_factory_type = static
                plugin_name = plugin_encrypted_challenge_pa
                plugin_type = service
        }

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@23974 dc483132-0cff-0310-8789-dd5450dbe970
Changed the type of "void *data" to " manager_data * data" in plugin_manager.
Also, made path to yaml config file conditional in krb5_libinit.c

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@23975 dc483132-0cff-0310-8789-dd5450dbe970
Moved plugin handle initialization from lib init into krb5_ctx.
At the moment we do not have "default" plugin configuration => needed to update come krb5 config files for "make check" tests to work.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@24064 dc483132-0cff-0310-8789-dd5450dbe970
Moving pl handle into krb5_context. Part II
KDC side works. kinit needs to be linked with old libs to work.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@24079 dc483132-0cff-0310-8789-dd5450dbe970
Added missing files

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@24080 dc483132-0cff-0310-8789-dd5450dbe970
Implementation of yarrow prng as a plugin requires the vast majority of the routines in crypto lib to have a krb5_context as an argument. (This is needed to pass ref to pl_handle.) Unfortunately, it is not the case for the current state of crypto lib. Introducing krb5_context is a very invasive change and might be unsuitable for 1.9 release. So, yarrow is moved from plugins to crypto/krb and is treated as built-in functionality again. 

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@24104 dc483132-0cff-0310-8789-dd5450dbe970
Introduced a new static plugin - password quality validator. It is based on the old/existing built-in pwd verification functionality. ( for proof of the concept and demonstration purposes)

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@24108 dc483132-0cff-0310-8789-dd5450dbe970
To prevent crash in case when conf file does not know about pwd_qlty plugin

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@24116 dc483132-0cff-0310-8789-dd5450dbe970
Added facilities to handle multiple impls of the same static plugins. It is based on plugin_id

As a proof of the concept, the password quality validation plugins were considered.
So, the following happens:
In the krb5.conf we indicate that we potentially want two pwd quality plugins: plugin_pwd_qlty_krb (native MIT kerb code extracted from server_mics.c) and plugin_pwd_qlty_X (bogus,as a matter of fact, almost identical to plugin_pwd_qlty_krb impl).
In the caller, i.e. in passwd_check of lib/kadm5/srv/server_misc.c, we call KRB and X impl's and verify the pwd against both of the policies:
 plugin_manager_get_service(srv_handle->context->pl_handle, "plugin_pwd_qlty", PWD_QLTY_KRB);
 plugin_manager_get_service(srv_handle->context->pl_handle, "plugin_pwd_qlty", PWD_QLTY_X);

(It is proof of the concept.)

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@24135 dc483132-0cff-0310-8789-dd5450dbe970
Added facilities to handle dynamic plugins

For the purpose of demonstration, a new plugin pwd_qlty_DYN was created.
The new section in krb5.conf for dynamic plugins looks as follows
        plugin_list = PQ_DYN
        PQ_DYN = {
                plugin_api = plugin_pwd_qlty
                plugin_factory_name = plugin_dyn_factory
                plugin_factory_type = dynamic
                plugin_name = plugin_pwd_qlty_DYN
                plugin_factory_path = /var/tsitkova/Sources/pl/src/plugin_dynamic/libplugin_dynamic.so
                plugin_id = 33
        }
The test appl is server_misc.c.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@24149 dc483132-0cff-0310-8789-dd5450dbe970
Renamed pl_handle into pl_manager in krb5_context structure

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins@24150 dc483132-0cff-0310-8789-dd5450dbe970