]> git.ipfire.org Git - thirdparty/krb5.git/log
thirdparty/krb5.git
13 years agoSend kpropd debug msgs to stderr
Nicolas Williams [Sat, 22 Sep 2012 03:10:39 +0000 (22:10 -0500)] 
Send kpropd debug msgs to stderr

13 years agoFix a minor race in kdb5_util load
Nicolas Williams [Wed, 3 Oct 2012 03:19:00 +0000 (22:19 -0500)] 
Fix a minor race in kdb5_util load

If a kdb5_util load gets killed between rename()ing the new KDB file
into place and resetting the iprop ulog then the ulog can reflect the
pre-load state, which will almost certainly be incorrect.

This matters because we want to impose a timeout on full resyncs in
kpropd when iprop dictates that a full resync is needed, and the
simplest timeout scheme involves signaling the kdb5_util load process.
But also, we want no such races in general.

The fix is simple: re-initialize the ulog before renaming the new KDB
file into place, then proceed as usual.  If the ulog is not properly
updated at the end of the load it will at least always result in
subsequent iprop get updates operations always indicating that a full
resync is required.

ticket: 7399

13 years agoMake kadmind iprop never return UPDATE_BUSY
Nicolas Williams [Thu, 20 Sep 2012 19:37:45 +0000 (15:37 -0400)] 
Make kadmind iprop never return UPDATE_BUSY

Currently kadmind allows slaves to poll for updates as often as they
like, but not within 10s of the last update.  This means that iprop will
appear to fail to synchronize the KDC at any site whose master KDC
processes at least one write transaction every 10 seconds consistently.

The original intention must have been to throttle iprop clients (slave
KDCs) that poll too often.  But UPDATE_BUSY as implemented is not that,
and implementing a throttle would be difficult (requires keeping state
in a table) and mostly useless (admins can manage their poll timers just
fine without a throttle in kadmind).

ticket: 7369

13 years agoRemove MAX_ULOGENTRIES
Nicolas Williams [Mon, 24 Sep 2012 22:48:48 +0000 (17:48 -0500)] 
Remove MAX_ULOGENTRIES

If a master KDC uses only a 64-bit libkadm5srv then there is no reason
to impose any limit on ulog size: the practical maximum will be given by
the filesystem and available storage space.

Even when using a 32-bit libkadm5srv the maximum practical ulog size
will be found easily enough when mmap() fails.

ticket: 7368

13 years agoAdd -R option to kproplog to force full resyncs
Nicolas Williams [Thu, 6 Sep 2012 20:31:59 +0000 (15:31 -0500)] 
Add -R option to kproplog to force full resyncs

ticket: 7375

13 years agoFix policy refcount corruption race in dump
Nicolas Williams [Thu, 27 Sep 2012 22:10:41 +0000 (17:10 -0500)] 
Fix policy refcount corruption race in dump

ticket: 7384

13 years agoSync iprop header in kdb5_util dump
Nicolas Williams [Fri, 5 Oct 2012 18:56:35 +0000 (14:56 -0400)] 
Sync iprop header in kdb5_util dump

[ghudson@mit.edu: split out from previous commit]

13 years agokdb5_util load needs iprop safety net
Nicolas Williams [Sat, 22 Sep 2012 04:38:49 +0000 (23:38 -0500)] 
kdb5_util load needs iprop safety net

ticket: 7370

13 years agoDeprecate kpropd -S option
Nicolas Williams [Mon, 24 Sep 2012 15:17:53 +0000 (10:17 -0500)] 
Deprecate kpropd -S option

ticket: 7376

13 years agoCorrect docs re: kpropd usage w/ iprop
Nicolas Williams [Mon, 24 Sep 2012 15:24:54 +0000 (10:24 -0500)] 
Correct docs re: kpropd usage w/ iprop

ticket: 7379

13 years agoAdd -p, -F, -K options to kadmind
Nicolas Williams [Mon, 24 Sep 2012 18:38:20 +0000 (13:38 -0500)] 
Add -p, -F, -K options to kadmind

New options:

    -p path-to-kdb5_util
    -K path-to-kprop
    -F dump-file

These are needed for testing without first having to install.

ticket: 7372

13 years agoipropd_svc.c DPRINT improvements
Nicolas Williams [Mon, 24 Sep 2012 20:56:42 +0000 (15:56 -0500)] 
ipropd_svc.c DPRINT improvements

Make DPRINT a varargs macro and add some new debug prints.

13 years agoFix kdb5_util dump race
Nicolas Williams [Wed, 26 Sep 2012 22:32:56 +0000 (17:32 -0500)] 
Fix kdb5_util dump race

ticket: 7377

13 years agoCleanup dump_db()
Nicolas Williams [Wed, 26 Sep 2012 22:05:05 +0000 (17:05 -0500)] 
Cleanup dump_db()

13 years agoUse a single global dump for iprop full syncs
Nicolas Williams [Fri, 17 Aug 2012 23:19:31 +0000 (18:19 -0500)] 
Use a single global dump for iprop full syncs

Use a global dump (the default dump file) for full syncs for iprop.
When a slave asks for a fullsync we kprop the existing global dump to it
if that is good enough, else we dump the DB and send the new global
dump.

Before this change kadmind would run kdb5_util dump -i... each time a
slave asked for a full dump.  This was done in a sub-process,
thankfully, but it was still a waste of time and storage (e.g., if one
has a huge KDB).

Also, long dump times might cause a slave to give up (the timeout for
this is now configurable).  But since iprop dumps bear a serial number
and timestamp and since slaves will resync from that point forward, it
doesn't matter if the dump we send a slave is fresh as long as it is
fresh enough (i.e., that its sno and timestamp are in the ulog).

Also:

 - Rename dumps into place instead of unlink, create, write (but we
   still keep the dump ok files as lock files and as a method of
   signaling to kprop that the dump is complete).

ticket: 7371

13 years agoImprove kpropd debug and syslog output
Nicolas Williams [Fri, 5 Oct 2012 17:23:48 +0000 (13:23 -0400)] 
Improve kpropd debug and syslog output

Add additional debug output and syslogs.  Remove "kpropd:" from
syslogs.  Always call openlog().  Clean up C style of a few messages.

[ghudson@mit.edu: split and combine commits; commit message]

13 years agoImprove kpropd behavior in iprop mode
Nicolas Williams [Tue, 25 Sep 2012 02:09:17 +0000 (21:09 -0500)] 
Improve kpropd behavior in iprop mode

 - Make kpropd in iprop mode fork a child to listen for kprops from the
   master.  The child writes progress and outcome reports to the parent
   for each kprop.  This fixes a race between asking for a full resync
   and setting up a listener socket for it.

 - Add runonce (-t) for kpropd do_standalone() too.

 - Add a new iprop parameter: iprop_resync_timeout.  kpropd will keep
   asking for incremental updates while waiting for a full resync to
   finish, and will re-request a full resync if kadmind continues to
   indicate that one is needed after this timeout passes since the
   previous full resync was requested.

 - Allow polling intervals less than 10 seconds.

[ghudson@mit.edu: split out debug output changes; note polling interval
change in commit message]

ticket: 7373

13 years agoAdd Python scripts to check for C style issues
Greg Hudson [Mon, 24 Sep 2012 20:39:39 +0000 (16:39 -0400)] 
Add Python scripts to check for C style issues

util/cstyle-file.py checks a file for C style issues and displays
line-by-line output.  It is not terribly sophisticated, and can
probably be improved upon (e.g. by doing an emacs batch-reindent of
the file and checking for differences in indentation).

util/cstyle.py produces diffs using git, runs the file checker on each
modified C source file in each diff, and displays the output lines
attribute to the diff.

13 years agoGENC should always export composite names
Luke Howard [Sat, 1 Sep 2012 01:08:27 +0000 (11:08 +1000)] 
GENC should always export composite names

RFC 6680 requires that gss_export_name_composite begin the output
token with 04 02.  So we must produce a composite token even if the
name has no authdata, and be able to consume a composite token with no
authdata attributes.

[ghudson@mit.edu: expanded commit message]

ticket: 7400 (new)

13 years agoAdd SPI calls to import objects by mech oid
Simo Sorce [Tue, 28 Aug 2012 14:47:23 +0000 (16:47 +0200)] 
Add SPI calls to import objects by mech oid

An interposer mech needs to be able to handle multiple mechanisms.
When importing a mech token for a name, cred, or context, the
interposer mech needs to know the mech type of the token being
imported.  To make this work, add SPI calls which accept a mech type
argument.

[ghudson@mit.edu: Stylistic changes, commit squashing, commit message]

13 years agoUse interposer mechanisms in mechglue functions
Simo Sorce [Tue, 5 Jun 2012 12:09:15 +0000 (08:09 -0400)] 
Use interposer mechanisms in mechglue functions

Wherever a GSSAPI mechglue function accepts a mech OID from the
caller, use gssint_select_mech_type() to choose the mechanism to use.
Wherever a mechglue function outputs a mech OID to the caller, use
gssint_get_public_oid() or gssint_make_public_oid_set() to expose the
public mech OID.

[ghudson@mit.edu: Stylistic changes, commit squashing, commit message]

13 years agoAdd primitives for using interposed mechanisms
Simo Sorce [Mon, 11 Jun 2012 15:50:26 +0000 (11:50 -0400)] 
Add primitives for using interposed mechanisms

Add gssint_select_mechanism() to determine what mechanism to use for a
caller-specified OID, gssint_get_public_oid() to determine what
mechanism to expose to the caller, and gssint_make_public_oid_set to
translate an array of mech OIDs into a set of public OIDs.  In
gssint_get_mechanism(), match interposed OIDs as well as real ones.

[ghudson@mit.edu: Stylistic changes, commit squashing, commit message]

13 years agoAdd support for loading interposer modules
Simo Sorce [Tue, 18 Sep 2012 02:00:44 +0000 (22:00 -0400)] 
Add support for loading interposer modules

Extend the syntax of the gss mech config file to allow a module type
delimited by triangle brackets.  If the module type is "interposer",
flag the mechanism entry as being an interposer mechanism.  A module
marked as an interposer is loaded immediately (so it can interpose a
built-in mechanism) and produces a list of OIDs to interpose.
Interposer mechanisms are not exposed to applications.

[ghudson@mit.edu: Stylistic changes, commit squashing, commit
message]

13 years agoCache TGS-REPs too
Tom Yu [Thu, 27 Sep 2012 21:18:18 +0000 (17:18 -0400)] 
Cache TGS-REPs too

Changes in r25660 inadvertently failed to insert TGS-REPs into the
lookaside cache.  Call finish_dispatch_cache() at the end of
dispatch() to handle this case.

ticket: 7388 (new)
target_version: 1.10.4
tags: pullup

13 years agoAdd version info for ccapiserver.exe
Ben Kaduk [Thu, 27 Sep 2012 19:16:28 +0000 (15:16 -0400)] 
Add version info for ccapiserver.exe

Executables and shared libraries should have a file version, so
that the upgrade process works as expected.

ticket: 7386 (new)
tags: pullup
target_version: 1.10.4

13 years agoFix typo
Ben Kaduk [Thu, 27 Sep 2012 17:11:41 +0000 (13:11 -0400)] 
Fix typo

Actually expand the OUTPRE variable instead of just using a literal
string.

ticket: 7387 (new)
subject: Windows build leaves (OUTPRE)/krb5ccNN.res in ccapi/lib/win/srctmp
tags: pullup
target_version: 1.10.4

13 years agoRemove some dead Makefile code
Ben Kaduk [Fri, 21 Sep 2012 17:33:01 +0000 (13:33 -0400)] 
Remove some dead Makefile code

FILES is unused in util/{ss,et}/Makefile.in; some other unused
variables were nearby.

13 years agoRemove kerbsrc.win
Ben Kaduk [Fri, 21 Sep 2012 17:01:06 +0000 (13:01 -0400)] 
Remove kerbsrc.win

It has been unloved and broken repeatedly for many years, requiring
updating of several variables whenever new directories are added
and similar tedia.  It was originally intended to avoid the need
for Unix utilities on Windows, but Microsoft provides the Utilities
and SDK for UNIX-based Applications which is enough rope to do a
native build.

Leave behind a warning message to anyone who does try to build the
target.

Clean up some now-unused infrastructure in the build system.

ticket: 7367 (new)

13 years agoRemove kerbsrc-nt
Ben Kaduk [Fri, 21 Sep 2012 15:13:32 +0000 (11:13 -0400)] 
Remove kerbsrc-nt

NT is long-gone; we don't need to keep a special-case error message
around telling people not to use it.
Clean out the unneeded code from the Makefile.in

13 years agoRemove kerbsrc83
Ben Kaduk [Thu, 20 Sep 2012 22:03:54 +0000 (18:03 -0400)] 
Remove kerbsrc83

It's been a long time since systems were limited to 8.3 format
for file names.  No one should be thinking to try and build this
target, and if they do, we don't need a custom error message anymore.
Clean out the unneeded code from the Makefile.in.

13 years agoUpdate FILES and WINFILES for kerbsrc.zip
Ben Kaduk [Thu, 20 Sep 2012 18:17:37 +0000 (14:17 -0400)] 
Update FILES and WINFILES for kerbsrc.zip

Note that windows/wshelper/* was removed from the list, as it doesn't
exist.

The kerbsrc.zip target is slated for removal, but attempt to make it
more correct before removing it should it need to be revived.

Submitted by: Blaine Elzey  blaine.elzey at alcatel-lucent.com

ticket: 7364 (new)

13 years agoDo not add empty dir to the include search list
Ben Kaduk [Thu, 20 Sep 2012 18:03:20 +0000 (14:03 -0400)] 
Do not add empty dir to the include search list

windows/leashdll/include contains only a krb4 directory.
We have a dubious need for the latter through AFSroutines.c,
but the former can be eliminated.

13 years agoUpdate windows/README
Ben Kaduk [Wed, 19 Sep 2012 16:13:30 +0000 (12:13 -0400)] 
Update windows/README

The build instructions have changed somewhat, as have the requirements
for a build environment.
The default behavior for KRB5_CONFIG and KRB5CCNAME has also changed.
Attempt to remove mention of overly specific Windows versions that
are now quite old when the behavior persists in newer versions of Windows.
Document the usage of DNS by default and the reduced need for a large
krb5.ini file.
Talk a little more about the LSA cache.

The kerbsrc.win target is no longer supported.

ticket: 7363 (new)
target_version: 1.10.4
tags: pullup

13 years agoFix t_s4u2proxy_krb5 cleanup
Greg Hudson [Mon, 24 Sep 2012 20:57:24 +0000 (16:57 -0400)] 
Fix t_s4u2proxy_krb5 cleanup

Unlike most GSS test programs, t_s4u2proxy_krb5 uses a cleanup
handler, so we have to be careful to initialize everything we clean
up--particularly service2_name, which is initialized after a possible
goto.  Also, remember to release acceptor_name.

13 years agoFix typo
Ben Kaduk [Mon, 24 Sep 2012 15:13:03 +0000 (11:13 -0400)] 
Fix typo

13 years agoExport more krb5_rc symbols on Windows
Greg Hudson [Sat, 22 Sep 2012 01:00:04 +0000 (21:00 -0400)] 
Export more krb5_rc symbols on Windows

krb5_rc_resolve_full, krb5_rc_resolve_get_name, and
krb5_rc_resolve_get_type are also now used in the krb5 mech.

13 years agoExport krb5_rc_recover_or_initialize on Windows
Greg Hudson [Sat, 22 Sep 2012 00:01:41 +0000 (20:01 -0400)] 
Export krb5_rc_recover_or_initialize on Windows

krb5_rc_recover_or_initialize is not a public function, but is now
used by the krb5 mechanism when importing a credential.  Mark it as
PRIVATE GSSAPI in the export list.

13 years agoKeep verifier cred locked in accept_sec_context
Greg Hudson [Fri, 21 Sep 2012 19:47:30 +0000 (15:47 -0400)] 
Keep verifier cred locked in accept_sec_context

It might have been safe to access the krb5 verifier cred without a
lock before constrained delegation, but it is less likely to be safe
now that we might access both the initiator and acceptor parts of the
cred.  Hold a lock on the cred for the full accept_sec_context
operation.

ticket: 7366 (new)

13 years agoResolve verifier cred in accept_sec_context
Greg Hudson [Fri, 21 Sep 2012 19:03:41 +0000 (15:03 -0400)] 
Resolve verifier cred in accept_sec_context

If the verifier cred handle is of type GSS_C_BOTH, we need to resolve
the initiator part of it in order to create a s4u2proxy delegated
credential handle.  (If it's of type GSS_C_ACCEPT, kg_resolve_cred
won't do anything beyond locking and validating the credential.)

ticket: 7356

13 years agoRemove NSIS installs when upgrading to 64-bit
Ben Kaduk [Tue, 18 Sep 2012 21:53:18 +0000 (17:53 -0400)] 
Remove NSIS installs when upgrading to 64-bit

The NSIS installer appears to have only ever existed as a 32-bit
software.  As such, unconditionally check the 32-bit registry tree
for an uninstall string; the architecture of the current package
being installed is not relevant to what was previously installed.

ticket: 7362 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoRefactor gss mech config parser
Greg Hudson [Tue, 18 Sep 2012 01:52:04 +0000 (21:52 -0400)] 
Refactor gss mech config parser

Use helper functions to shorten and clarify loadConfigFile.

13 years agoDelete unused internal mechglue functions
Greg Hudson [Mon, 17 Sep 2012 19:12:29 +0000 (15:12 -0400)] 
Delete unused internal mechglue functions

Get rid of gssint_get_mechanisms, gssint_mech_to_oid, and
gssint_oid_to_mech, which constructed a list of mechanism names and
mapped between mech names and OIDs.  These functions were only used by
gss_inquire_mechs_for_name, which now uses gss_indicate_mechs instead.

13 years agoSimplify gss_inquire_mechs_for_name
Greg Hudson [Mon, 17 Sep 2012 19:08:13 +0000 (15:08 -0400)] 
Simplify gss_inquire_mechs_for_name

Use gss_indicate_mechs instead of gssint_get_mechanisms and
gssint_mech_to_oid to iterate over the list of mechanism OIDs.  Use a
static helper to determine whether a mech supports a name type,
avoiding most of the work done in the for loop.  Use a cleanup
handler.  Don't leave partial results in the output parameter on
error.

13 years agoAdd tests for gss_inquire_mechs_for_name
Greg Hudson [Mon, 17 Sep 2012 18:42:46 +0000 (14:42 -0400)] 
Add tests for gss_inquire_mechs_for_name

13 years agoAvoid leaks on gss_accept_sec_context errors
Simo Sorce [Tue, 14 Aug 2012 13:14:15 +0000 (15:14 +0200)] 
Avoid leaks on gss_accept_sec_context errors

Failure handling during the postprocessing of
mech->gss_accept_sec_context was inconsistent.  In one case we delete
the output token but leave the partly-constructed context present in
*context_handle (violating RFC 2744 if this is the first call); in
other cases we leave the output token in the caller's buffer but do
destroy the partly-constructed context.  Make this more consistent by
always destroying the output token and partly-constructed context.
(RFC 2744 prefers, but does not require, leaving the
partly-constructed context present on error if it was present on
entry.  At the moment we are ignoring that preference.)

[ghudson@mit.edu: Rewrote commit message with more details]

13 years agoAvoid multiply defining OIDs in tests/gssapi
Tom Yu [Fri, 14 Sep 2012 17:55:36 +0000 (13:55 -0400)] 
Avoid multiply defining OIDs in tests/gssapi

Declarations of gss_OID_desc mech_krb5, etc. in tests/gssapi/common.h
can result in multiple definitions when the test programs are linked.
Prefix the declarations with "extern" to prevent this.

13 years agoRemove osa_adb_rename_db
Greg Hudson [Thu, 13 Sep 2012 17:00:15 +0000 (13:00 -0400)] 
Remove osa_adb_rename_db

This function wasn't used anywhere.  Also remove the declaration for
osa_adb_close_policy(), which doesn't exist.

13 years agoTidy up GSSAPI test programs
Greg Hudson [Thu, 13 Sep 2012 16:27:04 +0000 (12:27 -0400)] 
Tidy up GSSAPI test programs

Factor out some common functions used by multiple test programs.  Use
a common argument format for importing names (p:princname,
h:hostbasedname, or u:username) and adjust the Python tests to match
it.  Use more consistent conventions in test programs and fix some
coding style issues.  Normalize how the test programs are built.

13 years agoImprove LEASHAUTOINIT description
Ben Kaduk [Wed, 12 Sep 2012 18:17:59 +0000 (14:17 -0400)] 
Improve LEASHAUTOINIT description

This installer option determines whether the -autoinit argument
is passed to the MIT Kerberos executable.
On startup, if this argument is passed, and if there are no tickets
in the default cache, and if no useful tickets can be imported from
the LSA cache, MIT Kerberos will open the get ticket dialog and prompt
for a password; this option does not appear to have any other effect.

ticket: 7357 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoFix typo in util/support/Makefile.in
Greg Hudson [Wed, 12 Sep 2012 19:04:35 +0000 (15:04 -0400)] 
Fix typo in util/support/Makefile.in

13 years agoTest the inconsistent locking fix and svc unavail
Nicolas Williams [Wed, 12 Sep 2012 03:27:12 +0000 (22:27 -0500)] 
Test the inconsistent locking fix and svc unavail

Test the fix for https://bugzilla.redhat.com/show_bug.cgi?id=586032 .

Also test that krb5kdc can return svc unavailable

13 years agoFix lock inconsistency in ctx_unlock()
Nicolas Williams [Wed, 12 Sep 2012 16:36:54 +0000 (11:36 -0500)] 
Fix lock inconsistency in ctx_unlock()

The lock inconsistency fixed here is quite possibly the same as
described in https://bugzilla.redhat.com/show_bug.cgi?id=586032 .

The problem is that ctx_unlock() fails to unlock the principal DB if
it fails to unlock the policy DB, and this happens when ctx_lock()
fails to lock the policy DB (likely because the caller is racing
against a kdb5_util load, which will be using a "permanent" lock,
meaning that the lock file will be unlinked after acquiring the
lock).  The fix is to perform both unlock operations *then* handle
any errors that either or both might have returned.

Additionally, we don't really need or want to use non-blocking locks,
and we certainly don't want to sleep(1) in krb5kdc (possibly several
times, as there was a loop over this) when either of the principal or
policy DB is locked.  Some callers still request non-blocking locks,
and ctx_lock() still honors this.

ticket: 7360 (new)

13 years agoUse blocking locks in krb5kdc and libkadm5srv
Nicolas Williams [Wed, 12 Sep 2012 02:37:53 +0000 (21:37 -0500)] 
Use blocking locks in krb5kdc and libkadm5srv

We don't really need or want to use non-blocking locks, and we certainly
don't want to sleep(1) in krb5kdc (possibly several times, as there was
a loop over this) when either of the principal or policy DB is locked.
Some callers still request non-blocking locks, and ctx_lock() still
honors this.

ticket: 7359 (new)

13 years agoMap CANTLOCK_DB to SVC_UNAVAILABLE in krb5kdc
Nicolas Williams [Wed, 12 Sep 2012 02:32:28 +0000 (21:32 -0500)] 
Map CANTLOCK_DB to SVC_UNAVAILABLE in krb5kdc

The KDC should not return KRB5KRB_ERR_GENERIC (KRB_ERR_GENERIC) when the
KDB plugin returns KRB5_KDB_CANTLOCK_DB: it should return
KRB5KDC_ERR_SVC_UNAVAILABLE (KDC_ERR_SVC_UNAVAILABLE) instead.  This
allows clients to immediately fallback onto other KDCs.

When we switch to using blocking locks in the db2 KDB backend we'll very
rarely hit this code path, perhaps only when racing against a kdb5_util load.
Other KDB backends might still return KRB5_KDB_CANTLOCK_DB often enough that
this change is desirable.

ticket: 7358 (new)

13 years agoUnregister error message key on library unload
Ben Kaduk [Wed, 12 Sep 2012 15:35:04 +0000 (11:35 -0400)] 
Unregister error message key on library unload

Revision fcdd2de1 added the K5_KEY_GSS_KRB5_ERROR_MESSAGE key, and
registered it in the gssapi library initialization routine, but
did not unregister it in the libary finalization routine.
When the library is unloaded and reloaded in the same process,
this leads to an assertion failure, since we check that
destructors_set[keynum] is zero (no destructor set) when registering
a key in util/support/threads.c.
Unregister the key on library cleanup to resolve the error.

ticket: 7353
target_version: 1.10.4
tags: pullup

13 years agomake depend
Greg Hudson [Wed, 12 Sep 2012 17:40:52 +0000 (13:40 -0400)] 
make depend

13 years agoDo not retrieve zero-length creds
Ben Kaduk [Fri, 31 Aug 2012 21:48:14 +0000 (17:48 -0400)] 
Do not retrieve zero-length creds

In the MSLSA cache, if we get back a zero-length ticket, don't
accept it as success; continue on to try and get an acceptable
ticket.

ticket: 7349 (new)
subject: SapGUI sometimes crashes on new session with MSLSA cache
target_version: 1.10.4
tags: pullup

13 years agoAdd new api to Sphinx doc; doc introduced version
Zhanna Tsitkov [Tue, 11 Sep 2012 15:22:57 +0000 (11:22 -0400)] 
Add new api to Sphinx doc; doc introduced version

13 years agoAdd tests for GSS cred export and import
Greg Hudson [Wed, 22 Aug 2012 18:49:33 +0000 (14:49 -0400)] 
Add tests for GSS cred export and import

ticket: 7354

13 years agoAdd SPNEGO support for GSS cred export and import
Greg Hudson [Wed, 29 Aug 2012 15:57:26 +0000 (11:57 -0400)] 
Add SPNEGO support for GSS cred export and import

ticket: 7354

13 years agoAdd krb5 support for GSS cred export and import
Greg Hudson [Mon, 20 Aug 2012 17:36:43 +0000 (13:36 -0400)] 
Add krb5 support for GSS cred export and import

Using the new internal JSON support to implement serialization and
unserialization of krb5 GSS credentials.

ticket: 7354

13 years agoIntroduce gss_export_cred and gss_import_cred
Greg Hudson [Sun, 19 Aug 2012 03:40:29 +0000 (23:40 -0400)] 
Introduce gss_export_cred and gss_import_cred

Add gss_export_cred and gss_import_cred mechglue functions to
serialize and unserialize GSSAPI credential handles.  Mechanism
implementations and tests will follow.

ticket: 7354 (new)

13 years agoAdd internal JSON encoding and decoding support
Greg Hudson [Thu, 9 Aug 2012 22:05:50 +0000 (18:05 -0400)] 
Add internal JSON encoding and decoding support

Add JSON support based loosely on Heimdal's heimbase code.

13 years agoAdd internal base64 encoding and decoding support
Greg Hudson [Mon, 27 Aug 2012 08:18:57 +0000 (04:18 -0400)] 
Add internal base64 encoding and decoding support

Add base64 support based on Heimdal's libroken base64 code.

13 years agoAdd responder feature for initial cred exchanges
Nathaniel McCallum [Mon, 10 Sep 2012 21:38:23 +0000 (17:38 -0400)] 
Add responder feature for initial cred exchanges

Add new APIs:
* krb5_get_init_creds_opt_set_responder
* krb5_responder_get_challenge
* krb5_responder_list_questions
* krb5_responder_set_answer

If a caller sets a responder, it will be invoked after preauth modules
have had a chance to review their incoming padata but before they produce
outgoing padata.  The responder will be presented a set of questions with
optional challenges.  The responder should then answer all questions it knows
how to handle.  Both the answers and the challenges are printable UTF-8 and
may contain encoded, structured data specific to the question asked.

Add two new callbacks and one optional method to the clpreauth
interface.  The new method (prep_questions) allows modules to ask questions
by setting them in the responder context using one of the new callbacks
(ask_responder_question).  The other new callback (get_responder_answer) is
used by the process method to read the answers to the questions asked.

ticket: 7355 (new)

13 years agoAdd cred store functions to gssapi32.def
Greg Hudson [Mon, 10 Sep 2012 17:30:56 +0000 (13:30 -0400)] 
Add cred store functions to gssapi32.def

25ee704e83c2c63d4b5ecd12ea31c1979239041e added three new public GSSAPI
functions; add them to the DLL export file.

ticket: 7217

13 years agoAdd zapfreestr() helper to k5-int.h
Greg Hudson [Mon, 10 Sep 2012 16:28:09 +0000 (12:28 -0400)] 
Add zapfreestr() helper to k5-int.h

Since zapfree(str, strlen(str)) won't work for possibly-null values of
str, add a helper zapfreestr() which only calls strlen() if the string
value is non-null.

13 years agoRemoved unused leash help file
Greg Hudson [Sun, 9 Sep 2012 15:33:04 +0000 (11:33 -0400)] 
Removed unused leash help file

The file 'checkbox blank.png' is unneeded and contains a space in the
name, unnecessarily interfering with running find | xargs over the
source tree.  Remove it.

ticket: 7352 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoDefine SED in util/verto/Makefile.in
Greg Hudson [Thu, 6 Sep 2012 16:42:04 +0000 (12:42 -0400)] 
Define SED in util/verto/Makefile.in

When the rules from util/k5ev/Makefile.in were moved to
util/verto/Makefile.in, the rule to make rename.h was broken on
non-gmake makes because the definition of SED wasn't carried over.
Define it now.

13 years agoAdd asn1c test vectors for alg-agility types
Greg Hudson [Thu, 6 Sep 2012 04:35:01 +0000 (00:35 -0400)] 
Add asn1c test vectors for alg-agility types

For the test-vectors target in tests/asn.1, add ASN.1 modules from RFC
4556 and draft-ietf-krb-wg-pkinit-alg-agility-06.txt, and output test
encodings for PrincipalName, KRB5PrincipalName, OtherInfo, and
PkinitSuppPubInfo.  In the alg-agility module, AuthPack and DHRepInfo
are renamed, as asn1c otherwise rejects them as conflicting with the
RFC 4556 definitions.

13 years agoAvoid libdl dependencies in bundled libverto
Greg Hudson [Sun, 8 Jul 2012 22:04:56 +0000 (18:04 -0400)] 
Avoid libdl dependencies in bundled libverto

The upstream libverto depends on dynamic loading and in particular on
dladdr(), which is not universal.  To avoid this dependency, stub out
support for module loading (by replacing module.c) and instead
integrate the k5ev module directly into the bundled verto library.

This change removes the need to link, include, and invoke libverto
differently depending on whether we're using the bundled library; we
can always just link with -lverto and call verto_default().

bigredbutton: whitespace
ticket: 7351 (new)

13 years agoUpdate bundled libverto to 0.2.5
Greg Hudson [Mon, 3 Sep 2012 23:25:48 +0000 (19:25 -0400)] 
Update bundled libverto to 0.2.5

13 years agoTry harder not to use clock_gettime in verto-k5ev
Greg Hudson [Mon, 3 Sep 2012 23:20:34 +0000 (19:20 -0400)] 
Try harder not to use clock_gettime in verto-k5ev

We already define EV_USE_REALTIME to 0 to avoid the use of
clock_gettime() (to avoid depending on librt).  But in some build
environments libev can detect support for a monotonic clock, which
also results in using clock_gettime().  Define EV_USE_MONOTONIC to 0
as well to prevent this.

ticket: 7350 (new)
target_version: 1.10.4
tags: pullup

13 years agoUse separate components for shortcuts
Ben Kaduk [Fri, 31 Aug 2012 17:41:26 +0000 (13:41 -0400)] 
Use separate components for shortcuts

Since the Start Menu and Desktop are different folders, we should
use different components for the shortcuts in those folders, given
that components operate at directory granularity.

Take the opportunity to use the newer style for installing shortcuts
and registry keys, and make the names more descriptive.

Increment the buildlevel to ensure new files are installed.

ticket: 7348 (new)
subject: Use more meaningfully named registry keys for shortcuts
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoAdd support for GSS_C_NT_COMPOSITE_EXPORT
Luke Howard [Tue, 28 Aug 2012 23:47:24 +0000 (09:47 +1000)] 
Add support for GSS_C_NT_COMPOSITE_EXPORT

ticket: 7347 (new)

13 years agoSupport kdc_timesync offsets in memory ccache
Nate Rosenblum [Wed, 29 Aug 2012 18:16:11 +0000 (11:16 -0700)] 
Support kdc_timesync offsets in memory ccache

When using v4 file credentials caches, client clock skew offsets
obtained when running with the kdc_timesync option set are persisted in
the ccache. This allows the offsets to be used across separate contexts,
e.g. when obtaining credentials using krb5 interfaces and subsequently
importing those credentials for use in gssapi. This patch adds similar
support for memory credentials caches.

[ghudson@mit.edu: Minor style corrections.]

ticket: 7346 (new)

13 years agoFix memory leak in gss_add_cred
Greg Hudson [Thu, 30 Aug 2012 17:08:34 +0000 (13:08 -0400)] 
Fix memory leak in gss_add_cred

The most recent commit to g_acquire_cred.c allocates an OID set to
pass to the mech, but never releases it.  Fix that.

13 years agoDo not emit debug printfs under NODEBUG
Ben Kaduk [Thu, 23 Aug 2012 16:38:57 +0000 (12:38 -0400)] 
Do not emit debug printfs under NODEBUG

These printfs spew to the console when command-line utilities
such as 'klist' and 'aklog' are run, reducing usability.

These printfs can also cause application hangs.
On a multiprocessor machine, when PuTTY and the ccapiserver are
running on different CPUs, PuTTY appears to deadlock with three
concurrent threads inside cci_debug_printf().

ticket: 7342 (new)
target_version: 1.10.4
tags: pullup

13 years agoFix KfW startup shortcut installation
Kevin Wasserman [Tue, 21 Aug 2012 17:48:32 +0000 (13:48 -0400)] 
Fix KfW startup shortcut installation

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7341 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoClean out dead code from ccapi
Kevin Wasserman [Tue, 21 Aug 2012 15:45:49 +0000 (11:45 -0400)] 
Clean out dead code from ccapi

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7237
target_version: 1.10.4
tags: pullup

13 years agoFix KfW thread-local storage allocation issues
Kevin Wasserman [Tue, 21 Aug 2012 15:44:46 +0000 (11:44 -0400)] 
Fix KfW thread-local storage allocation issues

Allocate thread-local storage on demand; don't rely on
the DLL_THREAD_ATTACH case in DllMain() since pre-existing
threads will never execute that code.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7340 (new)
target_version: 1.10.4
tags: pullup

13 years agoImprove error translation for CCAPIv3 routines
Ben Kaduk [Fri, 17 Aug 2012 23:13:14 +0000 (19:13 -0400)] 
Improve error translation for CCAPIv3 routines

We can't mix the KRB5 and CC error constants; standardize on the CC ones
and translate appropriately.

ticket: 7339 (new)
target_version: 1.10.4
tags: pullup

13 years agoReplace NIM with "MIT Kerberos" in installer text
Kevin Wasserman [Fri, 17 Aug 2012 16:15:53 +0000 (12:15 -0400)] 
Replace NIM with "MIT Kerberos" in installer text

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7338 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoKill running processes on upgrades/uninstalls
Ben Kaduk [Thu, 16 Aug 2012 20:03:48 +0000 (16:03 -0400)] 
Kill running processes on upgrades/uninstalls

The InstallValidate action of the windows installer will bring up
a dialog informing us that some currently running processes must
be terminated before installation may proceed, and offers to do so,
but does not actually kill the processes.  We have our own code to
kill running processes which did not execute, for two reasons:
it was sequenced after InstallValidate, and we did not have a current
list of processes to look for.

Add the right processes to look for and kill, and use our own
process-killing code since it actually works.

ticket: 7343 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoMake finding 32-bit libs easier
Ben Kaduk [Wed, 15 Aug 2012 18:50:42 +0000 (14:50 -0400)] 
Make finding 32-bit libs easier

Our 64-bit installer provides 32-bit libraries as well as 64-bit
libraries, but not all 32-bit applications (e.g., PuTTY, Pidgin)
are able to locate them in C:\Program Files\MIT\Kerberos .
Including an InstallDir key under the Wow6432Node tree lets them
work out-of-the-box; while here set all the registry keys in this
component in the compatibility tree, for consistency.

ticket: 7337 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoAdd version info for ccapi dll
Kevin Wasserman [Thu, 16 Aug 2012 15:10:06 +0000 (11:10 -0400)] 
Add version info for ccapi dll

Without version info, this library would not get installed during
an upgrade scenario, causing the MIT Kerberos application to crash
on startup.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
[kaduk@mit.edu: add motivation to commit message]

ticket: 7336 (new)
subject: Fix KfW crash on startup after upgrade
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoUpgrade 64-bit KfW installations
Ben Kaduk [Mon, 13 Aug 2012 22:01:47 +0000 (18:01 -0400)] 
Upgrade 64-bit KfW installations

We use separate UpgradeCodes for 32- and 64-bit installers, so
we must check for both of them when seeing if we are upgrading an
old/existing installation.

ticket: 7335 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoUpgrade from KfW betas, too
Ben Kaduk [Mon, 13 Aug 2012 19:03:45 +0000 (15:03 -0400)] 
Upgrade from KfW betas, too

Instead of using 3.9.9 as a conditional for the maximum version to
upgrade from, just use the current version.
This seems to pick up beta tags properly (so we can upgrade
from, e.g., beta 6 to beta 7 using the installer's upgrade tools),
and is future-proof.

Note that a 64-bit installer will not pick up an existing 32-bit
install (or vice versa), but there does not seem to be infrastructure
to deal with this situation easily.
Also, "downgrading" by running an older installer with a newer version
already installed will cause both versions to be simultaneously
installed; only do this if you know what you're doing.

ticket: 7334 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoFix kfw message box titles
Kevin Wasserman [Sun, 12 Aug 2012 18:35:06 +0000 (14:35 -0400)] 
Fix kfw message box titles

"MIT Kerberos", not "Leash32"

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7333 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoFix window close issues
Kevin Wasserman [Tue, 7 Aug 2012 17:53:02 +0000 (13:53 -0400)] 
Fix window close issues

Stop filtering out SC_CLOSE. 'X' button works more reliably, also alt-F4.
Remove minimize box from style.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7332 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoRefresh ticket display immediately after renew
Kevin Wasserman [Sun, 5 Aug 2012 16:15:28 +0000 (12:15 -0400)] 
Refresh ticket display immediately after renew

Set the CLeashApp::m_bUpdateDisplay flag to cause the display to
update on the next WM_IDLE message to the main thread.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7331 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoUpdate KfW installer graphics
Kevin Wasserman [Fri, 3 Aug 2012 21:22:31 +0000 (17:22 -0400)] 
Update KfW installer graphics

Replace dogheads with the new 'K'.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7330 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoAvoid a crash when attempting to change password
Benjamin Kaduk [Tue, 31 Jul 2012 20:12:27 +0000 (16:12 -0400)] 
Avoid a crash when attempting to change password

In some cases we could keep stack garbage in a local pointer
variable until the cleanup at the end of the function wherein
krb5_free_context() would choke on the invalid non-NULL value.
Initialize to zero to avoid the issue (should be written as NULL
but stick to the prevailing style).

ticket: 7329 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoRename old krb5.ini files away
Benjamin Kaduk [Mon, 30 Jul 2012 20:50:55 +0000 (16:50 -0400)] 
Rename old krb5.ini files away

We want to always use a new krb5.ini (and our search order guarantees
that we will), but users might be confused if there is still a file
named krb5.ini in the old location which is now non-functional.
However, it is rude to unconditionally delete the old file which may
potentially be the only copy a user has of their local changes.
Instead, rename the old file to a non-functioning name that indicates
it is no longer being used, so that it may be consulted if needed.
Only attempt the rename if we found an existing krb5.ini, and ignore errors
since this is not a critical part of the installation.

ticket: 7328 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoAdd domain_realm mappings to the athena krb5.ini
Kevin Wasserman [Mon, 30 Jul 2012 20:33:48 +0000 (16:33 -0400)] 
Add domain_realm mappings to the athena krb5.ini

These seem to be the only bits from the krb5.ini shipped with older
versions of KfW that remain useful.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
[kaduk@mit.edu: add motivation to commit message]

ticket: 7327 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoFix renew_until check for auto-renewal
Kevin Wasserman [Mon, 30 Jul 2012 20:30:34 +0000 (16:30 -0400)] 
Fix renew_until check for auto-renewal

This was completely wrong, but only caused a severe problem on 64 bit
builds. On 32 bit builds the result was effectively always 'success',
so it would always attempt to renew even if there was not sufficient time
left in the renewable lifetime. This did not have much observable
adverse effect. But on 64 bit builds it always failed and so never
attempted renewal.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7326 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoFix warning caption "Leash"->"MIT Kerberos"
Kevin Wasserman [Mon, 30 Jul 2012 20:23:02 +0000 (16:23 -0400)] 
Fix warning caption "Leash"->"MIT Kerberos"

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7325 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoAlways install krb5.ini in KfW 4.0 installer
Kevin Wasserman [Mon, 30 Jul 2012 13:46:24 +0000 (09:46 -0400)] 
Always install krb5.ini in KfW 4.0 installer

Pre-existing krb5.ini files from old kfw versions will be overridden
due to the new search path, but not removed.  This is the desired behavior
since old krb5.ini files are far more likely to cause problems than to
contain useful data.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7324 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoPut athena-specific krb5.ini in athena subdir
Kevin Wasserman [Sat, 28 Jul 2012 12:14:24 +0000 (08:14 -0400)] 
Put athena-specific krb5.ini in athena subdir

The installer only picks it up if MIT_INTERNAL is defined in
the environment; otherwise it uses the now-empty krb5.ini in
the base directory.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7323 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

13 years agoCCAPI client rpc fixes
Kevin Wasserman [Fri, 27 Jul 2012 20:41:06 +0000 (16:41 -0400)] 
CCAPI client rpc fixes

On Windows XP, cci_os_ipc_thread_init() causes additional threads to be
spawned immediately, which results in a vicious cycle until Windows
resources are exhausted.  Instead, defer thread_init() until it is really
needed.

Also, use the MSDN-recommended defaults for RPC calls instead of random
constants.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7322 (new)
target_version: 1.10.4
tags: pullup