summaryrefslogtreecommitdiffstats
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* * sendto_kdc.c (start_connection) [DEBUG]: Log the local socket addressKen Raeburn2004-08-282-0/+27
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16694 dc483132-0cff-0310-8789-dd5450dbe970
* Finally applied patch from Nalin Dahyabhai at Red Hat to fix 0/NULL bugs inKen Raeburn2004-08-274-3/+15
| | | | | | | | | variadic argument lists to krb5_build_principal{,_ext}. Skipped the stylistic patches that removed casts of NULL. tag: 1850 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16693 dc483132-0cff-0310-8789-dd5450dbe970
* * acquire_cred.c (krb5_gss_acquire_cred): Call gssint_initialize_library.Ken Raeburn2004-08-262-1/+13
| | | | | | Return correct error code on mutex initialization failure. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16687 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Look for uint32_t, not int32_t, since some BSD-ishTom Yu2004-08-263-27/+35
| | | | | | | | | sys/types.h headers have int32_t and u_int32_t, but only have uint32_t in stdint.h. * types.hin: Change int32_t checks to uint32_t checks. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16686 dc483132-0cff-0310-8789-dd5450dbe970
* * libkadm5srv.exports: Update for previous renamingTom Yu2004-08-212-4/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16679 dc483132-0cff-0310-8789-dd5450dbe970
* Fix no-auth test to use a config mask flag to ask for no-auth, toTom Yu2004-08-217-25/+38
| | | | | | avoid the icky repeated build of client_init.c git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16678 dc483132-0cff-0310-8789-dd5450dbe970
* renamed acl_* functions to kadm5int_acl_*Alexandra Ellwood2004-08-203-59/+63
| | | | | | ticket: 2674 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16673 dc483132-0cff-0310-8789-dd5450dbe970
* * svc.c (svc_getreqset): Allocate cred and verf memory toTom Yu2004-08-172-6/+21
| | | | | | | | temporary pointers, and free the temporary pointers on exit. Freeing the actual cred and verf pointers can cause corruption because auth mechanisms can reassign the pointers. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16669 dc483132-0cff-0310-8789-dd5450dbe970
* * svc_auth_gss.c (gssrpc__svcauth_gss): Add some debug messagesTom Yu2004-08-173-5/+21
| | | | | | | | * svc.c (svc_getreqset): Don't allocate either raw or cooked credentials on the stack using the cred_area char array; use mem_alloc() instead. This avoids alignment problems. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16668 dc483132-0cff-0310-8789-dd5450dbe970
* * cc_file.c (struct _krb5_fcc_data): Add new mutex disk_file_lock and flagKen Raeburn2004-08-162-11/+70
| | | | | | | | | | | | | | file_is_locked. (krb5_fcc_close_file): Unlock the mutex and clear the flag. (krb5_fcc_open_file): Acquire the mutex before locking the file, and set the flag after. (krb5_fcc_resolve): Initialize the new mutex and flag. (krb5_fcc_generate_new): Initialize both mutexes and the flag. (dereference): Destroy the new mutex. Also, get rid of some unused variables. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16667 dc483132-0cff-0310-8789-dd5450dbe970
* * cc_file.c: Add buffering on reading.Ken Raeburn2004-08-152-12/+101
| | | | | | | | | | | | | | | (FCC_BUFSIZ): New macro. (struct _krb5_fcc_data): Add new fields buf, valid_bytes, cur_offset. (krb5_fcc_resolve, krb5_fcc_generate_new): Initialize valid_bytes. (invalidate_cache): New function. (krb5_fcc_write, krb5_fcc_open_file, krb5_fcc_destroy): Call invalidate_cache. (fcc_lseek): New function. (krb5_fcc_skip_header, krb5_fcc_destroy, krb5_fcc_start_seq_get, krb5_fcc_next_cred, krb5_fcc_store): Use fcc_lseek instead of lseek. (fcc_read): Use and maybe refill the buffer. (dereference): Zap the contents of the buffer before freeing it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16666 dc483132-0cff-0310-8789-dd5450dbe970
* * cc_file.c (dereference): Lock mutex around call to krb5_fcc_close_fileKen Raeburn2004-08-152-1/+9
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16664 dc483132-0cff-0310-8789-dd5450dbe970
* Only open a credential cache file once, even if multiple krb5_ccache objectsKen Raeburn2004-08-134-77/+172
| | | | | | | | | | | | | | | | | | | | | | | | | refer to it. (This does NOT yet take care of the problem of multiple threads wanting to use OS-level advisory locks, which at least on UNIX are per-process and not per-thread.) * cc_file.c (krb5_fcc_close_file): Change first argument to be an fcc-data pointer, not a krb5_ccache. All calls changed. (struct fcc_set): Add a refcount member. (Definition accidentally introduced without comment in an earlier patch.) (krb5int_cc_file_mutex, fccs): New variables, for managing a global list of open credential cache files. (dereference): New function, with most of old close/destroy operations. Decrements reference count and only frees the object and removes it from the global list if the refcount hits zero. (krb5_fcc_close, krb5_fcc_destroy): Call dereference. (krb5_fcc_resolve): If a file cache is already open with the same file name, increment its reference count and don't create a new one. When a new one is created, add it to the global list. * cc-int.h (krb5int_cc_file_mutex): Declare. * ccbase.c (krb5int_cc_initialize): Initialize it. (krb5int_cc_finalize): Destroy it, and krb5int_mcc_mutex. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16662 dc483132-0cff-0310-8789-dd5450dbe970
* get_in_tkt.c (get_init_creds): Support ticket_lifetime libdefault. Made ↵Alexandra Ellwood2004-08-122-27/+69
| | | | | | | | | | aware of 32 bit min and max for times. Allow renew_until time < expiration time ticket: 2654 ticket: 2655 ticket: 2656 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16656 dc483132-0cff-0310-8789-dd5450dbe970
* ccdefname.c (krb5_cc_set_default_name, krb5_cc_default_name): Look up the ↵Alexandra Ellwood2004-08-122-41/+64
| | | | | | | | default ccache name in krb5_cc_default_name, not krb5_cc_set_default_name so that krb5_init_context doesn't have to do work it might never use ticket: 2657 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16655 dc483132-0cff-0310-8789-dd5450dbe970
* * libkrb5.exports: Remove memory ccache symbols except ops tableKen Raeburn2004-08-082-14/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16650 dc483132-0cff-0310-8789-dd5450dbe970
* * cc_file.c: Remove USE_STDIO supportKen Raeburn2004-08-052-317/+15
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16643 dc483132-0cff-0310-8789-dd5450dbe970
* * srv_rcache.c (krb5_get_server_rcache): Call krb5_rc_recover_or_initializeKen Raeburn2004-08-042-7/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16641 dc483132-0cff-0310-8789-dd5450dbe970
* * rc-int.h (struct _krb5_rc_ops): Add new member, recover_or_init.Ken Raeburn2004-08-047-7/+59
| | | | | | | | | | | | | | * rc_dfl.c (krb5_rc_dfl_init_locked): New function, with most of the content of old krb5_rc_dfl_init. (krb5_rc_dfl_init): Call it. (krb5_rc_dfl_recover_or_init): New function. * rc_dfl.h (krb5_rc_dfl_recover_or_init): Declare. * rcdef.c (krb5_rc_dfl_ops): Initialize new field. * rc_none.c (krb5_rc_none_recover_or_init): New macro. (krb5_rc_none_ops): Initialize new field. * rcfns.c (krb5_rc_recover_or_initialize): New function. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16640 dc483132-0cff-0310-8789-dd5450dbe970
* Implement new replay cache type "none"Ken Raeburn2004-07-305-3/+108
| | | | | | | | | | * rc_none.c: New file. * Makefile.in (SRCS, STLIBOBJS, OBJS): Build it. * rc-int.h (krb5_rc_none_ops): Declare. * rc_base.c (none): New variable. (krb5_rc_typelist_dfl): Add it into the linked list. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16634 dc483132-0cff-0310-8789-dd5450dbe970
* * gssapi_krb5.c (kg_ccache_name): Variable deleted.Ken Raeburn2004-07-302-3/+23
| | | | | | | (kg_sync_ccache_name, kg_get_ccache_name, kg_set_ccache_name): Get and set thread-specific values instead. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16632 dc483132-0cff-0310-8789-dd5450dbe970
* Export lucid context functions and gss_krb5_set_allowable_enctypesSam Hartman2004-07-292-0/+7
| | | | | | Ticket: 2587 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16631 dc483132-0cff-0310-8789-dd5450dbe970
* Add a mutex to the GSSAPI krb5 mechanism credential structure. Lock it whileKen Raeburn2004-07-2911-30/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | frobbing the contents. Also added krb5_gss_validate_cred_1, which is like krb5_gss_validate_cred but for internal use. It lets the caller supply the krb5_context instead of creating yet another one locally, and leaves the new credential mutex locked on a successful return so that the caller doesn't have to reacquire it. More functions should be changed to use this internally, but it's a performance issue; I don't think it's a correctness or thread-safety issue. * gssapiP_krb5.h (struct _krb5_gss_cred_id_rec): Add a mutex. (krb5_gss_validate_cred_1): Declare. * accept_sec_context.c (rd_and_store_for_creds): Initialize mutex. * acquire_cred.c (krb5_gss_acquire_cred): Initialize mutex. * add_cred.c (krb5_gss_add_cred): Create the krb5 context earlier. Call krb5_gss_validate_cred_1. Make sure the mutex is locked. * copy_ccache.c (gss_krb5_copy_ccache): Lock the mutex in the source credential. * init_sec_context.c (get_credentials, new_connection): Check that the mutex is locked. (mutual_auth): Delete unused credential argument. (krb5_gss_init_sec_context): Lock the mutex. * inq_cred.c (krb5_gss_inquire_cred): Lock the mutex. * rel_cred.c (krb5_gss_release_cred): Destroy the mutex. * set_allowable_enctypes.c (gss_krb5_set_allowable_enctypes): Lock the mutex. * val_cred.c (krb5_gss_validate_cred_1): New function. (krb5_gss_validate_cred): Use it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16630 dc483132-0cff-0310-8789-dd5450dbe970
* * set_ccache.c (gss_krb5_ccache_name): Don't make a copy of the string returnedKen Raeburn2004-07-292-29/+13
| | | | | | | by kg_get_ccache_name. Simplify some calls using a temporary error code variable. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16629 dc483132-0cff-0310-8789-dd5450dbe970
* * gssapi_krb5.c (kg_get_ccache_name): Make the copy always, not justKen Raeburn2004-07-292-16/+22
| | | | | | in the local-context case. Check for errors in making the copy. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16628 dc483132-0cff-0310-8789-dd5450dbe970
* * gssapi_krb5.c (kg_get_ccache_name): Make a copy of the default ccache name,Ken Raeburn2004-07-282-1/+8
| | | | | | because calling krb5_free_context will destroy it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16627 dc483132-0cff-0310-8789-dd5450dbe970
* cc_mslsa.c: fix is_windows_xp not to return true for windows 2000Jeffrey Altman2004-07-262-1/+6
| | | | | | | ticket: 2645 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16624 dc483132-0cff-0310-8789-dd5450dbe970
* [needs the include/configure.in checkin of a few minutes ago, too]Ken Raeburn2004-07-222-2/+15
| | | | | | | | | * localaddr.c (get_lifconf): Define only if "struct lifconf" is available. (foreach_localaddr): Use get_lifconf only if "struct lifconf" is available. ticket: 2598 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16621 dc483132-0cff-0310-8789-dd5450dbe970
* * cc_memory.c (krb5_mcc_store): When allocating krb5_mcc_linkEzra Peisach2004-07-182-1/+6
| | | | | | memory - allocate sizeof() - not sizeof(sizeof()). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16613 dc483132-0cff-0310-8789-dd5450dbe970
* zap remaining bits of macsock.h supportKen Raeburn2004-07-1713-499/+23
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16612 dc483132-0cff-0310-8789-dd5450dbe970
* update dependenciesKen Raeburn2004-07-161-2/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16611 dc483132-0cff-0310-8789-dd5450dbe970
* Remove use of client principal from krb5_context (default_ccprincipal) and ↵Alexandra Ellwood2004-07-157-121/+50
| | | | | | | | default principal from v4 CCAPI glue code ticket: 2634 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16602 dc483132-0cff-0310-8789-dd5450dbe970
* Get rid of the global krb5 context used by the GSSAPI Kerberos mechanism. IKen Raeburn2004-07-156-48/+49
| | | | | | | | | | | | | | | | | | | | *think* I've gotten all the places where a ccache or keytab name that's been stored gets applied to whichever context needs it. * gssapi_krb5.c (kg_sync_ccache_name): Add context argument instead of calling kg_get_context. (kg_get_ccache_name): Use a locally created krb5 context instead of calling kg_get_context. (kg_get_context): Deleted. * acquire_cred.c (acquire_init_cred): Pass current context. (krb5_gss_acquire_cred): Use a locally created krb5 context instead of calling kg_get_context. * add_cred.c (krb5_gss_add_cred): Call kg_sync_ccache_name. * init_sec_context.c (krb5_gss_init_sec_context): Likewise. * gssapiP_krb5.h (kg_sync_ccache_name): Update prototype. (kg_get_context): Delete declaration. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16597 dc483132-0cff-0310-8789-dd5450dbe970
* * t_cc.c (cc_test): Rename one of the "resolve" cases so the messages can beKen Raeburn2004-07-142-1/+6
| | | | | | distinguished. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16596 dc483132-0cff-0310-8789-dd5450dbe970
* * recvauth.c (krb_recvauth): Initialize cp and tmp_buf. Check length of dataKen Raeburn2004-07-142-3/+11
| | | | | | read before evaluating the value. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16595 dc483132-0cff-0310-8789-dd5450dbe970
* * set_ccache.c (gss_krb5_ccache_name): Check thread-specific data for the savedKen Raeburn2004-07-142-5/+30
| | | | | | "old" name to free. Save the new old name in thread-specific data. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16594 dc483132-0cff-0310-8789-dd5450dbe970
* * gssapiP_krb5.h (gssint_krb5_keytab_lock): DeclareKen Raeburn2004-07-142-0/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16593 dc483132-0cff-0310-8789-dd5450dbe970
* * gss_libinit.c (gssint_lib_init): Initialize new keytab-name mutex, andKen Raeburn2004-07-142-0/+13
| | | | | | register two new key values. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16592 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (SHLIB_EXPDEPS): Use _DEPLIB variables.Ken Raeburn2004-07-142-4/+7
| | | | | | (SHLIB_EXPLIBS): Add $(SUPPORT_LIB). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16591 dc483132-0cff-0310-8789-dd5450dbe970
* * acquire_cred.c: Include gss_libinit.h.Ken Raeburn2004-07-142-8/+43
| | | | | | | | (gssint_krb5_keytab_lock): New mutex. (krb5_gss_register_acceptor_identity, acquire_accept_cred): Lock the mutex while manipulating krb5_gss_keytab. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16590 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb_db2.c (krb5_db2_db_get_principal): Rename local variable "try"Ken Raeburn2004-07-092-3/+10
| | | | | | | to "trynum" because some systems (*cough*Tru64*cough*) turn on some exception handling support when thread support is enabled. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16572 dc483132-0cff-0310-8789-dd5450dbe970
* * cc_mslsa.c: Fix thread safetyJeffrey Altman2004-07-082-3/+14
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16562 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (LOCALINCLUDES): Add $(srcdir)/.. to the listKen Raeburn2004-07-082-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16560 dc483132-0cff-0310-8789-dd5450dbe970
* * disp_status.c: Include gss_libinit.h.Ken Raeburn2004-07-072-8/+9
| | | | | | | | (init_et): Variable deleted. (krb5_gss_display_status): Don't use init_et; instead, call gssint_initialize_library. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16558 dc483132-0cff-0310-8789-dd5450dbe970
* 2004-07-07 Jeffrey Altman <jaltman@mit.edu>Jeffrey Altman2004-07-072-0/+6
| | | | | | | | * cc_mslsa.c: When obtaining a TGT from the MSLSA, do not ignore the cache when the requested enctype is the NULL enctype. This means to accept any enctype. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16554 dc483132-0cff-0310-8789-dd5450dbe970
* * import_name.c (krb5_gss_import_name) [HAVE_GETPWUID_R]: Use getpwuid_rKen Raeburn2004-07-072-5/+32
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16548 dc483132-0cff-0310-8789-dd5450dbe970
* * dnssrv.c (krb5int_make_srv_query_realm) [HAVE_RES_NSEARCH]: Use res_nsearchKen Raeburn2004-07-043-0/+63
| | | | | | | instead of res_search. * hst_realm.c (krb5_try_realm_txt_rr) [HAVE_RES_NSEARCH]: Likewise. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16541 dc483132-0cff-0310-8789-dd5450dbe970
* * an_to_ln.c: Include string.hKen Raeburn2004-07-022-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16538 dc483132-0cff-0310-8789-dd5450dbe970
* Thread-safety for file-based credentials cachesKen Raeburn2004-06-302-74/+195
| | | | | | | | | | | | | | | | | | * cc_file.c (krb5_fcc_data): Added a mutex. (krb5_fcc_read*, krb5_fcc_write, krb5_fcc_store_*, krb5_fcc_open_file, krb5_fcc_skip_header, krb5_fcc_skip_principal): Verify that the mutex is locked. (MAYBE_OPEN): Verify that the mutex is locked; unlock it if returning an error. (krb5_fcc_initialize, krb5_fcc_start_seq_get, krb5_fcc_get_principal, krb5_fcc_store, krb5_fcc_set_flags): Lock and unlock the mutex. (krb5_fcc_close): Likewise. Destroy the mutex when done. (krb5_fcc_destroy): Merge stdio and non-stdio versions a little more. Destroy the mutex when done. (krb5_fcc_resolve): Initialize and lock the mutex. (krb5_fcc_next_cred): Lock and unlock the mutex. Merge the stdio and non-stdio branches a little more. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16534 dc483132-0cff-0310-8789-dd5450dbe970
* * libkadm5clnt.exports: Export kadm5_get_admin_service_nameKen Raeburn2004-06-302-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16532 dc483132-0cff-0310-8789-dd5450dbe970