Ken Raeburn [Wed, 24 Jan 2001 04:59:07 +0000 (04:59 +0000)]
* stringtokey.c (kerberos): Now const.
(krb5_dk_string_to_key): Cast it to non-const.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12939
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Wed, 24 Jan 2001 04:22:43 +0000 (04:22 +0000)]
* forward.c (rd_and_store_for_creds): Overwrite any existing value
of the KRB5CCNAME environment variable.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12937
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Wed, 24 Jan 2001 02:18:20 +0000 (02:18 +0000)]
* rc_io.c (getdir): Subtract one from dirlen, since sizeof
includes the terminating NUL character. Avoid redundant path
separators.
(krb5_rc_io_move): When renaming OLD to NEW, don't copy the
filename. This was causing temporary files to get leaked.
(krb5_rc_io_close): Don't FREE if d->fn is NULL.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12935
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Tue, 23 Jan 2001 05:52:43 +0000 (05:52 +0000)]
document recent large number of changes
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12934
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Tue, 23 Jan 2001 05:52:15 +0000 (05:52 +0000)]
* cr_ciph.c: Include prot.h. KRB4_PUT32 -> KRB4_PUT32BE.
[missed one]
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12933
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Tue, 23 Jan 2001 05:48:06 +0000 (05:48 +0000)]
* prot_common.c: New file; contains functions to encode/decode
string triples for principals.
* prot_kdc.c: New file; contains encoders and decoders
(eventually) for the KDC's use.
* Makefile.in (OBJS, SRCS): Add prot_common.o, prot_kdc.o.
* cr_auth_repl.c: KRB4_PUT{16,32} -> KRB4_PUT{16,32}BE.
* cr_ciph.c: Include prot.h. KRB4_PUT32 -> KRB4_PUT32BE.
* cr_err_repl.c: KRB4_PUT32 -> KRB4_PUT32BE.
* cr_tkt.c: KRB4_PUT32 -> KRB4_PUT32BE.
* decomp_tkt.c: krb_strnlen -> krb4int_strnlen.
* g_ad_tkt.c: krb_strnlen -> krb4int_strnlen. KRB4_PUT32 ->
KRB4_PUT32BE. Properly skip date while parsing error.
* g_in_tkt.c: krb_strnlen -> krb4int_strnlen. KRB4_PUT32 ->
KRB4_PUT32BE. Properly skip date while parsing error.
* g_phost.c: Changes from audit. Actually bail out instead of
failing silently if h->h_name is too long.
* kname_parse.c: Changes from audit. Check overrun per character
processed.
* mk_auth.c: krb_strnlen -> krb4int_strnlen. KRB4_PUT32 ->
KRB4_PUT32BE. Include prot.h.
* mk_err.c: KRB4_PUT32 -> KRB4_PUT32BE.
* mk_priv.c: KRB4_PUT32 -> KRB4_PUT32BE.
* mk_req.c: KRB4_PUT32 -> KRB4_PUT32BE.
* mk_safe.c: KRB4_PUT32 -> KRB4_PUT32BE.
* rd_req.c: krb_strnlen -> krb4int_strnlen.
* strnlen.c: Rename to krb4int_strnlen. Also include prot.h,
which is where strnlen is declared now.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12932
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Tue, 23 Jan 2001 05:39:27 +0000 (05:39 +0000)]
* krb.h: Remove internal prototypes and macros
* prot.h: Put internal prototypes and macros here. Make
KRB4_PUT{16,32} into little-endian and big-endian versions
thereof, with the original names getting an extra arg to determine
endianness of encoding.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12931
dc483132-0cff-0310-8789-
dd5450dbe970
Danilo Almeida [Mon, 22 Jan 2001 21:42:03 +0000 (21:42 +0000)]
* krb5_32.def: Add krb5_rc_close() so gssapi builds
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12930
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 21 Jan 2001 01:27:53 +0000 (01:27 +0000)]
missed a variable that should've been made const
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12929
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 21 Jan 2001 01:15:56 +0000 (01:15 +0000)]
add mit copyright
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12928
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sun, 21 Jan 2001 01:07:12 +0000 (01:07 +0000)]
fix year for last change
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12927
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 20 Jan 2001 13:17:32 +0000 (13:17 +0000)]
make afs string2key thread-safe
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12926
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 20 Jan 2001 13:10:34 +0000 (13:10 +0000)]
add some comments
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12925
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 20 Jan 2001 13:08:45 +0000 (13:08 +0000)]
new test case for afs string2key
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12924
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 20 Jan 2001 04:16:01 +0000 (04:16 +0000)]
* preauth.c: Don't use PROTOTYPE macro, just always use the prototypes
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12923
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Sat, 20 Jan 2001 04:03:09 +0000 (04:03 +0000)]
* preauth.c: Remove uses of KRB5_NPROTOTYPE() macro
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12922
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 20 Jan 2001 03:19:52 +0000 (03:19 +0000)]
* krb5.hin (KRB5_NPROTOTYPE): Delete
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12921
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 20 Jan 2001 03:08:42 +0000 (03:08 +0000)]
Always use ANSI C features (prototypes, const, void *, etc).
Convert rcache dispatch macros to functions; hide rcache data structures.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12920
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 20 Jan 2001 03:06:32 +0000 (03:06 +0000)]
* rcfns.c: New file, with fn versions of former dispatch macros from krb5.h
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12919
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 20 Jan 2001 02:38:04 +0000 (02:38 +0000)]
* coding-style: Assume ANSI C '89. Use krb5int_ for internal names
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12918
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 20 Jan 2001 02:10:20 +0000 (02:10 +0000)]
some updates, looking towards 1.3
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12917
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 20 Jan 2001 01:54:26 +0000 (01:54 +0000)]
rebuilt
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12916
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 20 Jan 2001 01:54:16 +0000 (01:54 +0000)]
* com_err.h (add_error_table, remove_error_table): Annotate as modifying
internal state.
(struct et_list, _et_list): Remove.
* error_table.h (struct et_list, _et_list): Put back here.
* error_message.c (add_error_table, remove_error_table): Annotate specific
modifications. Disable inconsistent-defifition checks since _et_list isn't
describe in the header file but is global and modified.
* et_c.awk: Make the generated initialization function simply call
add_error_table, and drop the static linked-list node.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12915
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Fri, 19 Jan 2001 01:05:13 +0000 (01:05 +0000)]
* g_ad_tkt.c: Fix error packet parsing
* g_in_tkt.c: Fix error packet parsing. Also, declare some
internal functions as static and add prototypes.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12914
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 18 Jan 2001 03:48:05 +0000 (03:48 +0000)]
use revised compile_et script instead of calling awk directly
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12913
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 18 Jan 2001 01:42:11 +0000 (01:42 +0000)]
update to implement equivalent of ref count
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12911
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 18 Jan 2001 01:05:22 +0000 (01:05 +0000)]
Make compile_et script installable, and install it.
Use it when building test programs too.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12910
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 17 Jan 2001 04:50:54 +0000 (04:50 +0000)]
Make prototypes unconditional
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12908
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 17 Jan 2001 02:05:52 +0000 (02:05 +0000)]
* str_conv.c (krb5_keysalt_iterate): Always use the prototype for
function-pointer argument ITERATOR.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12907
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 17 Jan 2001 02:02:11 +0000 (02:02 +0000)]
* krcp.c (error): Always declare with ellipsis
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12906
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 16 Jan 2001 19:01:01 +0000 (19:01 +0000)]
* acconfig.h (HAVE_SA_LEN): Undef
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12905
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 16 Jan 2001 19:00:45 +0000 (19:00 +0000)]
* configure.in: Call AC_REQUIRE_CPP before checking for GCC, to ensure that we
always set $CPP.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12904
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Sun, 14 Jan 2001 03:31:19 +0000 (03:31 +0000)]
Document configure.in change
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12903
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Sun, 14 Jan 2001 03:26:06 +0000 (03:26 +0000)]
2001-01-12 Sam Hartman <hartmans@mit.edu>
* krlogin.c: Previously, we only used TIOCGLTC on systems with
termios. This is sort of silly since its a BSD 4.[23] IOCTL. We
then go out of our way not to use it on IRIX, Solaris or HPUX. I
think all this comes about because you really want to use BSD
IOCTLS on Sunos rather than termios. I propose to do that and
never use BSD IOCTLs on Sunos.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12902
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Sat, 13 Jan 2001 00:55:07 +0000 (00:55 +0000)]
* sane_hostname.c: Switch off of KRB5_USE_INET6 instead of
AF_INET6, which may be defined without a corresponding struct
sockaddr_in6.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12901
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 18 Dec 2000 08:03:48 +0000 (08:03 +0000)]
* configure.in: Look for socklen_t, define HAVE_SOCKLEN_T if found
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12897
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 18 Dec 2000 08:00:49 +0000 (08:00 +0000)]
localaddr.c: Add getnameinfo support. Annotate for lclint.
Makefile.in: New target for running lclint on localaddr.c.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12896
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 15 Dec 2000 07:32:16 +0000 (07:32 +0000)]
* ktutil.c (ktutil_list): Provide a real usage message
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12895
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 15 Dec 2000 07:11:07 +0000 (07:11 +0000)]
add "-4" option to rlogin to not try krb5 auth
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12894
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 13 Dec 2000 03:41:59 +0000 (03:41 +0000)]
fix multiple-include problem on OpenBSD
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12893
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 13 Dec 2000 03:29:51 +0000 (03:29 +0000)]
update network.c with getifaddrs support from lib/krb5/os/localaddr.c
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12892
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 9 Dec 2000 02:48:42 +0000 (02:48 +0000)]
log msg for previous checkins
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12889
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 8 Dec 2000 04:55:09 +0000 (04:55 +0000)]
check in -01 draft
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12888
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 8 Dec 2000 04:48:24 +0000 (04:48 +0000)]
* k5seal.c (make_seal_token_v1): Use ANSI-style definition, instead of K&R plus
prototype. Don't use too-big numbers even as placeholders.
* accept_sec_context.c (rd_and_store_for_creds): After creating an auth
context, set flags to require sequence numbers.
(krb5_gss_accept_sec_context): Likewise.
* init_sec_context.c (krb5_gss_init_sec_context): Likewise.
(thanks to assar for noticing this)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12887
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 6 Dec 2000 23:31:05 +0000 (23:31 +0000)]
make some variables volatile
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12886
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 6 Dec 2000 11:47:47 +0000 (11:47 +0000)]
* aclocal.m4 (KRB5_AC_INET6): Ensure that we check for sa_len field
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12885
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 6 Dec 2000 11:46:04 +0000 (11:46 +0000)]
Use const sockaddr pointer in interface.
Use get{name,addr}info if available, to pick up IPv6 support.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12884
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 6 Dec 2000 09:46:49 +0000 (09:46 +0000)]
make pty_make_sane_hostname take sockaddr* arg instead of sockaddr_in*
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12883
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 6 Dec 2000 09:01:33 +0000 (09:01 +0000)]
restore GSS_DLLIMP, KRB5_EXPORTVAR, NEAR macros
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12882
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 6 Dec 2000 08:47:42 +0000 (08:47 +0000)]
fix typo
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12881
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 6 Dec 2000 08:47:11 +0000 (08:47 +0000)]
Remove a bunch of macro definitions we don't use.
Run lclint on t_com_err test case; tune options; more annotations.
Use <com_err.h> instead of duplicated definitions in generated files.
Rebuild Perl versions of awk scripts for generating files.
Dump K&R C support, assume C89/C++.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12880
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 6 Dec 2000 01:51:57 +0000 (01:51 +0000)]
undo last change
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12879
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 6 Dec 2000 01:49:05 +0000 (01:49 +0000)]
tweak names of perl scripts
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12878
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 6 Dec 2000 01:47:28 +0000 (01:47 +0000)]
try lclint on a com_err test program; misc cleanup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12877
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 6 Dec 2000 01:41:41 +0000 (01:41 +0000)]
some notes on interactions with 64-bit systems
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12876
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 6 Dec 2000 01:36:33 +0000 (01:36 +0000)]
(WITH_CC): Don't use -Wtraditional, we're always assuming ANSI mode now
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12875
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 5 Dec 2000 23:17:28 +0000 (23:17 +0000)]
* aclocal.m4 (KRB5_AC_INET6): Look for netdb.h.
(KRB5_AC_CHECK_INET6): Require <netinet/in.h>, <netdb.h>, inet_ntop,
getaddrinfo, AF_INET6, several NI_* macros, AI_ADDRCONFIG, and AI_NUMERICHOST.
This should be a reasonable test for conformance to certain parts of RFC2553,
giving us reasonable generic sockaddr/hostname processing.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12874
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 21 Nov 2000 23:32:47 +0000 (23:32 +0000)]
* cmds.c (globulize): Use correct address of globbed results when
freeing storage. Patch from Nalin Dahyabhai <nalin@redhat.com>.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12869
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 14 Nov 2000 05:33:01 +0000 (05:33 +0000)]
make "make check" do something
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12868
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Thu, 9 Nov 2000 20:33:14 +0000 (20:33 +0000)]
* dyn_create.c (DynCopy): Arguments to memcpy were reversed. Found
while playing with lclint.
DynCopy is not used in our tree.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12867
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Thu, 9 Nov 2000 19:35:26 +0000 (19:35 +0000)]
* Makefile.in (check-unix): Built and execture dyntest
* test.c: Include string,h, stdlib.h.
* dyn_create.c, dyn_delete.c, dyn_insert.c, dyn_put.c,
dyn_realloc.c: Cast arguments to malloc(), realloc(), memmove() to
size_t.
* dynP.h: Provide full prototypes for _DynRealloc() and _DynResize().
* dyn.h: Add prototype for DynAppend.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12866
dc483132-0cff-0310-8789-
dd5450dbe970
Danilo Almeida [Thu, 9 Nov 2000 17:45:29 +0000 (17:45 +0000)]
* strnlen.c (krb_strnlen): Put The return type before the calling
convention.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12865
dc483132-0cff-0310-8789-
dd5450dbe970
Danilo Almeida [Thu, 9 Nov 2000 01:51:59 +0000 (01:51 +0000)]
Fix common mis-spelling of my name. (There's only one "l" in Danilo. :-)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12864
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Wed, 8 Nov 2000 23:19:31 +0000 (23:19 +0000)]
* configure.in: Change KRB4_DEJAGNU_TEST variable to KRBIV from
KRB4; dejagnu-1.3 doesn't like digits in passed-in variables.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12862
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Wed, 8 Nov 2000 23:18:39 +0000 (23:18 +0000)]
* default.exp: Use $KRBIV rather than $KRB4 since dejagnu-1.3
doesn't deal with digits in passed-in variables.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12861
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Wed, 8 Nov 2000 23:17:50 +0000 (23:17 +0000)]
* v4gssftp.exp: Fix to handle some cases of krb4 failure prior to
timing out.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12860
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Wed, 8 Nov 2000 23:14:56 +0000 (23:14 +0000)]
* Makefile.in (OBJS, SRCS): Add strnlen.o, strnlen.c
* cr_auth_repl.c: Audit. Fix up copyright. Use new KRB4_PUT*
macros for encoding so output is always big-endian. Precompute
string lengths for better length-checking.
* cr_ciph.c: Audit. Fix up copyright. Use new KRB4_PUT* macros
for encoding so that output is always big-endian. Precompute
string lengths for better length-checking. Zero out the key
schedule after encrypting.
* cr_death_pkt.c: Audit. Fix up copyright. Precompute string
lengths for better length-checking.
* cr_err_repl.c: Audit. Fix up copyright. Use moving pointer to
do encoding. Precompute string lengths for better
length-checking. Use KRB4_PUT* macros so that output is always
big-endian.
* cr_tkt.c: Audit. Fix up copyright. Use KRB4_PUT* macros for
encoding so that output is always big-endian. Zero out the key
schedule after encrypting.
* decomp_tkt.c: Audit. Fix up copyright. Use krb_strnlen() for
actually detecting string length errors. Use a struct in_addr to
retrieve the IP address and assign it to paddress for return. Use
KRB4_GET* macros for decoding to avoid byteswapping problems.
Zero out session key and decrypted ticket on error.
* g_ad_tkt.c: Audit. Fix up copyright. Break out parsing of
decrypted KDC reply packet into a separate function to simplify
error handling somewhat. Precompute string lengths for better
length-checking. Use KRB4_PUT* macros for encoding so that output
is always big-endian. Use KRB4_GET* macros for decoding to avoid
byteswapping problems. Stomp on session key on error conditions.
* g_in_tkt.c: Audit. Fix up copyright. Precompute string lengths
for better length-checking. Use KRB4_PUT* macros for encoding so
output is always big-endian. Use KRB4_GET* macros for decoding to
avoid byteswapping problems. Use krb_strnlen() to actually detect
string length errors. Zero out session key and decrypted KDC
reply once they're no longer useful.
* mk_auth.c: Audit. Fix up copyright. Use moving pointer for
encoding. Use KRB4_PUT* macros for encoding to avoid alignment
issues with using memcpy(). Use KRB4_GET* macros for decoding to
avoid alignment issues with using memcpy().
* mk_err.c: Audit. Fix up copyright. Precompute string length.
Use KRB4_PUT* macros to always encode as big-endian.
* mk_preauth.c: Audit. Zero out key schedule after encryption.
* mk_priv.c: Audit. Fix up copyright. Use KRB4_PUT* macros for
encoding so output is always big-endian.
* mk_req.c: Audit. Fix up copyright. Use moving pointer for
encoding. Precompute string lengths for better length-checking.
Use KRB4_PUT* macros for encoding so output is always big-endian.
Zero out session key after encryption.
* mk_safe.c: Audit. Fix up copyright. Use KRB4_PUT* macros for
encoding so output is always big-endian.
* rd_err.c: Audit. Fix up copyright. Use KRB4_GET* macros to
avoid alignment issues.
* rd_preauth.c: Audit. Zero key schedule after decrypting.
* rd_priv.c: Audit. Fix up copyright. Use KRB4_GET* macros to
avoid alignment issues.
* rd_req.c: Audit. Fix up copyright.
* send_to_kdc.c (send_recv): Actually set rpkt->length, since some
callers actually use it now to do length-checking.
* strnlen.c: New file; compute string length, bounded by a
maximum. If the maximum number of characters has been read
without encountering a NUL character, return -1. This makes
overflow checking of strings in buffers much easier.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12859
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Wed, 8 Nov 2000 23:13:13 +0000 (23:13 +0000)]
* des.h: Change to make KRB4_32 an int if it's at least 32 bits
wide, else a long. This is a change from previously where it was
a long except on the alpha. We may want to rethink this if there
are binary compat issues that result. Also, define DES_INT32 as
KRB4_INT32.
* krb.h: Add new macros KRB4_PUT32, KRB4_PUT16 which
unconditionally encode integers by bytes as big-endian. Add new
macros KRB4_GET32BE, KRB4_GET32LE, KRB4_GET32, KRB4_GET16BE,
KRB4_GET16LE, KRB4_GET16 to retrieve integers by bytes. Add
prototype for krb_strnlen.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12858
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 8 Nov 2000 05:52:39 +0000 (05:52 +0000)]
problems found in auditing
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12857
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 8 Nov 2000 05:47:07 +0000 (05:47 +0000)]
clarify a little
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12856
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 8 Nov 2000 05:46:18 +0000 (05:46 +0000)]
Test out lclint and its4 on com_err library. One lclint error left on Solaris,
due to deficiencies in lclint. Its4 chokes in parser.
* com_err.h (struct error_table): Annotate MSGS as pointing to 'shared' data.
(error_message): Returned data is 'observer' and 'dependent'; modifies internal
state.
* com_err.c (default_com_err_proc): Cast various return values to void.
(reset_com_err_hook): Use NULL, not 0.
(com_err_hook): Annotate as 'null'.
* error_table.h (_et_list): Annotate as 'null' and 'dependent'.
(struct et_list): Annotate NEXT as 'dependent' and 'null', and TABLE as
'dependent'.
(struct dynamic_et_list): Duplicate et_list definition, except NEXT is
annotated as 'only' instead of 'dependent'.
(error_table_name, error_table_name_r): Annotate for lclint.
* et_h.awk: Add lclint annotations for initialize_* functions.
* error_message.c (_et_list): Can be 'null'.
(error_message): Explicitly compare against zero. Cast strerror arg to int.
(et_list_dynamic): New variable, for dynamically allocated list elements;
_et_list is now for statically allocated elements only.
(add_error_table, remove_error_table): Check both lists.
* et_name.c (error_table_name, error_table_name_r): Annotate for lclint.
* init_et.c (et_add_error_table): Change "link" to "e" to avoid confusion with
C library function in analysis tools.
* et1.et, et2.et, t_com_err.c: New files. Exercise addition and removal of
error tables from list, using both interfaces.
* Makefile.in (LCLINT, LCLINTOPTS, ITS4, ITS4OPTS): New variables.
(do-lclint, do-its4, et1.o, et2.o, t_com_err.o, t_com_err): New targets. Not
automatically invoked at present.
(FILES): Updated.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12855
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Thu, 2 Nov 2000 00:19:55 +0000 (00:19 +0000)]
* aclocal.m4 (CONFIG_RULES): Quote AUTOCONFFLAGS properly
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12851
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 20:30:04 +0000 (20:30 +0000)]
Oops - checked in a newer version by accident
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12850
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 20:00:47 +0000 (20:00 +0000)]
* configure.in: If the cache_file is /dev/null (autoconf 2.49),
set it to config.cache.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12849
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 18:36:12 +0000 (18:36 +0000)]
* reconf: Rework syntax to detect version numbers of newer
autoconf versions. For autoconf > 2.19, we need to pass an
absolute path for the localdir to autoreconf.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12846
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 15:22:43 +0000 (15:22 +0000)]
* aclocal.m4 (V5_SET_TOPDIR): In newer versions of autoconf
(2.49), AC_LOCALDIR is not set by the reconfiguration process. If
AC_LOCALDIR is not set, try to find the top of the tree by looking
for aclocal.m4. If aclocal.m4 ever exists in a subdir, we will
need to redo this test.
* aclocal.m4: Upgrade to autoconf 2 naming schemes - AC_C_CONST,
AC_CHECK_HEADER, AC_PROG_LN_S, AC_MSG_ERROR instead of AC_CONST,
AC_HEADER_CHECK, AC_LN_S, AC_ERROR. Use AC_DEFUN instead of
define() for macro definitions and better quoting of macros within
macros.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12845
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 15:10:10 +0000 (15:10 +0000)]
* configure.in: Update to autoconf 2 macro names:
AC_FORK->AC_FUNC_VFORK, AC_CONST->AC_C_CONST, AC_HEADER_CHECK ->
AC_CHECK_HEADER. In addition, conditionally use internal
AC_PROG_ECHO_N (autoconf 2.12) or _AC_PROG_ECHO (autoconf 2.49)
depending on which is defined.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12844
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 15:05:53 +0000 (15:05 +0000)]
* configure.in: Use AC_CHECK_FUNCS, AC_CHECK_HEADERS, AC_C_CONST
instead of the older names AC_HAVE_FUNCS, AC_HEADER_CHECK,
AC_CONST. Consolidate use of function testing macros.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12843
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 15:03:18 +0000 (15:03 +0000)]
* configure.in: Use AC_CHECK_HEADER and AC_CHECK_FUNC instead of
AC_HEADER_CHECK and AC_FUNC_CHECK.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12842
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 15:02:06 +0000 (15:02 +0000)]
* configure.in: Use AC_CHECK_HEADER and AC_FUNC_VFORK instead of
AC_HEADER_CHECK and AC_VFORK.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12841
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 15:00:50 +0000 (15:00 +0000)]
* configure.in: Use AC_C_CONST instead of AC_CONST
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12840
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:59:38 +0000 (14:59 +0000)]
* configure.in: Use AC_C_CONST instead of AC_CONST
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12839
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:59:03 +0000 (14:59 +0000)]
* configure.in: Use AC_C_CONST and AC_TYPE_SIGNAL instead of
AC_RETSIGTYPE and AC_TYPE_SIGNAL.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12838
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:57:25 +0000 (14:57 +0000)]
* configure.in: Get rid of test for termios.h. The kdc does not use it
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12837
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:54:23 +0000 (14:54 +0000)]
* configure.in: Use AC_TYPE_SIZE_T instead of AC_SIZE_T
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12836
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:53:17 +0000 (14:53 +0000)]
* configure.in: Use AC_CHECK_HEADERS instead of AC_HAVE_HEADERS
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12835
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:52:09 +0000 (14:52 +0000)]
* configure.in: Use AC_C_CONST and AC_CHECK_FUNCS instead of
AC_CONST and AC_HAVE_FUNCS.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12834
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:51:08 +0000 (14:51 +0000)]
* configure.in: Use AC_C_CONST instead of AC_CONST
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12833
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:50:04 +0000 (14:50 +0000)]
* configure.in: Use AC_C_CONST instead of AC_CONST and
AC_CHECK_HEADER instead of AC_HEADER_CHECK.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12832
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:46:57 +0000 (14:46 +0000)]
* configure.in: Quote macro use inside AC_CHECK_LIB. Change
AC_FUNC_CHECK to AC_CHECK_FUNC, AC_HAVE_FUNCS to AC_CHECK_FUNCS
and AC_HEADER_CHECK to AC_CHECK_HEADER..
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12831
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:43:36 +0000 (14:43 +0000)]
* configure.in (AC_COMPILE_TYPE): Declare with AC_DEFUN() instead
of define() as newer versions of autoconf check for AC_REQUIRE use
outside of AC_DEFUN.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12830
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:41:47 +0000 (14:41 +0000)]
* configure.in: Use AC_C_CONST instead of AC_CONST and
AC_CHECK_FUNCS instead of AC_HAVE_FUNCS.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12829
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:40:32 +0000 (14:40 +0000)]
* configure.in: Change AC_RETSIGTYPE to AC_TYPE_SIGNAL
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12828
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 1 Nov 2000 14:39:30 +0000 (14:39 +0000)]
* configure.in: Change AC_CONST to AC_C_CONST, AC_HEADER_EGREP to
AC_EGREP_HEADER, AC_HAVE_HEADERS to AC_CHECK_HEADERS. Updates to
autoconf 2 namespace.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12827
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Tue, 31 Oct 2000 17:37:48 +0000 (17:37 +0000)]
* aclocal.m4 (AC_LIBRARY_NET): Newer versions of autoconf are more
sensative to using macros within macros without quoting. Quote
AC_CHECK_LIB calls within AC_CHECK_LIB macro.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12826
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Tue, 31 Oct 2000 00:33:00 +0000 (00:33 +0000)]
* cc_stdio.c: Add a "mode" field to krb5_scc_data to keep track of
what mode the file was opened in.
(krb5_scc_close_file): Ignore EBADF from fflush() if the file was
opened for readonly access. For some reason NetBSD's fflush()
exhibits this behavior.
(krb5_scc_open_file): Save the mode with which the file was opened
in data->mode.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12825
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Fri, 27 Oct 2000 14:55:49 +0000 (14:55 +0000)]
* reconf: Pass "-m util/autoconf" to autoreconf only if we are
using the source trees version of autoconf.
If we trust the installed version of autoconf, we should use their macros.
Performance boost of 2x in autoconfing the tree through use of frozen
m4 files.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12820
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Fri, 27 Oct 2000 14:53:55 +0000 (14:53 +0000)]
*post.in (Makefile): When running autoconf, use AUTOCONFFLAGS
instead of always specificying the trees macrodir.
* pre.in (AUTOCONFFLAGS): Add as flags to pass to autoconf.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12819
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Fri, 27 Oct 2000 14:53:36 +0000 (14:53 +0000)]
* post.in (Makefile): When running autoconf, use AUTOCONFFLAGS
instead of always specificying the trees macrodir.
* pre.in (AUTOCONFFLAGS): Add as flags to pass to autoconf.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12818
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Thu, 26 Oct 2000 23:01:49 +0000 (23:01 +0000)]
* krb5_decode_test.c (main): Add new test cases for indefinite
length ticket and as_rep. Fix up calls to decode_run() to have
the modifier be in the description parameter.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12817
dc483132-0cff-0310-8789-
dd5450dbe970