aboutsummaryrefslogtreecommitdiff
path: root/src/lib/kdb/kdb5.c
AgeCommit message (Collapse)AuthorFilesLines
2006-09-16* kdb5.c (kdb_load_library): Make error message a little more accurate.Ken Raeburn1-29/+47
(get_errmsg): New function. Uses errcode_2_string and release_errcode_string functions to copy out an error message from the plugin and store it locally, if the error code supplied is nonzero. Changed other uses of plugin functions to call get_errmsg on returning. (krb5_db_errcode2string): Deleted. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18591 dc483132-0cff-0310-8789-dd5450dbe970
2006-07-18Merge remaining changes from LDAP integration branchKen Raeburn1-2/+3
svn+ssh://svn.mit.edu/krb5/branches/ldap-integ@18333. * plugins/kdb/ldap: New directory. * aclocal.m4 (WITH_LDAP): New macro. (CONFIG_RULES): Invoke it. * configure.in: Test ldap option, maybe configure and generate makefiles for new directories, and set and substitute ldap_plugin_dir. * Makefile.in (SUBDIRS): Add @ldap_plugin_dir@. * kdc/krb5kdc.M, kadmin/server/kadmind.M, kadmin/cli/kadmin.M, config-files/krb5.conf.M: Document LDAP changes (new options, config file entries, etc). * lib/kdb/kdb5.c (kdb_load_library): Put more info in error message. * lib/kadm5/admin.h (KADM5_CPW_FUNCTION, KADM5_RANDKEY_USED, KADM5_CONFIG_PASSWD_SERVER): New macros, disabled for now. (struct _kadm5_config_params): New field kpasswd_server, commented out for now. * lib/krb5/error_tables/kdb5_err.et: Add error codes KRB5_KDB_ACCESS_ERROR, KRB5_KDB_INTERNAL_ERROR, KRB5_KDB_CONSTRAINT_VIOLATION. ticket: 2935 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18334 dc483132-0cff-0310-8789-dd5450dbe970
2006-06-30* kdb_default.c (krb5_def_promote_db): New function.Ken Raeburn1-0/+4
* kdb5.c (kdb_setup_opt_functions): Use it if promote_db is null. * libkdb5.exports: Export krb5_db_promote. ticket: 3964 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18292 dc483132-0cff-0310-8789-dd5450dbe970
2006-06-30New kdb backend operation promote_db, makes a temporary database become theKen Raeburn1-0/+40
live database. New function krb5_db_promote invokes it. ticket: 3964 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18282 dc483132-0cff-0310-8789-dd5450dbe970
2006-05-08kdb_load_library(): SGI compiler requires that when initializing arraysEzra Peisach1-1/+4
at declaration - only constants be used. [filebases]. Code was introduced with 17975 revision. ticket: 3716 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17986 dc483132-0cff-0310-8789-dd5450dbe970
2006-05-04Changed to krb5int_open_plugin_dirs/krb5int_close_plugin_dirs whichAlexandra Ellwood1-50/+44
takes a list of filebases and directories rather than a list of full paths so the caller doesn't have to generate the possibilities themselves. krb5int_open_plugin_dirs will append the possible suffixes for that platform (including no suffix in case there already is one on the file base). Modified the kdb and locate kdc interfaces to use the new API. ticket: 3716 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17975 dc483132-0cff-0310-8789-dd5450dbe970
2006-04-27(DB2_NAME): New macro, adding .so suffix for now.Ken Raeburn1-2/+3
(kdb_get_library_name, kdb_load_library): Use it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17965 dc483132-0cff-0310-8789-dd5450dbe970
2006-04-25Change kdb plugin code to use the new plugin support instead ofKen Raeburn1-19/+24
directly calling dlopen and friends. Change the test config files to refer to "db2.so" instead of "db2". git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17961 dc483132-0cff-0310-8789-dd5450dbe970
2006-04-25Change name of kdb function-table symbol from being derived from theKen Raeburn1-3/+1
name of the library file (which may not be acceptable as a C symbol name anyways) to "kdb_function_table" always. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17957 dc483132-0cff-0310-8789-dd5450dbe970
2006-04-13Partial merge from Novell LDAP integration branch, not including theKen Raeburn1-23/+14
actual LDAP bits: * include/kdb.h (krb5_db_entry_new): Add MASK field indicating what's changed. (KRB5_KDB_SRV_TYPE_*): New macros indicating which type of service is accessing the database. * lib/kadm5/srv/svr_principal.c: Set mask field. * lib/kadm5/srv/server_misc.c, server_init.c: Pass service type to krb5_db_open. * kadmin/dbutil/kdb5_stash.c (kdb5_stash): Pass service type to krb5_db_open. * kadmin/dbutil/kdb5_util.c (open_db_and_mkey): Pass service type to krb5_db_open. * kdc/main.c (init_realm): Pass service type to krb5_db_open. * lib/kadm5/srv/svr_principal.c: Set mask field. * kadmin/dbutil/dump.c (load_db): Pass service type to krb5_db_open. * lib/kdb/kdb5.h (KRB5_KDB_SRV_TYPE_*): New macros. * lib/kdb/err_handle.{c,h}: Deleted. * lib/kadm5/clnt/err_handle.{c,h}: Deleted. (krb5_db_clr_error): Declaration deleted. * lib/kdb/Makefile.in, lib/kadm5/clnt/Makefile.in: Don't build them. * lib/kdb/kdb5.c, lib/kadm5/clnt, lib/kadm5/srv: Use new error-message API. * kdc/do_tgs_req.c (process_tgs_req): Use new error-message API. * kdc/kdc_preauth.c (check_padata) * kdc/do_as_req.c (process_as_req): * kdc/main.c (init_realm): * kadmin/server/ovsec_kadmd.c (main, do_schpw): * schpw.c (process_chpw_request): * kadmin/server/server_stubs.c: * kadmin/cli/kadmin.c (extended_com_err_fn): New function. (kadmin_startup): Tell com_err library to use it, for kadmin.local. * lib/kdb/libkdb5.exports: Don't export krb5_db_clr_error. * lib/kdb/Makefile.in: (SRCS, STLIBOBJS): Don't build err_handle.c. * lib/kdb/kdb5.c (kdb_load_library): Don't pass argument to init_library. (krb5_db_clr_error): Function deleted. * lib/kdb/kdb5.h (struct _kdb_vftabl): Remove argument from init_library field. * lib/kadm5/logger.c (krb5_klog_init): Save the krb5_context pointer. (klog_com_err_proc): Use it, and call new error-message API. * lib/kadm5/srv/svr_principal.c: Use new error-message API. * kadmin/dbutil/kdb5_util.c (extended_com_err_fn): New function. (main): Tell com_err library to use it. * plugins/kdb/db2: Use new error-message APIs and updated DAL interface. * lib/kadm5/kadm_rpc.h: Delete err_str fields. * lib/kadm5/kadm_rpc_xdr.c: Don't process them. * kadmin/server/server_stubs.c: Don't use ret.err_str field. * include/k5-thread.h (k5_key_t): Deleted unused values. * lib/kdb/kdb5.h (KDB_MODULE_SECTION): Change db_modules to dbmodules. (KDB_MODULE_DEF_SECTION): New macro. * tests/Makefile.in (krb5.conf): Rename db_modules to dbmodules. * tests/dejagnu/config/default.exp (setup_krb5_conf): Likewise. * kadmin/testing/proto/krb5.conf.proto: Likewise. * lib/kdb/libkdb5.exports: Do export krb5_def_store_mkey. * lib/kadm5/admin.h (KADM5_CPW_FUNCTION, KADM5_RANDKEY_USED): New macros. (struct _kadm5_config_params): New field kpasswd_server. * lib/krb5/error_tables/kdb5_err.et (KRB5_KDB_SERVER_INTERNAL_ERR): New error code. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17899 dc483132-0cff-0310-8789-dd5450dbe970
2006-04-10* kdb5.c (kdb_unlock_lib_lock, kdb_destroy_lib_lock): Cast 0 to void to silenceKen Raeburn1-2/+2
compiler warning. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17884 dc483132-0cff-0310-8789-dd5450dbe970
2006-03-08* kdb5.c: Don't include pthread.hKen Raeburn1-4/+0
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17711 dc483132-0cff-0310-8789-dd5450dbe970
2006-01-27Mark #else of KDB5_STATIC_LINK with ifdef nameSam Hartman1-1/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17631 dc483132-0cff-0310-8789-dd5450dbe970
2006-01-27Note that caller must free result of conf_get_sectionSam Hartman1-0/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17630 dc483132-0cff-0310-8789-dd5450dbe970
2006-01-27Define new error codes for errors loading dal plugins.Sam Hartman1-5/+7
Use these error codes to report plugin load errors. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17629 dc483132-0cff-0310-8789-dd5450dbe970
2006-01-26add/update copyright notices for non-trivial code additions/changes in 2006Ken Raeburn1-0/+24
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17621 dc483132-0cff-0310-8789-dd5450dbe970
2006-01-25Delete the rest of the support in the kdb library for doing locking onKen Raeburn1-85/+18
behalf of the plugin library. Convert the remaining locking code (for protecting the list of plugins loaded) to use the k5_ macros. ticket: 3416 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17612 dc483132-0cff-0310-8789-dd5450dbe970
2006-01-25Remove the thread-safety flag from the kdb plugin interface. Instead,Ken Raeburn1-18/+2
have the kdb code assume the plugin is thread safe, and implement some quick and dirty wrapper functions in the db2 plugin to make it use a local mutex. There's still some mutex code in the kdb library that should be reviewed, and simplified or removed. ticket: 3416 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17611 dc483132-0cff-0310-8789-dd5450dbe970
2005-12-02 * kdb5.c (kdb_load_library): Make dbpath_names static, to keep Solaris nativeKen Raeburn1-1/+6
compiler happier. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17537 dc483132-0cff-0310-8789-dd5450dbe970
2005-10-04* kdb5.c (kdb_get_conf_section): If the default realm is null, return null.Ken Raeburn1-2/+5
(krb5_db_open): Don't pass null pointer to sprintf if default_realm is null. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17402 dc483132-0cff-0310-8789-dd5450dbe970
2005-08-17* kdb5.c (kdb_load_library): Look up db_modules>db_module_dir in config file,Ken Raeburn1-2/+31
and use any indicated directories before the compiled-in directories. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17337 dc483132-0cff-0310-8789-dd5450dbe970
2005-07-06* kdb5.c (kdb_get_library_name, kdb_load_library): Change default name to "db2".Ken Raeburn1-8/+3
(kdb_get_library_name): On error reading from the config file, don't just use the default. (kdb_load_library): Don't add "lib" prefix on module name. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17295 dc483132-0cff-0310-8789-dd5450dbe970
2005-06-21* err_handle.c, kdb5.c: Test ENABLE_THREADS, not just HAVE_PTHREAD_HKen Raeburn1-3/+3
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17268 dc483132-0cff-0310-8789-dd5450dbe970
2005-06-21reformatKen Raeburn1-953/+830
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17267 dc483132-0cff-0310-8789-dd5450dbe970
2005-06-21Novell Database Abstraction Layer merge.Ken Raeburn1-0/+2051
Will probably break things. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17258 dc483132-0cff-0310-8789-dd5450dbe970