Ken Raeburn [Thu, 5 Aug 2004 07:42:46 +0000 (07:42 +0000)]
* k5-thread.h [HAVE_PTHREAD]: Include sched.h if DEBUG_THREADS_SLOW is defined.
(MAYBE_SCHED_YIELD) [HAVE_PTHREAD]: Define, to call sched_yield or not,
depending on DEBUG_THREADS_SLOW.
(k5_os_mutex_lock, k5_os_mutex_unlock) [HAVE_PTHREAD]: Use MAYBE_SCHED_YIELD.
(DEBUG_THREADS_SLOW): Define.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16642
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 4 Aug 2004 06:59:37 +0000 (06:59 +0000)]
* srv_rcache.c (krb5_get_server_rcache): Call krb5_rc_recover_or_initialize
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16641
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 4 Aug 2004 06:58:17 +0000 (06:58 +0000)]
* rc-int.h (struct _krb5_rc_ops): Add new member, recover_or_init.
* 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
Ken Raeburn [Wed, 4 Aug 2004 06:53:03 +0000 (06:53 +0000)]
* k5-int.h (krb5_rc_recover_or_initialize): Declare
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16639
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 4 Aug 2004 06:46:15 +0000 (06:46 +0000)]
* configure.in: Actually check for pthread_mutex_lock
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16638
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 3 Aug 2004 20:56:25 +0000 (20:56 +0000)]
* configure.in: Build makefile for new "threads" subdirectory
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16637
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 3 Aug 2004 20:55:32 +0000 (20:55 +0000)]
* Makefile.in, t_rcache.c: New files
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16636
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 31 Jul 2004 08:34:16 +0000 (08:34 +0000)]
* threads.c (krb5int_thread_support_init): Do finish initialization after key creation in POSIX case
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16635
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 30 Jul 2004 21:10:45 +0000 (21:10 +0000)]
Implement new replay cache type "none"
* 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
Tom Yu [Fri, 30 Jul 2004 19:52:36 +0000 (19:52 +0000)]
* configure.in: Only sanity-check setutent() API if there is no
utmpx.h, since some setutent() implementations aren't sysV-derived,
e.g., NetBSD.
ticket: 2432
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16633
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 30 Jul 2004 03:55:07 +0000 (03:55 +0000)]
* gssapi_krb5.c (kg_ccache_name): Variable deleted.
(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
Sam Hartman [Thu, 29 Jul 2004 15:29:21 +0000 (15:29 +0000)]
Export lucid context functions and gss_krb5_set_allowable_enctypes
Ticket: 2587
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16631
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 29 Jul 2004 02:26:43 +0000 (02:26 +0000)]
Add a mutex to the GSSAPI krb5 mechanism credential structure. Lock it while
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
Ken Raeburn [Thu, 29 Jul 2004 01:50:02 +0000 (01:50 +0000)]
* set_ccache.c (gss_krb5_ccache_name): Don't make a copy of the string returned
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
Ken Raeburn [Thu, 29 Jul 2004 01:48:05 +0000 (01:48 +0000)]
* gssapi_krb5.c (kg_get_ccache_name): Make the copy always, not just
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
Ken Raeburn [Wed, 28 Jul 2004 23:48:05 +0000 (23:48 +0000)]
* gssapi_krb5.c (kg_get_ccache_name): Make a copy of the default ccache name,
because calling krb5_free_context will destroy it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16627
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 28 Jul 2004 23:45:27 +0000 (23:45 +0000)]
* tcl_kadm5.c (parse_flags, parse_keysalts, parse_key_data, parse_tl_data,
parse_principal_ent, parse_policy_ent): Use Tcl_Free, not free, to release
storage allocated by Tcl_SplitList.
* tcl_ovsec_kadm.c (parse_flags, parse_principal_ent, parse_policy_ent):
Likewise.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16626
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 28 Jul 2004 23:38:54 +0000 (23:38 +0000)]
* k5-thread.h [HAVE_PRAGMA_WEAK_REF]: Declare the pthread mutex functions as
weak.
(USE_PTHREAD_LOCK_ONLY_IF_LOADED): Define if pthread_mutex_lock isn't available
by default.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16625
dc483132-0cff-0310-8789-
dd5450dbe970
Jeffrey Altman [Mon, 26 Jul 2004 07:04:18 +0000 (07:04 +0000)]
cc_mslsa.c: fix is_windows_xp not to return true for windows 2000
ticket: 2645
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16624
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Sat, 24 Jul 2004 00:40:18 +0000 (00:40 +0000)]
another krb4 ticket backdating fix
* kerberos_v4.c (kerberos_v4): Duplicate backdating fix for
APPL_REQUEST as well. Fix comments.
ticket: new
version_reported: 1.3.3
target_version: 1.3.5
tags: pullup
component: krb5-kdc
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16623
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 23 Jul 2004 15:29:53 +0000 (15:29 +0000)]
Add a mutex to protect the per-process fake-getaddrinfo data cache.
Currently it gets locked while a name lookup is in progress, which is not very
efficient. That should be changed, after the code is fixed up so that the
cache works on other platforms.
* include/fake-addrinfo.h: Include k5-thread.h.
(struct fac): Add a mutex.
(plant_face, find_face): Check that mutex is already locked.
(krb5int_lock_fac, krb5int_unlock_fac): Declare.
(fai_add_hosts_by_name): Use them to lock and unlock the mutex.
* util/support/fake-addrinfo.c (krb5int_fac): Initialize the mutex.
(krb5int_init_fac, krb5int_fini_fac): New functions; finish initializing or
destroy the mutex.
(krb5int_lock_fac, krb5int_unlock_fac): New functions; lock the mutex after
calling krb5int_call_thread_support_init, or unlock it.
* util/support/threads.c (krb5int_call_thread_support_init): New function.
(krb5int_init_fac, krb5int_fini_fac): Declare.
(krb5int_thread_support_init, krb5int_thread_support_fini): Call them.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16622
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 22 Jul 2004 22:03:52 +0000 (22:03 +0000)]
[needs the include/configure.in checkin of a few minutes ago, too]
* 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
Ken Raeburn [Thu, 22 Jul 2004 21:50:22 +0000 (21:50 +0000)]
* configure.in: Look for "struct lifconf" and maybe define HAVE_STRUCT_LIFCONF
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16620
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 21 Jul 2004 03:29:46 +0000 (03:29 +0000)]
* implementor.texinfo (Compiler and OS Requirements): New section
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16619
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 21 Jul 2004 03:05:06 +0000 (03:05 +0000)]
* implementor.texinfo (Thread Safety): Rewrite; add subsections.
(Advanced Shared Library Requirements): Use @defmac where appropriate. Make
sure return types are specified where needed. Mention export lists. Indicate
last-update date.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16618
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 21 Jul 2004 00:29:24 +0000 (00:29 +0000)]
* implementor.texinfo: Changed @code to @file where files are referenced.
(Advanced Shared Library Requirements): New section.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16617
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 20 Jul 2004 23:20:35 +0000 (23:20 +0000)]
* implementor.texinfo (NetBSD Shared Library Support, Solaris Shared Library
Support): Outdated sections deleted.
(Shared Library Theory): Fixed typo.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16616
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 19 Jul 2004 20:51:38 +0000 (20:51 +0000)]
* fake-addrinfo.h (struct face, struct fac): Always declare.
(krb5int_fac): Renamed from fac, and made extern. Always declare.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16615
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 19 Jul 2004 20:47:12 +0000 (20:47 +0000)]
* fake-addrinfo.c: New file.
* Makefile.in (STLIBOBJS, LIBOBJS, SRCS): Add it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16614
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Sun, 18 Jul 2004 04:10:22 +0000 (04:10 +0000)]
* cc_memory.c (krb5_mcc_store): When allocating krb5_mcc_link
memory - allocate sizeof() - not sizeof(sizeof()).
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16613
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 17 Jul 2004 00:37:28 +0000 (00:37 +0000)]
zap remaining bits of macsock.h support
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16612
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 16 Jul 2004 22:15:14 +0000 (22:15 +0000)]
update dependencies
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16611
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 16 Jul 2004 21:56:10 +0000 (21:56 +0000)]
update dependencies
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16610
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 16 Jul 2004 21:55:12 +0000 (21:55 +0000)]
* pty-int.h: Include port-sockets.h instead of netdb.h and netinet/in.h
ticket: 2379
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16609
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 16 Jul 2004 21:12:30 +0000 (21:12 +0000)]
* fake-addrinfo.h: Don't include netdb.h, since port-sockets.h already does.
* port-sockets.h: Define _XOPEN_SOURCE_EXTENDED around inclusion of netdb.h if
it's not defined and not Windows, as fake-addrinfo.h used to do; otherwise just
include it normally.
ticket: 2379
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16608
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 16 Jul 2004 21:07:42 +0000 (21:07 +0000)]
* kadmin.M: Put space after ".B" directive
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16606
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 16 Jul 2004 20:53:46 +0000 (20:53 +0000)]
* compat_recv.c: Only include sys/select.h if it's available
ticket: 2592
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16605
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 16 Jul 2004 20:50:40 +0000 (20:50 +0000)]
* port-sockets.h (inet_ntop): Cast NULL to desired return pointer type
ticket: 2592
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16604
dc483132-0cff-0310-8789-
dd5450dbe970
Alexandra Ellwood [Thu, 15 Jul 2004 20:05:06 +0000 (20:05 +0000)]
Added thread support code to project
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16603
dc483132-0cff-0310-8789-
dd5450dbe970
Alexandra Ellwood [Thu, 15 Jul 2004 17:45:04 +0000 (17:45 +0000)]
Remove use of client principal from krb5_context (default_ccprincipal) and default principal from v4 CCAPI glue code
ticket: 2634
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16602
dc483132-0cff-0310-8789-
dd5450dbe970
Jeffrey Altman [Thu, 15 Jul 2004 07:39:14 +0000 (07:39 +0000)]
fix previous commit
ticket: 2637
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16601
dc483132-0cff-0310-8789-
dd5450dbe970
Jeffrey Altman [Thu, 15 Jul 2004 07:38:09 +0000 (07:38 +0000)]
* k5-int.h: define for WIN32 the macro krb5int_zap_data to
utilize the Win32 API SecureZeroMemory which is guaranteed
by Microsoft not to be optimized out by the compiler.
Both memset and ZeroMemory will be optimized out by the
compiler when possible.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16600
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 15 Jul 2004 01:12:26 +0000 (01:12 +0000)]
* Makefile.in (MLIBS): Add $(LIBS)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16599
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 15 Jul 2004 01:11:24 +0000 (01:11 +0000)]
* libprofile.exports: Don't try to export krb5int_profile_shared_data
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16598
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 15 Jul 2004 01:00:54 +0000 (01:00 +0000)]
Get rid of the global krb5 context used by the GSSAPI Kerberos mechanism. I
*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
Ken Raeburn [Wed, 14 Jul 2004 21:14:51 +0000 (21:14 +0000)]
* t_cc.c (cc_test): Rename one of the "resolve" cases so the messages can be
distinguished.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16596
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 14 Jul 2004 21:06:22 +0000 (21:06 +0000)]
* recvauth.c (krb_recvauth): Initialize cp and tmp_buf. Check length of data
read before evaluating the value.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16595
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 14 Jul 2004 01:54:16 +0000 (01:54 +0000)]
* set_ccache.c (gss_krb5_ccache_name): Check thread-specific data for the saved
"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
Ken Raeburn [Wed, 14 Jul 2004 01:46:36 +0000 (01:46 +0000)]
* gssapiP_krb5.h (gssint_krb5_keytab_lock): Declare
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16593
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 14 Jul 2004 01:45:12 +0000 (01:45 +0000)]
* gss_libinit.c (gssint_lib_init): Initialize new keytab-name mutex, and
register two new key values.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16592
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 14 Jul 2004 01:44:50 +0000 (01:44 +0000)]
* Makefile.in (SHLIB_EXPDEPS): Use _DEPLIB variables.
(SHLIB_EXPLIBS): Add $(SUPPORT_LIB).
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16591
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 14 Jul 2004 01:40:52 +0000 (01:40 +0000)]
* acquire_cred.c: Include gss_libinit.h.
(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
Ken Raeburn [Wed, 14 Jul 2004 01:33:35 +0000 (01:33 +0000)]
* k5-platform.h (k5_call_init_function) [DELAY_INITIALIZER] [__GNUC__]: Use a
statement expression so any line number info printed by assertion failures is
useful.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16589
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 14 Jul 2004 01:31:28 +0000 (01:31 +0000)]
* k5-thread.h (k5_key_t): Add a couple new values for GSSAPI ccache name manipulation
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16588
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 14 Jul 2004 00:15:23 +0000 (00:15 +0000)]
* k5-thread.h (k5_os_mutex_init, k5_os_mutex_destroy): If
USE_PTHREAD_LOCK_ONLY_IF_LOADED is defined, use pthread_mutex_init and _destroy
only if pthread support is loaded.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16587
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 12 Jul 2004 21:08:14 +0000 (21:08 +0000)]
* krb5-config.in: Substitute $(PTHREAD_CFLAGS)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16586
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 12 Jul 2004 01:41:27 +0000 (01:41 +0000)]
* shlib.conf (alpha*-dec-osf*): Use $(PTHREAD_CFLAGS) in CC_LINK_SHARED and
CC_LINK_STATIC.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16585
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 11 Jul 2004 20:17:45 +0000 (20:17 +0000)]
* aclocal.m4 (KRB5_AC_ENABLE_THREADS): Fix typo that caused some code to be
omitted.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16584
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 11 Jul 2004 17:28:15 +0000 (17:28 +0000)]
* configure.in: Use KRB5_AC_INET6
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16583
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 11 Jul 2004 08:00:33 +0000 (08:00 +0000)]
* configure.in: Use KRB5_AC_INET6
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16582
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 11 Jul 2004 07:44:24 +0000 (07:44 +0000)]
* klist.c: Include autoconf.h before network headers
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16581
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 11 Jul 2004 07:00:03 +0000 (07:00 +0000)]
* k5-thread.h (k5_os_mutex_lock, k5_os_mutex_unlock, k5_os_mutex_assert_locked,
k5_os_mutex_assert_unlocked) [USE_PTHREAD_LOCK_ONLY_IF_LOADED]: Fix typo in
accessing non-pthread versions.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16580
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 11 Jul 2004 06:55:16 +0000 (06:55 +0000)]
* fake-addrinfo.h (in6addr_any): If we need to define a static copy, rename it
with a macro first.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16579
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 11 Jul 2004 06:53:32 +0000 (06:53 +0000)]
* configure.in: Check krb5_cv_inet6_with_dinet6 as well as krb5_cv_inet6 when
deciding whether to test for in6addr_any. If gcc is in use, suppress pedantic
warnings about "inline".
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16578
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 11 Jul 2004 06:05:24 +0000 (06:05 +0000)]
* aclocal.m4 (KRB5_AC_ENABLE_THREADS): Use PTHREAD_CFLAGS and PTHREAD_LIBS when
checking for pthread_mutexattr_setrobust_np availability with thread support
enabled.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16577
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 9 Jul 2004 23:50:35 +0000 (23:50 +0000)]
* aclocal.m4 (KRB5_AC_ENABLE_THREADS): Always include the thread library on
Tru64 UNIX.
(KRB5_AC_CHECK_INET6): If the first test fails, try adding -DINET6 and test
again; if it works, define INET6 for the build.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16576
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 9 Jul 2004 23:40:35 +0000 (23:40 +0000)]
* shlib.conf (alpha*-dec-osf*): Use $(PTHREAD_CFLAGS) in LDCOMBINE
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16575
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 9 Jul 2004 17:46:46 +0000 (17:46 +0000)]
* aclocal.m4 (KRB5_AC_ENABLE_THREADS): Don't test for pthread.h specifically
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16574
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 9 Jul 2004 17:45:33 +0000 (17:45 +0000)]
* k5-thread.h: Test HAVE_PTHREAD instead of HAVE_PTHREAD_H
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16573
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 9 Jul 2004 17:44:13 +0000 (17:44 +0000)]
* kdb_db2.c (krb5_db2_db_get_principal): Rename local variable "try"
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
Jeffrey Altman [Fri, 9 Jul 2004 14:32:34 +0000 (14:32 +0000)]
forgot the changelog
ticket: 2629
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16571
dc483132-0cff-0310-8789-
dd5450dbe970
Jeffrey Altman [Fri, 9 Jul 2004 14:31:02 +0000 (14:31 +0000)]
osconf.h:
< #if !!defined(_WIN32)
---
> #if !defined(_WIN32)
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16570
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 9 Jul 2004 14:18:13 +0000 (14:18 +0000)]
* win-mac.h (KRB5_USE_INET6, ENABLE_THREADS): Define
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16569
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 8 Jul 2004 20:58:31 +0000 (20:58 +0000)]
* aclocal.m4 (KRB5_AC_ENABLE_THREADS): Default to enabling support
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16568
dc483132-0cff-0310-8789-
dd5450dbe970
Jeffrey Altman [Thu, 8 Jul 2004 05:25:16 +0000 (05:25 +0000)]
* cc_mslsa.c: Fix thread safety
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16562
dc483132-0cff-0310-8789-
dd5450dbe970
Jeffrey Altman [Thu, 8 Jul 2004 05:00:57 +0000 (05:00 +0000)]
kfw-fixed.nsi: Add registry keys to allow KFW executables to access the
krb5.ini and other config files in the %WINDIR% directory
instead of the per-user WINDOWS directory created in the
user's profile
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16561
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 8 Jul 2004 04:24:03 +0000 (04:24 +0000)]
* Makefile.in (LOCALINCLUDES): Add $(srcdir)/.. to the list
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16560
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 7 Jul 2004 21:41:53 +0000 (21:41 +0000)]
* disp_status.c: Include gss_libinit.h.
(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
Jeffrey Altman [Wed, 7 Jul 2004 12:05:03 +0000 (12:05 +0000)]
2004-07-07 Jeffrey Altman <jaltman@mit.edu>
* 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
Jeffrey Altman [Wed, 7 Jul 2004 11:59:13 +0000 (11:59 +0000)]
* kfw-fixed.nsi: Microsoft did not place the AllowTGTSessionKey in
the same location within the registry on the XP client platform as
they did on the 2000 SP4 and 2003 Servers. Modify the installer to
set both locations.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16553
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 7 Jul 2004 06:17:28 +0000 (06:17 +0000)]
* k5-thread.h [! HAVE_PTHREAD_H]: Don't explicitly disable thread support when
pthread.h is missing.
(k5_os_mutex, K5_OS_MUTEX_PARTIAL_INITIALIZER, k5_os_mutex_finish_init,
k5_os_mutex_init, k5_os_mutex_destroy, k5_os_mutex_lock, k5_os_mutex_unlock,
k5_os_mutex_assert_unlocked, k5_os_mutex_assert_locked) [_WIN32]: Define
Windows versions; still not enabled by default.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16552
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 7 Jul 2004 01:34:08 +0000 (01:34 +0000)]
Make thread-specific data support build under Windows (but don't enable it yet)
* threads.c (struct tsd_block) [_WIN32]: Define.
(k5_setspecific) [_WIN32]: Don't fill in a 'next' field. Fix variable
reference for TSD key.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16551
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 7 Jul 2004 00:34:49 +0000 (00:34 +0000)]
* k5-thread.h: Use K5_THREAD_H for multiple inclusion protection.
(k5_debug_mutex_stats, k5_mutex_init_stats, k5_mutex_finish_init_stats,
K5_MUTEX_STATS_INIT): Add some dummy support for recording statistics on how
long mutexes are held, etc. Incomplete implementation started, but code not
enabled.
(k5_mutex_t): Add statistics field.
(K5_MUTEX_PARTIAL_INITIALIZER, k5_mutex_init_1, k5_mutex_init): Initialize it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16550
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 7 Jul 2004 00:30:08 +0000 (00:30 +0000)]
* configure.in: Check for getpwuid_r
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16549
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 7 Jul 2004 00:29:31 +0000 (00:29 +0000)]
* import_name.c (krb5_gss_import_name) [HAVE_GETPWUID_R]: Use getpwuid_r
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16548
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 6 Jul 2004 23:37:22 +0000 (23:37 +0000)]
* configure.in: Check for pthread_rwlock_init
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16547
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 6 Jul 2004 23:34:43 +0000 (23:34 +0000)]
* configure.in: Fix bug in last change that caused a variable to be used before set
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16546
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 4 Jul 2004 08:52:45 +0000 (08:52 +0000)]
* aclocal.m4 (AC_LIBRARY_NET): Look for res_nsearch.
* configure.in: If thread support is enabled and res_nsearch isn't found, issue
a warning.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16542
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 4 Jul 2004 08:48:21 +0000 (08:48 +0000)]
* dnssrv.c (krb5int_make_srv_query_realm) [HAVE_RES_NSEARCH]: Use res_nsearch
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
Ken Raeburn [Sun, 4 Jul 2004 00:37:55 +0000 (00:37 +0000)]
* error_message.c (remove_error_table) [!ENABLE_THREADS && DEBUG_THREADS]: Update test for "initialized" field in mutex
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16540
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 2 Jul 2004 22:16:56 +0000 (22:16 +0000)]
* k5-thread.h: Restructured mutex code.
(k5_debug_loc): New type, may contain file/line info if DEBUG_THREADS_LOC is
defined.
(k5_os_nothread_*): Dummy implementation of mutex lock for a single-threded
process. Uses a flag and assert() if DEBUG_THREADS is defined, does nothing
interesting otherwise.
(k5_os_mutex*, k5_once*): General implementations, with dummy or POSIX or
POSIX-if-loaded-otherwise-dummy variants.
(k5_mutex_*): Combine OS-specific mutex implementation with optional file/line
tracking, and provide a place to instrument for other debugging or performance
data.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16539
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 2 Jul 2004 21:32:17 +0000 (21:32 +0000)]
* an_to_ln.c: Include string.h
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16538
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 1 Jul 2004 21:02:45 +0000 (21:02 +0000)]
* kinit.c (k5_kinit): Don't free addresses after calling
krb5_get_init_creds_opt_set_address_list; it doesn't make a copy.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16537
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 1 Jul 2004 19:39:39 +0000 (19:39 +0000)]
* configure.in: Test for 'inline' support.
* k5-platform.h (inline): Don't define here.
* win-mac.h (inline): Define as __inline.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16536
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 1 Jul 2004 01:22:47 +0000 (01:22 +0000)]
* k5-thread.h (K5_MUTEX_DEBUG_INITIALIZER): Use current file and line.
(k5_mutex_debug_finish_init, k5_mutex_debug_init, k5_mutex_debug_destroy): Save
current file and line.
(k5_mutex_debug_lock): Verify that the lock was unlocked before, and set the
state to locked.
(k5_mutex_debug_unlock): Verify that the mutex was locked before, and set the
state to unlocked.
(k5_debug_assert_locked, k5_debug_assert_unlocked): Use
k5_mutex_debug_check_init instead of checking initialized==1.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16535
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 30 Jun 2004 23:24:42 +0000 (23:24 +0000)]
Thread-safety for file-based credentials caches
* 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
Ken Raeburn [Wed, 30 Jun 2004 21:21:56 +0000 (21:21 +0000)]
* k5-thread.h (k5_debug_assert_locked, k5_debug_assert_unlocked): New macros.
(k5_assert_locked, k5_assert_unlocked): New macros, may or may not call the
debug macros.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16533
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 30 Jun 2004 20:30:54 +0000 (20:30 +0000)]
* libkadm5clnt.exports: Export kadm5_get_admin_service_name
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16532
dc483132-0cff-0310-8789-
dd5450dbe970
Jeffrey Altman [Wed, 30 Jun 2004 05:00:25 +0000 (05:00 +0000)]
* cc_mslsa.c:
- is_windows_2000() indicates the OS is Windows 2000 or higher
- is_windows_xp() indicates the OS is Windows XP or higher which
indicates that PKERB_QUERY_TKT_CACHE_EX_RESPONSE and
PKERB_TICKET_CACHE_INFO_EX are available.
- does_retrieve_ticket_cache_ticket() checks to see if a Microsoft
private fix is available which adds a new Cache Flag,
KERB_RETRIEVE_TICKET_CACHE_TICKET, which when set causes the
requested ticket to be stored in the LSA cache even when the
TicketFlags and EncType are not set to 0.
- KerbExternalTicketMatch() is a test to determine if two
Microsoft External Tickets are identical
+ use the KerbQueryTicketCacheExMessage LSA call on XP or higher
+ specify the KERB_RETRIEVE_TICKET_CACHE_TICKET flag when it is
available
= The combination of both + items will cause the ClientRealm
to be displayed properly for all cross realm tickets obtained
via the MSLSA
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16528
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 29 Jun 2004 13:15:20 +0000 (13:15 +0000)]
* cc_memory.c (krb5_mcc_free): Don't free the mutex here
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16527
dc483132-0cff-0310-8789-
dd5450dbe970