| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the cache on Mac OS X, and likely to be enabled eventually on other
platforms, this is going to wind up being a non-trivial amount of code on most
platforms, and updating the cache code to work on other configurations is
likely to take a few rounds. Rather than recompile the world and add a bunch
of code to each object file doing name lookups, moving the code into the
support library that already defines the static data (list head, mutex) should
make things simpler.
(TODO: Fix calling conventions for Windows?)
* include/fake-addrinfo.h: Move most of code content into
util/support/fake-addrinfo.c.
(krb5int_getaddrinfo, krb5int_freeaddrinfo, krb5int_getnameinfo,
krb5int_gai_strerror): Declare.
(getaddrinfo, freeaddrinfo, getnameinfo, gai_strerror): Define as macros
mapping to the krb5int_ function names.
* util/support/fake-addrinfo.c: Import most of the contents of
include/fake-addrinfo.h, so we only compile it once.
(krb5int_getaddrinfo, krb5int_freeaddrinfo, krb5int_getnameinfo,
krb5int_gai_strerror): New functions, always defined and exported.
* util/support/libkrb5support.exports: Export the new functions, not the old
_fac symbols.
ticket: new
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16854 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16845 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
versions so debugging line numbers will be useful.
(DEBUG_THREADS_SLOW): Don't define.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16842 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16805 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
completely faking getaddrinfo, define them as zero.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16803 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16800 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
because there's no corresponding AC_MSG_CHECKING.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16787 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
ticket: 2710
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16769 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
* port-sockets.h: Explicitly declare h_errno if it's missing.
ticket: 1044
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16758 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
as it can cause inconsistencies between headers. It significantly
broke HP-UX 10.20 anyway.
ticket: 2379
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16740 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
when set, a krb5_ccache does not have to return a ticket
within the returned credential
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16734 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
ai_canonname is null
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16682 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
* k5-thread.h (k5_os_nothread_mutex_assert_locked,
k5_os_nothread_mutex_assert_unlocked, k5_os_mutex_assert_locked,
k5_os_mutex_assert_unlocked): Assertion macros should always have type void.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16663 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
k5_os_nothread_mutex_destroy, k5_os_nothread_mutex_lock,
k5_os_nothread_mutex_unlock) [!DEBUG_THREADS]: Replace macros with inline
functions, to gain type checking and eliminate gratuitous compiler warnings.
(k5_pthread_assert_unlocked, k5_pthread_assert_locked): Likewise.
(k5_os_mutex_finish_init) [HAVE_PTHREAD && !USE_PTHREAD_LOCK_ONLY_IF_LOADED]:
Likewise.
(return_after_yield): New inline function.
(k5_os_mutex_lock) [HAVE_PTHREAD]: Change back to a macro, calling
return_after_yield.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16661 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
struct pwd*.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16654 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16647 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
* k5-thread.h: Only include sched.h if it's available.
(MAYBE_SCHED_YIELD): Only use sched_yield if sched.h and sched_yield are
available; if weak references are supported and sched_yield isn't available by
default, check for it at run time.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16645 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16639 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16638 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16620 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
(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
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16612 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
ticket: 2592
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16604 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
default principal from v4 CCAPI glue code
ticket: 2634
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16602 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
ticket: 2637
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16601 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
manipulation
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16588 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
with a macro first.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16579 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16573 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
ticket: 2629
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16571 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
| |
< #if !!defined(_WIN32)
---
> #if !defined(_WIN32)
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16570 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16569 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16549 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
|
|
|
| |
(JOIN__2, JOIN__2_2): Renamed from JOIN2 and JOIN2_2. Insert two underscores
between the tokens supplied. All uses changed to use new macros, and not use
identifiers with leading underscores.
ticket: 2603
status: resolved
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16521 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
part of the pre-Mac OS X support. (Except the bits in the Yarrow code, where
it was part of the upstream source.)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16506 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
the linker-driven version for Windows. The auxinit function definition needs
an argument list.
(MAKE_FINI_FUNCTION): Likewise.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16488 dc483132-0cff-0310-8789-dd5450dbe970
|