Sam Hartman [Wed, 9 Jun 2004 18:30:01 +0000 (18:30 +0000)]
If channel bindings are supplied to server require them to be matched
Based on discussion on kerberos@mit.edu, the decision to allow null
channel bindings from a client to match even when server channel
bindings are supplied is flawed. This decision assumes that we cannot
get server implementations to change even though we are able to deploy
a new Kerberos implementation on the server. In practice the server
implementations in question have actually changed and so the only part
of revision 1.54 of accept_sec_context.c we actually need is the code
to ignore channel bindings if null channel bindings are passed into
the server. Thus the change to allow null channel bindings from the
client to match against any channel bindings on the server is backed
out.
Ken Raeburn [Tue, 8 Jun 2004 19:26:06 +0000 (19:26 +0000)]
* pre.in (AUTOCONF, AUTOHEADER): Always set to autoconf and autoheader
respectively.
(AUTOCONFFLAGS, AUTOHEADERFLAGS): Always set to empty.
* post.in (Makefile): Always run autoconf with --include, don't bother with
--localdir any more. Don't delete autom4te.cache here.
(clean-unix): Delete autom4te.cache.
Ezra Peisach [Mon, 7 Jun 2004 19:25:32 +0000 (19:25 +0000)]
* network.c (paddr): Use unsigned int for length.
(kdc_conn_type): Declare CONN_ enumerated types in connection as
distinct type.
(add_fd): Declare as taking enum type instead of simply
integer. Prevents assignment of interger to an enum.
(process_tcp_connection): Remove variable assigned to but never used.
Ken Raeburn [Fri, 4 Jun 2004 22:35:25 +0000 (22:35 +0000)]
Change all uses of LIB in UNIX makefiles to LIBBASE, for better Windows
compatibility. (Windows nmake exports make variables into the environment, and
LIB is treated by the Windows linker as a search path for libraries, thus
breaking the linking on Windows of anything needing libraries from the search
path in directories where we build libraries on UNIX.)
Ken Raeburn [Thu, 3 Jun 2004 00:30:02 +0000 (00:30 +0000)]
The com_err library is now probably as thread-safe as it's going to get, on
UNIX; Windows still needs work....
* com_err.c: Include stdlib.h.
(com_err_hook_lock): New mutex.
(com_err_lock_hook_handle): New function.
(com_err_va, set_com_err_hook, reset_com_err_hook): Call com_err_finish_init,
and grab the lock.
* error_message.c: Don't include k5-thread.h.
(com_err_finish_init): New function.
(com_err_initialize): Initialize the new mutex.
* error_table.h: Include k5-thread.h.
(com_err_hook_lock, com_err_finish_init): Declare.
Ken Raeburn [Wed, 2 Jun 2004 23:47:36 +0000 (23:47 +0000)]
* k5-thread.h: Error out at compile time if thread support is enabled but the
thread system isn't pthreads. (This is after the code disabling thread support
for non-pthreads systems, so it's a placeholder for now that should never get
invoked.)
Ken Raeburn [Wed, 2 Jun 2004 23:41:51 +0000 (23:41 +0000)]
* prng.c (init_once): Variable deleted.
(krb5_c_random_add_entropy): Do the initialization once, using the yarrow_lock
mutex instead of k5_once to protect it.
Ken Raeburn [Wed, 2 Jun 2004 22:54:31 +0000 (22:54 +0000)]
* gss_libinit.c (gssint_lib_init): Initialize error tables here.
(gssint_initialize_library): Don't do it directly here. Make sure
gssint_lib_init has been called, and return the status.
(gssint_lib_fini): Remove error tables here.
(gssint_cleanup_library): Function deleted.
(initialized): Variable deleted.
Ken Raeburn [Wed, 2 Jun 2004 22:35:33 +0000 (22:35 +0000)]
Add/remove error tables in library initialization/termination, not per context.
Use only one library initialization scheme, and install the error tables in
only one place.
* krb5_libinit.c (initialized): Variable deleted, all references removed.
(krb5int_lib_init): Initialize error tables here.
(krb5int_initialize_library): Don't do it here.
* error_tables/Makefile.in (STLIBOBJS, OBJS, SRCS): Drop init_ets code.
* krb/init_ctx.c (init_common): Don't call krb5_init_ets.
(krb5_free_context): Don't call krb5_free_ets.
Ken Raeburn [Wed, 2 Jun 2004 22:25:37 +0000 (22:25 +0000)]
Move definitions of struct krb5_rc_st, struct _krb5_rc_ops, krb5_rc_ops, and
declarations of krb5_rc_register_type, krb5_rc_dfl_ops from k5-int.h to
rc-int.h. Include rc-int.h in the krb5/rcache files that need it.
Tom Yu [Tue, 1 Jun 2004 20:16:38 +0000 (20:16 +0000)]
fix buffer overflow in an_to_ln.c
* an_to_ln.c (rule_an_to_ln): Fix buffer overflow when parsing
principal names into components.
(do_replacement): likewise
(aname_replacer): Support error return from do_replacement
ticket: new
version_reported: 1.3.3
target_version: 1.3.4
tags: pullup
component: krb5-libs
Ken Raeburn [Sun, 30 May 2004 20:06:15 +0000 (20:06 +0000)]
* aclocal.m4 (KRB5_AC_GCC_ATTRS): On AIX 4, mark the destructor attribute as
always not working, until we can construct a good test for the order of
destructors in the multiple shared library case.
Ken Raeburn [Sun, 30 May 2004 07:27:32 +0000 (07:27 +0000)]
* getdate.y: Include krb5.h and kadmin.h.
(get_date): Drop second argument; always use NULL.
* kadmin.h: Include time.h and/or sys/time.h.
(get_date): Declare.
* kadmin.c (get_date): Don't declare.
(kadmin_parse_princ_args, kadmin_parse_policy_args): Drop second argument to
get_date.
* Makefile.in (LOCALINCLUDES): Define.
Ken Raeburn [Sun, 30 May 2004 06:05:54 +0000 (06:05 +0000)]
Silence some gcc compilation warnings:
* ksetpwd.c (verify_creds, get_init_creds_opt_init, userinitcontext,
init_creds): Now static.
(main): Remove one of two variables named "ccache".
Ken Raeburn [Thu, 27 May 2004 23:07:50 +0000 (23:07 +0000)]
* win-pre.in (CP): Copy nul: plus the file, to avoid carrying over the original
modification time, since some of our makefiles depend on $(CP) updating the
timestamp. Use binary mode for the copy, because default/ASCII seems to cause
a ^Z to be added to the file.
Jeffrey Altman [Wed, 26 May 2004 13:10:49 +0000 (13:10 +0000)]
* cc_mslsa.c: GetMSTGT(). Add krb5_context
parameter to allow krb5_get_permitted_enctype() to be called
instead of using a hardcoded list of enctypes which may change
in the future.
krb5_lcc_get_name(): fix return value if Kerberos is not supported.
Tom Yu [Tue, 25 May 2004 21:48:02 +0000 (21:48 +0000)]
* aesopt.h (PLATFORM_BYTE_ORDER): Treat _WIN32 as always
little-endian. Default to little-endian if there's no other
compile-time way to detect endianness, noting it as a guess.
(SAFE_IO): Error out if SAFE_IO is not set and endianness was
guessed.
Jeffrey Altman [Mon, 17 May 2004 14:48:14 +0000 (14:48 +0000)]
* kfw.nsi, kfw-fixed.nsi, utils.nsi:
- replace the UpdateDLL macro with the ReplaceDLL macro
- use ReplaceDLL to install all .exe and .dll files
this will allow the installer to work even when some files
are loaded by modules which cannot be terminated such as
Network Providers (afslogon.dll for example)
Jeffrey Altman [Sat, 15 May 2004 04:08:08 +0000 (04:08 +0000)]
2004-05-15 Jeffrey Altman <jaltman@mit.edu>
* cc_mslsa.c:
Do not use the FAILED() macro to test the result of ConstructTicketRequest().
ConstructTicketRequest() returns positive errors and FAILED() only considers
negative values to be a failure condition.
Also, close potential memory leak of LSA allocated memory.
Jeffrey Altman [Thu, 13 May 2004 03:16:24 +0000 (03:16 +0000)]
* send_tgs.c: krb5_send_tgs() was broken in the case of a KRB_ERROR
message. The krb5_response message_type field was never set
resulting in stack garbage being used instead. This would
break code which used transitive cross-realm to obtain service
tickets.
Ken Raeburn [Fri, 7 May 2004 23:29:38 +0000 (23:29 +0000)]
* configure.in: Check for endian.h and machine/endian.h.
* aes/aesopt.h (PLATFORM_BYTE_ORDER): Check for _MIPSEB, _MIPSEL. If endian.h
or machine/endian.h is available, include it instead of sys/param.h. Don't
mess around with multibyte character constants.
Ken Raeburn [Fri, 7 May 2004 23:26:43 +0000 (23:26 +0000)]
* configure.in: Check for machine/endian.h too.
* include/db-int.h: Include machine/endian.h if available. Check for
__LITTLE_ENDIAN__ and __BIG_ENDIAN__, _MIPSEB and _MIPSEL.
Ken Raeburn [Thu, 6 May 2004 02:28:25 +0000 (02:28 +0000)]
Start using our first bit of per-thread storage
* error_message.c (buffer): Static variable deleted.
(com_err_initialize): Register cleanup support for com_err thread-specific data
key.
(error_message): Use a per-thread dynamically-allocated buffer instead of
static storage, for the case where an unknown error code is given. If any
errors occur allocating or tracking the buffer, return a fixed message.
* t_com_err.c: Include stdlib.h. If TEST_THREADS is defined, include
pthread.h.
(run): Renamed from main, changed signature.
(main): New function. Just call run, or if TEST_THREADS is defined, create a
thread to call it.
Ken Raeburn [Thu, 6 May 2004 01:33:56 +0000 (01:33 +0000)]
Since the AES code builds, and doesn't do any configure-time byte order checks
that I noticed, something similar ought to work for the DB code. This is the
first cut; nightly testing builds should tell us if it's sufficient on most of
the platforms we work on.
* include/db-int.h: Include stdlib.h, and endian.h if available.
(LITTLE_ENDIAN, BIG_ENDIAN, BYTE_ORDER): If not defined, and if versions with
one or two leading underscores are defined, define the no-underscore form in
terms of the with-underscore one.
(DB_BYTE_ORDER): Define by checking LITTLE_ENDIAN, BIG_ENDIAN, and BYTE_ORDER;
report an error if that doesn't work. Don't check WORDS_BIGENDIAN.
* Makefile.in (all-prerecurse): Make sure headers generated by config.status
are up to date.
(include/config.h, $(srcdir)/include/config.h.in, include/db-config.h): New
rules.
* configure.in: Don't check byte order here. Check for endian.h.
Ken Raeburn [Wed, 5 May 2004 01:19:43 +0000 (01:19 +0000)]
* configure.in: Enable dependency support for shared lib.
* Makefile.in (test_et, t_com_err): Depend on, and link against, the new
support library.
(SHLIB_EXPDEPS, SHLIB_EXPLIBS, SHLIB_RDIRS, SHLIB_DIRS): New variables.