Ken Raeburn [Wed, 29 Oct 2003 00:30:00 +0000 (00:30 +0000)]
* gssapiP_generic.h: Include k5-platform.h.
(gssint_uint64): New typedef.
(g_order_init, g_order_check): Update decls.
* util_ordering.c (struct _queue): Change sequence number fields to
gssint_uint64. Add mask field.
(queue_insert): Change sequence number to gssint_uint64.
(g_order_init): Change sequence numbers to gssint_uint64. Add "wide_nums"
argument; initialize the queue mask field based on it. Store a -1 as the first
element.
(g_order_check): Store and check elements as offsets from firstnum. Mask to 32
bits if desired.
Ken Raeburn [Thu, 25 Sep 2003 07:17:51 +0000 (07:17 +0000)]
* k5-platform.h: New header file. Manages inline-function and 64-bit support,
in platform-specific ways.
* fake-addrinfo.h: Include k5-platform.h.
(inline): Don't define here.
* k5-int.h: Include k5-platform.h.
(krb5_ui_8, krb5_int64): New typedefs.
(krb5_ser_pack_int64, krb5_ser_unpack_int64): New function decls.
Ken Raeburn [Sat, 13 Sep 2003 03:33:14 +0000 (03:33 +0000)]
Alpha OSF build fails because daemon() tries to call setpgrp because
it doesn't know setsid is available. It's using autoconf.h, but no
longer using the defines set in lib/krb5/posix/Makefile.
Ken Raeburn [Sat, 30 Aug 2003 01:55:40 +0000 (01:55 +0000)]
While libc5 isn't one of our supported configurations, this is a simple enough
change. It should be in the 1.4 release. (Next 1.3.x release? I don't know.)
* fake-addrinfo.h (WRAP_GETADDRINFO, COPY_FIRST_CANONNAME): Don't define on
Linux unless HAVE_GETADDRINFO is defined, for libc5 compatibility.
Ken Raeburn [Sat, 30 Aug 2003 01:09:41 +0000 (01:09 +0000)]
Copy and build daemon.c in whatever directories need it, instead of building it
into the krb5 library.
* aclocal.m4 (KRB5_AC_NEED_DAEMON): New macro.
* appl/bsd/configure.in, kadmin/configure.in, kdc/configure.in,
krb524/configure.in, slave/configure.in: Use it. Don't directly check if
prototype for daemon() is needed.
* kadmin/server/Makefile.in (OBJS), kadmin/v5passwdd/Makefile.in (SERV_OBJS),
kdc/Makefile.in (OBJS, fakeka), krb524/Makefile.in (SERVER_OBJS),
slave/Makefile.in (SERVEROBJS): Use LIBOBJS.
* config/post.in (daemon.c): New rule for copying daemon.c locally
from lib/krb5/posix.
Ken Raeburn [Fri, 29 Aug 2003 07:09:48 +0000 (07:09 +0000)]
krshd hangs in linux nightly testing
A typical stack trace:
#0 0xffffe002 in ?? ()
#1 0x420da75f in syslog () from /lib/tls/libc.so.6
#2 0x0804ad06 in cleanup (signumber=15) at krshd.c:567
#3 <signal handler called>
#4 0xffffe000 in ?? ()
#5 0x4202774e in sigaction () from /lib/tls/libc.so.6
#6 0x0804ac82 in cleanup (signumber=1) at krshd.c:548
#7 <signal handler called>
#8 0xffffe002 in ?? ()
#9 0x4202774e in sigaction () from /lib/tls/libc.so.6
#10 0x420daa21 in vsyslog () from /lib/tls/libc.so.6
#11 0x420da75f in syslog () from /lib/tls/libc.so.6
#12 0x0804b670 in doit (f=3, fromp=0xbfffda50) at krshd.c:1313
#13 0x0804ab87 in main (argc=11, argv=0xbfffdb34) at krshd.c:459
#14 0x420156a4 in __libc_start_main () from /lib/tls/libc.so.6
Yes, we're calling syslog from inside a signal handler. Yes, this is
bad. And from some poking about that I did earlier, it appears that
there's some locking code in vsyslog which may be deadlocking in the
nested call. And this usually seems to happen when logging the "shell
process completed" message.
This is a quick patch to switch off the signal handlers before logging
that message. I suspect the breakage happens earlier, though, so this
might not fix the bug, just maybe move it around a little.
* krshd.c (ignore_signals): Split out from cleanup().
(doit): Call it when the shell process has completed, before calling syslog.
Ken Raeburn [Wed, 27 Aug 2003 01:10:56 +0000 (01:10 +0000)]
In my tests (2GHz P4 Linux, 5 minutes, no pre-existing replay cache), this gets
about a 10% speedup adding entries to an already open replay cache.
* rc_dfl.c (alive): Take a timestamp argument instead of the context, and don't
check the current time here. All callers changed to pass in the current time.
(rc_store): Take a timestamp argument. All callers changed to pass in the
current time.
Ken Raeburn [Tue, 26 Aug 2003 20:34:46 +0000 (20:34 +0000)]
* cc_file.c (krb5_fcc_store_int32, krb5_fcc_store_ui_4, krb5_fcc_store_ui_2)
(krb5_fcc_store_octet): Remove gratuitous conditionalizing of casts on
USE_STDIO, left over from merge.
Ken Raeburn [Tue, 26 Aug 2003 16:27:55 +0000 (16:27 +0000)]
* aclocal.m4 (WITH_CCOPTS, WITH_CPPOPTS, WITH_LINKER, WITH_LDOPTS,
KRB5_INIT_CCOPTS, WITH_CC_DEPRECATED_ARG): Deleted.
(CONFIG_RULES): Do the non-useless parts directly here.
(V5_SET_TOPDIR): Work quietly.
(WITH_KRB4): Use AC_MSG_NOTICE.
Ken Raeburn [Thu, 21 Aug 2003 08:28:48 +0000 (08:28 +0000)]
* dnssrv.c: New file; split out DNS SRV RR query support...
* locate_kdc.c: ...from here. Always compile in the calls.
* Makefile.in (STLIBOBJS, OBJS, SRCS): Add it.
Ken Raeburn [Thu, 21 Aug 2003 03:55:53 +0000 (03:55 +0000)]
Make things work on IRIX again
* fake-addrinfo.h (inline): Move definitions further up, before first use. Do
use __inline__ for gcc without c99 support.
(GET_SERV_BY_NAME) [!GETSERVBYNAME_R_RETURNS_INT]: Fix invocation for IRIX
definition.
* socket-utils.h: Include port-sockets.h to get a definition for struct
sockaddr_storage.
Ken Raeburn [Thu, 21 Aug 2003 01:50:02 +0000 (01:50 +0000)]
First cut at adding local caching to the getaddrinfo support. Still needs work
* fake-addrinfo.h: Delete the unused WRAP_GETNAMEINFO support.
(HAVE_GETADDRINFO) [__APPLE__ && __MACH__]: Don't undefine.
(FAI_CACHE) [__APPLE__ && __MACH__]: Define.
(system_getaddrinfo, system_freeaddrinfo, system_getnameinfo): New functions.
(gaiptr, faiptr, gniptr): Variables deleted. Change references to use the
system_* functions above.
(getaddrinfo, freeaddrinfo) [FAI_CACHE]: Define as macros to the my_fake_*
versions.
(protoname, socktypename, familyname): Use caller-supplied buffers instead of
local static buffers.
(debug_dump_getaddrinfo_args): Provide a buffer.
(NEED_FAKE_GETNAMEINFO): Define if HAVE_GETADDRINFO is not defined.
(inline): Rework macros to test for C99 and IRIX.
(NEED_FAKE_GETADDRINFO): Define if FAI_CACHE is defined.
(fai_add_entry) [KRB5_USE_INET6]: Support IPv6.
(CACHE_ENTRY_LIFETIME): New macro.
(struct face, struct fac): New types.
(fac): New static variable.
(plant_face, find_face): New functions.
(fai_add_hosts_by_name) [FAI_CACHE]: Check the cache before looking up the
hostname. Add the looked-up host info to the cache.
(fake_getaddrinfo): Call GET_SERV_BY_NAME instead of conditionally calling
getservbyname or getservbyname_r. Don't pass AF_INET to
fai_add_hosts_by_name.
(fake_getnameinfo): Define only if NEED_FAKE_GETNAMEINFO is defined.
(gai_strerror): Define if either HAVE_FAKE_GETADDRINFO or NEED_FAKE_GETNAMEINFO
is defined.
(getaddrinfo): Do define function if FAI_CACHE is defined.
(getnameinfo): Define only if NEED_FAKE_GETNAMEINFO is defined.
Tom Yu [Tue, 12 Aug 2003 02:18:55 +0000 (02:18 +0000)]
* cnv_tkt_skey.c (krb524_convert_tkt_skey): Call krb_create_ticket
instead of local version. Remove local version of
krb_create_ticket. This file no longer gets included into a
krb524 library, so accessing internal functions isn't that big of
an issue anymore.
Tom Yu [Fri, 8 Aug 2003 20:38:55 +0000 (20:38 +0000)]
get_init_creds_password: DNS SRV off causes bogus REALM_UNKNOWN
* gic_pwd.c (krb5_get_init_creds_password): If DNS SRV support is
turned off, the second call to get_init_creds() will fail with
KRB5_REALM_UNKNOWN under certain circumstances. If that happens,
return the error from the first call to get_init_creds(), which
will be more useful to the user.
ticket: new
target_version: 1.3.2
tags: pullup
component: krb5-libs
krb5_get_host_realm and krb5_free_host_realm should not be labeled as KRB5_PRIVATE.
They are required for many applications including OpenAFS and UMich's Kx509. 1.2.8
had them public but the change was never reflected on the trunk.
Ken Raeburn [Fri, 25 Jul 2003 15:37:57 +0000 (15:37 +0000)]
use new config file tag for master KDC
We want to avoid making extra attempts to contact the "master" KDC, in the case
where the password appears to be incorrect according to one KDC but we think
maybe the master KDC could have a newer password, if there isn't actually a
master KDC. Currently the admin_server tag is overloaded for kadmin and
password changing. So, don't use it as a filter on the KDC list; instead, look
for master_kdc as an independent list.
(See also ticket 1511 re contacting the master twice if it's first in the
regular KDC list.)
Doc updates still needed.
* locate_kdc.c (krb5_locate_kdc): Always pass 0 to locate_server as the
get_masters argument. Instead, if get_masters is set, look up "master_kdc" in
the config file instead of "kdc".
ticket: new
target_version: 1.3.2
tags: pullup
status: open