krb5.git
18 years agopull up r18762 from trunk
Tom Yu [Wed, 8 Nov 2006 23:44:39 +0000 (23:44 +0000)]
pull up r18762 from trunk

 r18762@cathode-dark-space:  epeisach | 2006-11-05 09:29:24 -0500
 Subject: Make clean does not remove lib/crypto/t_prf
 ticket: new
 tags: pullup

 Remove t_prf and t_prf.o on make clean.

ticket: 4624
version_fixed: 1.6

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@18775 dc483132-0cff-0310-8789-dd5450dbe970

18 years agopull up r18750 from trunk
Tom Yu [Wed, 8 Nov 2006 23:44:31 +0000 (23:44 +0000)]
pull up r18750 from trunk

 r18750@cathode-dark-space:  wfiveash | 2006-10-30 15:56:57 -0500
 ticket: new
 subject: latest Novell ldap patches and kdb5_util dump support for ldap
 Target_Version: krb5-1.6
 Tags: pullup

 I've applied Novell's latest patches for their LDAP KDB plugin.  I've
 also implemented and tested support for kdb5_util dump using the LDAP
 KDB plugin.  I also added a Sun copyright on files that I've modified.

ticket: 4562
version_fixed: 1.6

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@18774 dc483132-0cff-0310-8789-dd5450dbe970

18 years agopull up r18751 from trunk
Tom Yu [Wed, 8 Nov 2006 23:44:27 +0000 (23:44 +0000)]
pull up r18751 from trunk

 r18751@cathode-dark-space:  raeburn | 2006-10-30 20:10:34 -0500
 ticket: 4534

 * conv_princ.c (krb5_425_conv_principal): Fix silly typo in arrays' sizes in
 previous change.

ticket: 4534

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@18773 dc483132-0cff-0310-8789-dd5450dbe970

18 years agopull up r18748 from trunk
Tom Yu [Wed, 8 Nov 2006 23:44:23 +0000 (23:44 +0000)]
pull up r18748 from trunk

 r18748@cathode-dark-space:  raeburn | 2006-10-27 23:06:30 -0400
 ticket: new
 subject: don't confuse profile iterator in 425 princ conversion
 target_version: 1.6
 tags: pullup

 The profile iterator code hangs onto and uses the list of names passed
 in.  The krb5_425_conv_principal code reuses that array when the
 iterator may still be used.

 * conv_princ.c (krb5_425_conv_principal): Use separate name arrays for
 the iterator and the v4_realm lookup that may be done inside the
 iteration loop.

ticket: 4534
version_fixed: 1.6

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@18772 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoPullup from trunk to 1.6 branch
Alexandra Ellwood [Tue, 7 Nov 2006 20:18:31 +0000 (20:18 +0000)]
Pullup from trunk to 1.6 branch

ticket: 4657
version_fixed: 1.6

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@18766 dc483132-0cff-0310-8789-dd5450dbe970

18 years agopatchlevel.h for krb5-1.6 branch
Tom Yu [Fri, 27 Oct 2006 22:55:49 +0000 (22:55 +0000)]
patchlevel.h for krb5-1.6 branch

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@18746 dc483132-0cff-0310-8789-dd5450dbe970

18 years agobranch krb5-1.6
Tom Yu [Fri, 27 Oct 2006 22:49:46 +0000 (22:49 +0000)]
branch krb5-1.6

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@18745 dc483132-0cff-0310-8789-dd5450dbe970

18 years agomore copyright fixes pre-1.6
Tom Yu [Fri, 27 Oct 2006 22:47:32 +0000 (22:47 +0000)]
more copyright fixes pre-1.6

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18744 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoSynchronise copyright notices. Preliminary update of README for 1.6
Tom Yu [Fri, 27 Oct 2006 03:53:08 +0000 (03:53 +0000)]
Synchronise copyright notices.  Preliminary update of README for 1.6

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18743 dc483132-0cff-0310-8789-dd5450dbe970

18 years agofix krb5_ldap_iterate to handle NULL match_expr and open_db_and_mkey to use KRB5_KDB_...
Will Fiveash [Mon, 23 Oct 2006 21:36:46 +0000 (21:36 +0000)]
fix krb5_ldap_iterate to handle NULL match_expr and open_db_and_mkey to use KRB5_KDB_SRV_TYPE_ADMIN

When I ran kdb5_util dump I had two initial problems.  First, the LDAP
plugin was not finding the bind DN because open_db_and_mkey() was
passing KRB5_KDB_SRV_TYPE_OTHER to krb5_db_open().  When I change this
to KRB5_KDB_SRV_TYPE_ADMIN then the ldap_kadmind_dn parameter is used
from krb5.conf and a valid bind DN is found.  Second,
krb5_ldap_iterate() will core dump when it is called withy a NULL
match_expr arg.  This is how dump_db calls krb5_db_iterate().  I updated
krb5_ldap_iterate() to use a default_match_expr of "*" if match_expr ==
NULL.

ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18736 dc483132-0cff-0310-8789-dd5450dbe970

18 years agofix invalid access found by valgrind
Kevin Coffman [Mon, 23 Oct 2006 16:15:50 +0000 (16:15 +0000)]
fix invalid access found by valgrind

Valgrind found that we were reading past the end of the
preferred padata string.  p is manually updated within
the loop and there is no need for the increment.  It was
causing the null terminator to be skipped over, rather
than properly terminating the loop.

ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18735 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoAvoid segfault in krb5_do_preauth_tryagain
Kevin Coffman [Mon, 23 Oct 2006 16:10:37 +0000 (16:10 +0000)]
Avoid segfault in krb5_do_preauth_tryagain

Check pointer is non-null before using it.  Avoids segfault in
krb5_do_preauth_tryagain().

ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18734 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoFor Irix - determine if using gcc and gnu ld - set compiler flags properly
Ezra Peisach [Mon, 23 Oct 2006 03:20:11 +0000 (03:20 +0000)]
For Irix - determine if using gcc and gnu ld - set compiler flags properly

ticket: 4455

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18733 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoosf1 -oldstyle_liblookup typo
Ezra Peisach [Sun, 22 Oct 2006 11:59:02 +0000 (11:59 +0000)]
osf1 -oldstyle_liblookup typo

Not really relevant anymore - as we do not support static linking now.
But in ticket 927 (r16776) - a test was added to determine if gnu ld
was in use and change the linker flags accordingly.  The variable in
aclocal.m4 was krb5_cv_prog_gnu_ld and this was testing for
krb5_cv_gnu_ld.

ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18732 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoDelete src/lib/ccapi.
Sam Hartman [Sat, 21 Oct 2006 20:20:30 +0000 (20:20 +0000)]
Delete src/lib/ccapi.
The ccapi shipped in 1.6 will not be based off this code
and will live in src/ccapi.
It will be copied onto the trunk and branch when  ready, but this code is being removed before the branch cut.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18731 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoUpdate protocol rfcs to the versions we actually implement
Sam Hartman [Sat, 21 Oct 2006 20:12:52 +0000 (20:12 +0000)]
Update protocol rfcs to the versions we actually implement

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18730 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoenabling LDAP mix-in support for kdb5_util load
Will Fiveash [Sat, 21 Oct 2006 00:33:24 +0000 (00:33 +0000)]
enabling LDAP mix-in support for kdb5_util load

I now have mix-in working for the kdb5_util load.  If the krbSubTrees
realm attr contains a base DN where non-krb entries live the
load/krb5_ldap_put_principal() code will modify those entries whose
krbPrincipalName attr matches that of the dump princ record being loaded
otherwise a standalone krbprinc entry will be created under the realm
container.

I also fixed a small bug in krb5_ldap_policydn_to_name() for the version
that uses ldap_explode_dn().

ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18729 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoAdd supp-int.h to provide prototypes for declared internal functions.
Ezra Peisach [Wed, 18 Oct 2006 03:15:24 +0000 (03:15 +0000)]
Add supp-int.h to provide prototypes for declared internal functions.
*.x: Include this header
Makefile.in: Update dependencies

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18728 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoMemory leak fixes on exit
Ezra Peisach [Wed, 18 Oct 2006 02:54:05 +0000 (02:54 +0000)]
Memory leak fixes on exit

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18727 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoFree allocated memory when no longer used
Ezra Peisach [Wed, 18 Oct 2006 02:53:06 +0000 (02:53 +0000)]
Free allocated memory when no longer used

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18726 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoInvoke krb5_free_principal to remove memory leak
Ezra Peisach [Wed, 18 Oct 2006 02:52:30 +0000 (02:52 +0000)]
Invoke krb5_free_principal to remove memory leak

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18725 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoCall freeaddrinfo at end - memory leak
Ezra Peisach [Wed, 18 Oct 2006 02:51:55 +0000 (02:51 +0000)]
Call freeaddrinfo at end - memory leak

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18724 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoDeclare krb5_mcc_get_flags static - it is not exported or used outside of file
Ezra Peisach [Wed, 18 Oct 2006 02:50:43 +0000 (02:50 +0000)]
Declare krb5_mcc_get_flags static - it is not exported or used outside of file

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18723 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoUnsigned/signed warning fix
Ezra Peisach [Wed, 18 Oct 2006 02:38:01 +0000 (02:38 +0000)]
Unsigned/signed warning fix

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18722 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoInclude gss_libinit.h for gssint_initialize_library() prototype
Ezra Peisach [Mon, 16 Oct 2006 16:18:29 +0000 (16:18 +0000)]
Include gss_libinit.h for gssint_initialize_library() prototype

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18721 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoInclude string.h for memcmp prototype
Ezra Peisach [Mon, 16 Oct 2006 12:18:18 +0000 (12:18 +0000)]
Include string.h for memcmp prototype

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18720 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoInclude time.h for time() prototype
Ezra Peisach [Mon, 16 Oct 2006 12:17:53 +0000 (12:17 +0000)]
Include time.h for time() prototype

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18719 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoAdd prototype for krb5int_init_context_kdc
Ezra Peisach [Mon, 16 Oct 2006 01:50:49 +0000 (01:50 +0000)]
Add prototype for krb5int_init_context_kdc

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18718 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoAdd prototype for krb5_aprof_get_boolean
Ezra Peisach [Mon, 16 Oct 2006 00:09:53 +0000 (00:09 +0000)]
Add prototype for krb5_aprof_get_boolean

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18717 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoTag krb5_rc_dfl_init_locked as static - not used outside file
Ezra Peisach [Mon, 16 Oct 2006 00:09:25 +0000 (00:09 +0000)]
Tag krb5_rc_dfl_init_locked as static - not used outside file

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18716 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoCleanup some warnings on missing prototypes
Ezra Peisach [Sun, 15 Oct 2006 18:46:13 +0000 (18:46 +0000)]
Cleanup some warnings on missing prototypes

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18715 dc483132-0cff-0310-8789-dd5450dbe970

18 years agofix typo in make var ref
Ken Raeburn [Sun, 15 Oct 2006 18:19:28 +0000 (18:19 +0000)]
fix typo in make var ref

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18714 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoCleanup unused variable warning during make check
Ezra Peisach [Sun, 15 Oct 2006 13:35:26 +0000 (13:35 +0000)]
Cleanup unused variable warning during make check

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18713 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoRemove all unused variable warnings from tree
Ezra Peisach [Sun, 15 Oct 2006 13:23:48 +0000 (13:23 +0000)]
Remove all unused variable warnings from tree

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18712 dc483132-0cff-0310-8789-dd5450dbe970

18 years agotypo
Ken Raeburn [Sun, 15 Oct 2006 08:43:30 +0000 (08:43 +0000)]
typo

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18711 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoPass VALGRIND in to runtest. When it's set, redefine spawn to use it for
Ken Raeburn [Sun, 15 Oct 2006 08:37:35 +0000 (08:37 +0000)]
Pass VALGRIND in to runtest.  When it's set, redefine spawn to use it for
most commands starting with "/" but not "/bin/sh" and certain others.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18710 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoSuppress some uninteresting glibc warnings on RHEL4
Ken Raeburn [Sun, 15 Oct 2006 08:35:41 +0000 (08:35 +0000)]
Suppress some uninteresting glibc warnings on RHEL4

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18709 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoDefine VALGRIND1 as an invocation of valgrind that could be used for VALGRIND
Ken Raeburn [Sun, 15 Oct 2006 08:35:09 +0000 (08:35 +0000)]
Define VALGRIND1 as an invocation of valgrind that could be used for VALGRIND

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18708 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoZap automatic structures before filling in
Ken Raeburn [Sun, 15 Oct 2006 08:31:48 +0000 (08:31 +0000)]
Zap automatic structures before filling in

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18707 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoClear req_st buffer before filling it in
Ken Raeburn [Sun, 15 Oct 2006 07:51:30 +0000 (07:51 +0000)]
Clear req_st buffer before filling it in

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18706 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoInitialize some values before use, silence some warnings
Ken Raeburn [Sun, 15 Oct 2006 07:50:54 +0000 (07:50 +0000)]
Initialize some values before use, silence some warnings

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18705 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoFix logic bug in string allocation
Ken Raeburn [Sun, 15 Oct 2006 07:50:16 +0000 (07:50 +0000)]
Fix logic bug in string allocation

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18704 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoUse memmove for overlapping regions
Ken Raeburn [Sun, 15 Oct 2006 07:49:35 +0000 (07:49 +0000)]
Use memmove for overlapping regions

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18703 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoFree v4mode when done with it
Ken Raeburn [Sat, 14 Oct 2006 01:01:00 +0000 (01:01 +0000)]
Free v4mode when done with it

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18702 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoDon't strncpy a string to itself
Ken Raeburn [Sat, 14 Oct 2006 01:00:40 +0000 (01:00 +0000)]
Don't strncpy a string to itself

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18701 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoCall fileno and krb5_lock_file before calling fclose, rather than after.
Ken Raeburn [Sat, 14 Oct 2006 00:17:48 +0000 (00:17 +0000)]
Call fileno and krb5_lock_file before calling fclose, rather than after.
Caught by valgrind.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18700 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoUse $(VALGRIND) when running programs using $(KRB5_RUN_ENV) or
Ken Raeburn [Fri, 13 Oct 2006 23:54:24 +0000 (23:54 +0000)]
Use $(VALGRIND) when running programs using $(KRB5_RUN_ENV) or
$(RUN_SETUP).  Replaces old hack with MAYBE_VALGRIND added to RUN_ENV
in a way that would break in some of the tests.

Set VALGRIND in site.exp in tests/dejagnu.  (Not used yet.)

Runs some shell scripts under valgrind, rather than changing them to
run only the executables under valgrind; this is mostly okay, just
creates lots of extra log data, and requires --trace-children=yes.

This should work for any instrumentation program invocation that gets
followed immediately by the name and argument list for the program
being instrumented.  For example, VALGRIND="env LD_PRELOAD=..." should
work, though I haven't tested it.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18699 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoAlways zap newly allocated pages, intead of conditional on PURIFY.
Ken Raeburn [Fri, 13 Oct 2006 23:19:57 +0000 (23:19 +0000)]
Always zap newly allocated pages, intead of conditional on PURIFY.
Minor performance penalty; c'est la vie.  Better to be able to run
purify or valgrind or whatever on the binaries we actually use.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18698 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoUse 'const' with krb5_get_error_message
Ken Raeburn [Fri, 13 Oct 2006 21:08:07 +0000 (21:08 +0000)]
Use 'const' with krb5_get_error_message

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18697 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoEliminate some warnings: missing "const", unused variables, success
Ken Raeburn [Fri, 13 Oct 2006 20:58:14 +0000 (20:58 +0000)]
Eliminate some warnings: missing "const", unused variables, success
case in load_preauth_plugins was missing a return value (which isn't
checked anyways).

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18696 dc483132-0cff-0310-8789-dd5450dbe970

18 years ago * preauth_plugin.h: Don't use an enum in a public api
Sam Hartman [Fri, 13 Oct 2006 19:15:17 +0000 (19:15 +0000)]
* preauth_plugin.h: Don't use an enum in a public api

* kdc_preauth.c (get_etype_info):  Rename get_entry_data to avoid shadowing
(get_etype_info2): likewise
(return_etype_info): likewise
(return_pw_salt): likewise
(get_entry_data): Update prototype not to use enum in a API

ticket:  4377
tatus: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18695 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoAdd prototype for krb5int_debug_fprint to os-proto.h. Include os-proto.h in
Ezra Peisach [Fri, 13 Oct 2006 19:05:05 +0000 (19:05 +0000)]
Add prototype for krb5int_debug_fprint to os-proto.h.  Include os-proto.h in
sn2princ.c. Cleans up warning for function definition w/o prototype.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18694 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoPatch to split client plugin from server plugin
Sam Hartman [Fri, 13 Oct 2006 18:50:40 +0000 (18:50 +0000)]
Patch to split client plugin from server plugin

ticket: 4377
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18693 dc483132-0cff-0310-8789-dd5450dbe970

18 years ago(krb5_db2_db_init): When creating a temporary database, use the suffix
Ken Raeburn [Thu, 12 Oct 2006 03:50:15 +0000 (03:50 +0000)]
(krb5_db2_db_init): When creating a temporary database, use the suffix
"~.kadm5" for the policy database filename.

ticket: 4354
version_reported: 1.5
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18692 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoAdd a policy to the database, then after the dump and restore, check
Ken Raeburn [Thu, 12 Oct 2006 03:47:05 +0000 (03:47 +0000)]
Add a policy to the database, then after the dump and restore, check
that it's still there.

ticket: 4355
tags: pullup
target_version: 1.5.2

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18691 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoAnother patch from Will Fiveash, to make "kdb5_util load <dumpfile>"
Ken Raeburn [Thu, 12 Oct 2006 02:39:14 +0000 (02:39 +0000)]
Another patch from Will Fiveash, to make "kdb5_util load <dumpfile>"
work with the LDAP KDB back end, in simple cases (all entries stored
under the krbcontainer entry).

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18690 dc483132-0cff-0310-8789-dd5450dbe970

18 years agomore debugging printfs for nightly testing
Ken Raeburn [Thu, 12 Oct 2006 01:18:35 +0000 (01:18 +0000)]
more debugging printfs for nightly testing

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18689 dc483132-0cff-0310-8789-dd5450dbe970

18 years ago(add_to_transited): Change the current logic to keep all array references
Ken Raeburn [Thu, 12 Oct 2006 00:33:12 +0000 (00:33 +0000)]
(add_to_transited): Change the current logic to keep all array references
in bounds, assuming that what would've been next[-1] would not be '.'.  I
haven't fully reexamined the logic, but this seems consistent with the
actual current behavior, and the existing test cases.

Also, factored out code for copying a string from a krb5_data to a char*.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18688 dc483132-0cff-0310-8789-dd5450dbe970

18 years agosome (more) debugging code to track down nightly test failures
Ken Raeburn [Wed, 11 Oct 2006 05:17:16 +0000 (05:17 +0000)]
some (more) debugging code to track down nightly test failures

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18680 dc483132-0cff-0310-8789-dd5450dbe970

18 years agosome debugging code to track down nightly test failures
Ken Raeburn [Wed, 11 Oct 2006 05:15:54 +0000 (05:15 +0000)]
some debugging code to track down nightly test failures

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18679 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoskip over verbose (protocol trace) debugging output
Ken Raeburn [Wed, 11 Oct 2006 05:08:02 +0000 (05:08 +0000)]
skip over verbose (protocol trace) debugging output

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18678 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoAdd bounds-checking assertions before automatic array reference
Ken Raeburn [Wed, 11 Oct 2006 04:54:00 +0000 (04:54 +0000)]
Add bounds-checking assertions before automatic array reference

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18677 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoKeep just 10/6 version of schema files
Ken Raeburn [Tue, 10 Oct 2006 23:59:46 +0000 (23:59 +0000)]
Keep just 10/6 version of schema files

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18674 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoMemory management and Solaris porting fixes from Will Fiveash
Ken Raeburn [Tue, 10 Oct 2006 23:56:46 +0000 (23:56 +0000)]
Memory management and Solaris porting fixes from Will Fiveash

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18673 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoCheck for allocation failure. Caught by Will Fiveash
Ken Raeburn [Tue, 10 Oct 2006 23:40:55 +0000 (23:40 +0000)]
Check for allocation failure.  Caught by Will Fiveash

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18672 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoDon't segfault if a preauth plugin module fails to load
Kevin Coffman [Tue, 10 Oct 2006 20:52:34 +0000 (20:52 +0000)]
Don't segfault if a preauth plugin module fails to load

Move the zeroing of the errinfo struct before the call to
krb5int_open_plugin_dirs() to prevent segfault in the case
where a plugin fails to load.  (For example if there are
unresolved symbols.)

ticket: new

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18671 dc483132-0cff-0310-8789-dd5450dbe970

18 years agofinal commits for KFW 3.1 Beta 2
Jeffrey Altman [Mon, 9 Oct 2006 18:08:10 +0000 (18:08 +0000)]
final commits for KFW 3.1 Beta 2

  krb5cred.dll (1.1.2.0)

  - Fix the control logic so that if the password is expired for an
    identity, the krb5 credentials provider will initiate a change
    password request.  Once the password is successfully changed, the
    new password will be used to obtain new credentials.

  - Fix an incorrect condition which caused the new credentials dialog
    to refresh custom prompts unnecessarily.

  - Removing an identity from the list of NetIDMgr identities now causes
    the corresponding principal to be removed from the LRU principals
    list.

  - Properly handle KMSG_CRED_PROCESS message when the user is
    cancelling out.

  - Add more debug output

  - Do not renew Kerberos tickets which are not initial tickets.

  - Fix whitespace in source code.

  - When providing identity selection controls, disable the realm
    selector when the user specifies the realm in the username control.

  - k5_ident_valiate_name() will refuse principal names with empty or
    unspecified realms.

  - When updating identity properties, the identity provider will
    correctly set the properties for identities that were destroyed.
    This fixes a problem where the values may be incorrect if an
    identity has two or more credential caches and one of them is
    destroyed.

  nidmgr32.dll (1.1.2.0)

  - Send out a separate notification if the configuration information
    associated with an identity is removed.

  - If an identity is being removed from the NetIDMgr identity list in
    the configuration panel, do not send out APPLY notifications to the
    subpanels after the configuration information has been removed.
    Otherwise this causes the configuration information to be reinstated
    and prevent the identity from being removed.

  - Properly initialize the new credentials blob including the UI
    context structure.

  netidmgr.exe (1.1.2.0)

  - When suppressing error messages, make sure that the final
    KMSG_CRED_END notification is sent.  Otherwise the new credentials
    acquisition operation will not be cleaned up.

  - Autoinit option now checks to see if there are identity credentials
    for the default identity and triggers the new credentials dialog if
    there aren't any.

  - Properly synchronize the configuration node list when applying
    changes (e.g.: when removing or adding an identity).

  - Fix a handle leak when removing an identity from the NetIDMgr
    identity list.

  - Refresh the properties for the active identities before calculating
    the renewal and expiration timers.  Otherwise the timestamps being
    used might be incorrect.

  - Add Identity dialog (in the configuration panel) now uses the
    identity selection controls provided by the identity provider.

  - Improve type safety when handling timer refreshes.

  - When getting the expiration times and issue times for an identity,
    the timer refresh code may fail over to the expiration and issue
    times for the credential it is currently looking at.  Now the code
    makes sure that both the issue and expiration times come from the
    identity or the credential but not mixed.

  - Not being able to get the time of issue of a credential now does not
    result in the credential being skipped from the timer refresh pass.
    However, not having a time of issue will result in the half-life
    algorithm not being applied for the renew timer.

  - Fix a bug which caused a credential to be abandoned from the timer
    refresh pass if the reamining lifetime of the credential is less
    than the renewal threshold.

  - Fix a bug where the vertical scroll bars for the hypertext window
    would not appear when the contents of the window changed.

  - Trigger a refresh of the configuration nodes when adding or removing
    an identity.

  source for (1.1.2.0)

  - Explicitly include <prsht.h> so that the SDK can be used in build
    environments that define WIN32_LEAN_AND_MEAN.

ticket: new
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18670 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoInitialize buffer before calling res_ninit
Russ Allbery [Sun, 8 Oct 2006 03:22:48 +0000 (03:22 +0000)]
Initialize buffer before calling res_ninit

Per Paul Vixie: It is necessary to zero out the statbuf before calling
res_ninit(), or else res_vinit() will call res_nclose() and res_ndestroy()
with stack trash as a statbuf, and they will call free() with stack trash,
and programs will dump core.

Ticket: new
Component: krb5-libs
Version_Reported: 1.5.1
Target_Version: 1.5.2
Tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18669 dc483132-0cff-0310-8789-dd5450dbe970

18 years agofix dependencies properly this time
Ken Raeburn [Sat, 7 Oct 2006 08:02:41 +0000 (08:02 +0000)]
fix dependencies properly this time

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18668 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoInitialize accessor fields at compile time, under C99 and GCC
Ken Raeburn [Sat, 7 Oct 2006 07:51:48 +0000 (07:51 +0000)]
Initialize accessor fields at compile time, under C99 and GCC

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18667 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoMove ASN.1 routines for KDB LDAP plugin into main krb5 library,
Ken Raeburn [Sat, 7 Oct 2006 07:39:24 +0000 (07:39 +0000)]
Move ASN.1 routines for KDB LDAP plugin into main krb5 library,
accessed via krb5int_access.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18666 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoCheck for ldap_initialize and other functions that Solaris (Mozilla-based)
Ken Raeburn [Sat, 7 Oct 2006 06:10:27 +0000 (06:10 +0000)]
Check for ldap_initialize and other functions that Solaris (Mozilla-based)
LDAP does not provide, and define versions a couple of them if needed.
Based on patches from and discussions with Will Fiveash.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18665 dc483132-0cff-0310-8789-dd5450dbe970

18 years ago10/3 patch from Savitha R, part 3, patch-manpages-schema.diff
Ken Raeburn [Sat, 7 Oct 2006 05:25:54 +0000 (05:25 +0000)]
10/3 patch from Savitha R, part 3, patch-manpages-schema.diff

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18664 dc483132-0cff-0310-8789-dd5450dbe970

18 years agowhitespace
Ken Raeburn [Sat, 7 Oct 2006 01:38:12 +0000 (01:38 +0000)]
whitespace

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18663 dc483132-0cff-0310-8789-dd5450dbe970

18 years agowhitespace
Ken Raeburn [Sat, 7 Oct 2006 01:36:50 +0000 (01:36 +0000)]
whitespace

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18662 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoUse const pointers for error messages.
Ken Raeburn [Sat, 7 Oct 2006 01:30:59 +0000 (01:30 +0000)]
Use const pointers for error messages.
Add some debugging hooks in the libkrb5 support.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18661 dc483132-0cff-0310-8789-dd5450dbe970

18 years agodrop comma at end of enum list
Ken Raeburn [Sat, 7 Oct 2006 01:04:01 +0000 (01:04 +0000)]
drop comma at end of enum list

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18660 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoEliminate some warnings and non-gcc build problems:
Ken Raeburn [Sat, 7 Oct 2006 01:02:08 +0000 (01:02 +0000)]
Eliminate some warnings and non-gcc build problems:
- nested function
- bogus pointer casts
- C++-style comments
- unused variables
- variables of same name in nested scopes
- if condition syntax
- unused function
- use of GNU-only strndup() function

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18659 dc483132-0cff-0310-8789-dd5450dbe970

18 years ago10/3 patch from Savitha R, part 2, patch-krb-schema.diff
Ken Raeburn [Fri, 6 Oct 2006 23:58:43 +0000 (23:58 +0000)]
10/3 patch from Savitha R, part 2, patch-krb-schema.diff

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18658 dc483132-0cff-0310-8789-dd5450dbe970

18 years ago10/3 patch from Savitha R, part 1, patch-ldap-schema.diff
Ken Raeburn [Fri, 6 Oct 2006 23:53:38 +0000 (23:53 +0000)]
10/3 patch from Savitha R, part 1, patch-ldap-schema.diff

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18657 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoschema info
Ken Raeburn [Fri, 6 Oct 2006 23:29:29 +0000 (23:29 +0000)]
schema info

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18656 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoremove old changelog
Ken Raeburn [Fri, 6 Oct 2006 23:28:50 +0000 (23:28 +0000)]
remove old changelog

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18655 dc483132-0cff-0310-8789-dd5450dbe970

18 years ago * src/lib/krb5/ccache/t_cccursor.c: Bugfixes from Ezra to clean up
Tom Yu [Fri, 6 Oct 2006 21:43:02 +0000 (21:43 +0000)]
* src/lib/krb5/ccache/t_cccursor.c: Bugfixes from Ezra to clean up
memory leaks.

ticket: 4389
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18654 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoupdate export lists
Tom Yu [Fri, 6 Oct 2006 21:35:50 +0000 (21:35 +0000)]
update export lists

ticket: 4389
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18653 dc483132-0cff-0310-8789-dd5450dbe970

18 years agomake depend
Tom Yu [Fri, 6 Oct 2006 21:17:56 +0000 (21:17 +0000)]
make depend

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18652 dc483132-0cff-0310-8789-dd5450dbe970

18 years agocursor for iterating over ccaches
Tom Yu [Thu, 5 Oct 2006 22:58:41 +0000 (22:58 +0000)]
cursor for iterating over ccaches

Some ccache back ends need per-type cursors implemented.

* src/include/k5-int.h: Declare krb5_cc_ptcursor.  Update
krb5_cc_ops vector to include functions for ptcursor and some
not-yet-implemented functionality.

* src/include/krb5/krb5.hin: Prototype krb5_cccol_cursor_new,
krb5_cccol_cursor_next, krb5_cccol_cursor_free.

* src/lib/krb5/ccache/Makefile.in: Compile cccursor.c.  Build
t_cccursor.

* src/lib/krb5/ccache/cccursor.c: Implementation of cursor for
iterating over ccaches.

* src/lib/krb5/ccache/ccbase.c: Add typecursor functionality for
iteration over registered ccache types.

* src/lib/krb5/ccache/cc_memory.c: Implmement per-type ccache
cursor functionality.

* src/lib/krb5/ccache/cc_mslsa.c:
* src/lib/krb5/ccache/cc_file.c:
* src/lib/krb5/ccache/ccapi/stdcc.c: Add place-holder ops vector
entries.

* src/lib/krb5/ccache/t_cccursor.c: New test of ccache cursor
functionality.

* src/lib/krb5/os/ccdefname.c (krb5int_cc_os_default_name): New
function to return the OS-specific default ccache name.

ticket: new
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18651 dc483132-0cff-0310-8789-dd5450dbe970

18 years ago * kdc_preauth.c (return_padata): Allocate a padata context if not
Sam Hartman [Thu, 5 Oct 2006 21:28:58 +0000 (21:28 +0000)]
* kdc_preauth.c (return_padata): Allocate a padata context if not
already allocated.  In the preauth_required path check will not be
called to set up the context first.

ticket: 4377
status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18650 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoPatch from Kevin Coffman:
Ken Raeburn [Thu, 5 Oct 2006 19:45:52 +0000 (19:45 +0000)]
Patch from Kevin Coffman:

- adds a function to get ccache keycount
- uses it in two places
- fixes free problem if next_cred fails
- simplifies the clearcache function by using keyctl_clear

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18649 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoignore generated source-tree files
Ken Raeburn [Thu, 5 Oct 2006 14:08:06 +0000 (14:08 +0000)]
ignore generated source-tree files

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18648 dc483132-0cff-0310-8789-dd5450dbe970

18 years agofix dependence on config.status to use correct dir
Ken Raeburn [Thu, 5 Oct 2006 14:05:40 +0000 (14:05 +0000)]
fix dependence on config.status to use correct dir

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18647 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoAdd decode_tagged_unsigned_integer, and try to fix signed/unsigned and
Ken Raeburn [Thu, 5 Oct 2006 13:17:59 +0000 (13:17 +0000)]
Add decode_tagged_unsigned_integer, and try to fix signed/unsigned and
long/int/int32 mixups in ASN.1 decoding.  Add comments describing encoding
of key data.  Don't always parenthesize safe_syncbuf arguments.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18646 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoset a more meaningful error message in asn1 decode failure case
Ken Raeburn [Thu, 5 Oct 2006 13:15:31 +0000 (13:15 +0000)]
set a more meaningful error message in asn1 decode failure case

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18645 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoexport krb5_ldap_create
Ken Raeburn [Thu, 5 Oct 2006 13:15:00 +0000 (13:15 +0000)]
export krb5_ldap_create

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18644 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoarray before test for pointing at entry with the principal. Avoids
Ezra Peisach [Wed, 4 Oct 2006 18:40:53 +0000 (18:40 +0000)]
array before test for pointing at entry with the principal. Avoids
buffer overflow for end of list.

Detected with a hacked up version of valgrind to handle keyring syscalls.

krb5_krcc_next_cred: Move initial test if pointing past end of key

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18643 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoThe keyring code introduced in r18638 also included tests of the KEYRING:
Ezra Peisach [Wed, 4 Oct 2006 10:44:28 +0000 (10:44 +0000)]
The keyring code introduced in r18638 also included tests of the KEYRING:
regardless of whether the type is registered or not in the library.

Test to see if KEYRING: is registered - and if so - run the tests on it.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18642 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoPreauthentication Plugin Framework
Sam Hartman [Tue, 3 Oct 2006 19:07:17 +0000 (19:07 +0000)]
Preauthentication Plugin Framework

Patch from Nalin Dahyabhai at Redhat to implement a preauthentication
framework based on the plugin architecture.  Currently. the API is
considered internal and the header is not installed.
See src/include/krb5/preauth_plugin.h for the interface.

ticket: new
Tags: enhancement
Status: open

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18641 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoconfigure: Depend on $(AUTOCONF_HEADER) so check-ac-syms will be happier
Ken Raeburn [Mon, 2 Oct 2006 23:14:59 +0000 (23:14 +0000)]
configure: Depend on $(AUTOCONF_HEADER) so check-ac-syms will be happier

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18640 dc483132-0cff-0310-8789-dd5450dbe970

18 years ago(AUTOCONF_HEADER): Change to match file's target name
Ken Raeburn [Mon, 2 Oct 2006 23:14:17 +0000 (23:14 +0000)]
(AUTOCONF_HEADER): Change to match file's target name

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18639 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoMerge Kevin Coffman's keyring ccache branch for Linux, with some modifications:
Ken Raeburn [Mon, 2 Oct 2006 22:50:10 +0000 (22:50 +0000)]
Merge Kevin Coffman's keyring ccache branch for Linux, with some modifications:

aclocal.m4: Enable keyring ccache if the header and library are available; no
configure-time option.  No error if it's not found.

ccdefname.c: Keep old default of FILE: cache, at least for now.

libkrb5.exports: Don't export krb5_krcc_ops.

ccbase.c: Only initialize krb5int_krcc_mutex if USE_KEYRING_CCACHE; destroy it
in finalization.  Define INITIAL_TYPEHEAD macro (for file vs keyring), and use
it for initialization and in krb5int_cc_finalize.  Re-enable freeing of
additional registered-type structures.

cc_keyring.c: Avoid calls to com_err from within library.

cc_file.c: Punt change; generate_new is badly broken, and we expect to replace
it with a new API anyways.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18638 dc483132-0cff-0310-8789-dd5450dbe970

18 years agoNuke old Saber-related stuff
Ken Raeburn [Mon, 2 Oct 2006 21:39:48 +0000 (21:39 +0000)]
Nuke old Saber-related stuff

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18637 dc483132-0cff-0310-8789-dd5450dbe970