krb5.git
12 years agoMake password change work without default realm
Greg Hudson [Thu, 10 May 2012 17:34:01 +0000 (17:34 +0000)]
Make password change work without default realm

This fix is not very general or clean, but is suitable for backporting
because it is minimally invasive.  A more comprehensive fix will
follow.

ticket: 7127
target_version: 1.10.2
tags: pullup

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

12 years agoAdd no-op macro for ngettext for non-NLS builds
Greg Hudson [Wed, 9 May 2012 19:27:49 +0000 (19:27 +0000)]
Add no-op macro for ngettext for non-NLS builds

r25857 (#7128) uses ngettext, which means we need a no-op macro for it
when we're building without NLS support.

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

12 years agoConstify get_init_creds string input params
Greg Hudson [Wed, 9 May 2012 17:55:27 +0000 (17:55 +0000)]
Constify get_init_creds string input params

The get_init_creds functions take read-only string input parameters
for passwords and initial ticket services.  Make these const char *
parameters instead of just char * parameters, for caller convenience.

Reported by rra@stanford.edu.

ticket: 7121

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

12 years agoAdd API to interpret changepw result strings
Greg Hudson [Wed, 9 May 2012 17:40:38 +0000 (17:40 +0000)]
Add API to interpret changepw result strings

Active Directory returns structured policy information in the
nominally UTF-8 result string field of a password change reply.  Add a
new API krb5_chpw_message() to convert a result string into a
displayable message, interpreting policy information if present.

Patch from stefw@gnome.org with changes.

ticket: 7128

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

12 years agoConstify krb5int_utf8_normalize input parameter
Greg Hudson [Wed, 9 May 2012 17:40:32 +0000 (17:40 +0000)]
Constify krb5int_utf8_normalize input parameter

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

12 years agoFirst pass at PKINIT client trace logs
Greg Hudson [Tue, 8 May 2012 03:04:22 +0000 (03:04 +0000)]
First pass at PKINIT client trace logs

Trace basic decisions about PKINIT client protocol processing.

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

12 years agoImprove traced error messages from PKINIT client
Greg Hudson [Tue, 8 May 2012 03:04:15 +0000 (03:04 +0000)]
Improve traced error messages from PKINIT client

If we have no configured PKINIT client identity, or if we fail to
create a certificate chain, set a reasonable error code (not EINVAL or
ENOMEM) and a useful error message to appear in trace log output.

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

12 years agoImprove display of error code 0 in trace output
Greg Hudson [Tue, 8 May 2012 03:04:12 +0000 (03:04 +0000)]
Improve display of error code 0 in trace output

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

12 years agoUse variadic macros to simplify k5-trace.h
Greg Hudson [Tue, 8 May 2012 03:04:07 +0000 (03:04 +0000)]
Use variadic macros to simplify k5-trace.h

Also fix the facility to make it possible to trace log without
including k5-int.h.

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

12 years agoProcess param/defname node for "#define".
Zhanna Tsitkov [Sat, 5 May 2012 17:03:50 +0000 (17:03 +0000)]
Process param/defname node for "#define".

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

12 years agoFor typedef documents in Sphinx do not add short description to the titles
Zhanna Tsitkov [Sat, 5 May 2012 15:41:00 +0000 (15:41 +0000)]
For typedef documents in Sphinx do not add short description to the titles

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

12 years agoAdd generalized definition of krb5_ui_4 and krb5_int32 to the documentation for bette...
Zhanna Tsitkov [Sat, 5 May 2012 15:35:51 +0000 (15:35 +0000)]
Add generalized definition of krb5_ui_4 and krb5_int32 to the documentation for better cross-referencing. Do not include internal structure krb5_cc_ops into Sphinx documentation

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

12 years agoModernize style in vfy_increds.c
Greg Hudson [Thu, 3 May 2012 21:43:47 +0000 (21:43 +0000)]
Modernize style in vfy_increds.c

Make vfy_increds.c consistently use newer coding conventions.  Also
add a copyright statement.

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

12 years agoMake verify_init_creds work with existing ccache
Greg Hudson [Thu, 3 May 2012 21:43:42 +0000 (21:43 +0000)]
Make verify_init_creds work with existing ccache

As the file ccache implementation currently stands, we don't want to
turn off TC_OPENCLOSE on a file cache we're writing to, or it will be
opened read-only and stores to it will fail.  Reported by Russ
Allbery.

ticket: 5126

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

12 years agoThe new version of Doxygen (1.7.6.1) produces different xml output around the <initia...
Zhanna Tsitkov [Thu, 3 May 2012 20:28:02 +0000 (20:28 +0000)]
The new version of Doxygen (1.7.6.1) produces different xml output around the <initializer> node. Adopt the script to the change.

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

12 years agoTry all host keys by default in vfy_increds
Greg Hudson [Thu, 3 May 2012 19:42:43 +0000 (19:42 +0000)]
Try all host keys by default in vfy_increds

Factor out the core code of krb5_verify_init_creds into a helper, add
new helper functions to retrieve the list of unique host principals
from a keytab, and make krb5_verify_init_creds drive the helper once
per host principal.

Augment the test harness and test cases to better test the new
behavior.  Add a k5test method to retrieve an NFS principal for the
test realm for the sake of the new test cases.

ticket: 7125

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

12 years agoIn sn2princ, getaddrinfo without AI_ADDRCONFIG
Greg Hudson [Thu, 3 May 2012 15:15:51 +0000 (15:15 +0000)]
In sn2princ, getaddrinfo without AI_ADDRCONFIG

When canonicalizing a principal, use AI_CANONNAME alone in the hint
flags for getaddrinfo, for two reasons.  First, it works around a gnu
libc bug where getaddrinfo does a PTR lookup for the canonical name
(we tried to work around this in r24977 bug the addition of
AI_ADDRCONFIG caused the same problem as the use of AF_INET).  Second,
an IPv4-only host should be able create a principal for an IPv6-only
host even if it can't contact the host.

This does result in extra AAAA queries in the common case (IPv4-only
host contacting IPv4-only service), which is unfortunate.  But we need
to leave that optimization up to the platform at this point.

ticket: 7124

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

12 years agoClarify profile pluggable interface documentation
Greg Hudson [Wed, 2 May 2012 18:38:33 +0000 (18:38 +0000)]
Clarify profile pluggable interface documentation

Explain how profile plugin modules integrate with libkrb5, since it's
a bit different than usual.  Also fix a broken note.

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

12 years agoSimplify krb5_do_preauth
Greg Hudson [Mon, 30 Apr 2012 23:33:45 +0000 (23:33 +0000)]
Simplify krb5_do_preauth

Now that krb5_do_preauth has many fewer moving parts, simplify its
flow control.  Also remove an unused output parameter from
run_preauth_plugins.

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

12 years agoGet rid of built-in preauth types table
Greg Hudson [Mon, 30 Apr 2012 23:33:43 +0000 (23:33 +0000)]
Get rid of built-in preauth types table

Turn the last two entries of the pa_types table into helper functions
which we invoke before the loop.  Then, get rid of the part of the
loop which consults the pa_types table.

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

12 years agoSimplify preauth2 helper functions using realloc
Greg Hudson [Mon, 30 Apr 2012 23:33:38 +0000 (23:33 +0000)]
Simplify preauth2 helper functions using realloc

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

12 years agoUse correct name-type in TGS-REQs for 2008R2 RODCs
Tom Yu [Fri, 27 Apr 2012 22:40:21 +0000 (22:40 +0000)]
Use correct name-type in TGS-REQs for 2008R2 RODCs

Correctly set the name-type for the TGS principals to KRB5_NT_SRV_INST
in TGS-REQs.  (Previously, only AS-REQs had the name-type set in this
way.)  Windows Server 2008 R2 read-only domain controllers (RODCs)
insist on having the correct name-type for the TGS principal in
TGS-REQs as well as AS-REQs, at least for the TGT-forwarding case.

Thanks to Sebastian Galiano for reporting this bug and helping with
testing.

ticket: 7120
target_version: 1.10.2
tags: pullup

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

12 years agoSplit up and fix get_etype_info
Greg Hudson [Fri, 27 Apr 2012 21:11:08 +0000 (21:11 +0000)]
Split up and fix get_etype_info

The addition of afs3-salt processing in get_etype_info made it overly
large, so split out the pw-salt/afs3-salt processing into a separate
function.  Also fix two dumb bugs.

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

12 years agoStop using SALT_TYPE_AFS_LENGTH
Greg Hudson [Fri, 27 Apr 2012 21:11:04 +0000 (21:11 +0000)]
Stop using SALT_TYPE_AFS_LENGTH

In krb5_init_creds_ctx and krb5_clpreauth_rock_st, use a boolean to
track whether we're still using the default salt instead of
overloading salt.length.  In preauth2.c, process afs3 salt values like
we would in krb5int_des_string_to_key, and set an s2kparams indicator
instead of overloading salt.length.  Also use an s2kparams indicator
in kdb_cpw.c's add_key_pwd.  Remove the s2k code to handle overloaded
salt lengths, except for a sanity check.

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

12 years agoFix TRACE_PREAUTH_SALT format string
Greg Hudson [Fri, 27 Apr 2012 21:11:00 +0000 (21:11 +0000)]
Fix TRACE_PREAUTH_SALT format string

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

12 years agoDraft initial credentials API documentation
Tom Yu [Fri, 27 Apr 2012 20:39:13 +0000 (20:39 +0000)]
Draft initial credentials API documentation

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

12 years agoRefactor client etype-info handling in preauth2.c
Greg Hudson [Fri, 27 Apr 2012 17:13:23 +0000 (17:13 +0000)]
Refactor client etype-info handling in preauth2.c

Pull etype-info2, etype-info, pw-salt, and afs3-salt handling out of
the pa_types loop into a new helper function get_etype_info().

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

12 years agoEnsure null termination of AFS salts
Greg Hudson [Fri, 27 Apr 2012 17:04:24 +0000 (17:04 +0000)]
Ensure null termination of AFS salts

Use krb5int_copy_data_contents_add0 when copying a pa-pw-salt or
pa-afs3-salt value in pa_salt().  If it's an afs3-salt, we're going to
throw away the length and use strcspn in krb5int_des_string_to_key,
which isn't safe if the value is unterminated.

ticket: 2545

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

12 years agoMake it easier to test SAM-2 client code
Greg Hudson [Thu, 26 Apr 2012 21:47:05 +0000 (21:47 +0000)]
Make it easier to test SAM-2 client code

Add a method to the securid_sam2 plugin, built with alternate
compile-time flags, which supplies a plain-text challenge to the
client to be used as the OTP value.  This lets us manually exercise
the SAM-2 client code and a little bit of the KDC code.

securid_make_sam_challenge_2_and_cksum is moved into the method-
independent code and renamed.  get_securid_edata_2 has its sc2b
parameter removed as it was not used by the caller.

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

12 years agoConvert SAM-2 preauth mechanism to a module
Greg Hudson [Thu, 26 Apr 2012 21:47:02 +0000 (21:47 +0000)]
Convert SAM-2 preauth mechanism to a module

Move the last real preauth mechanism, SAM-2, from the pa_types table
to a built-in module.

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

12 years agoRemove orphaned Apple PKINIT support
Greg Hudson [Thu, 26 Apr 2012 21:46:57 +0000 (21:46 +0000)]
Remove orphaned Apple PKINIT support

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

12 years agoRearrange navigation buttons in the HTML header
Zhanna Tsitkov [Thu, 26 Apr 2012 13:11:09 +0000 (13:11 +0000)]
Rearrange navigation buttons in the HTML header

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

12 years agoAdd kadmin ACL enforcement tests
Greg Hudson [Thu, 26 Apr 2012 04:34:25 +0000 (04:34 +0000)]
Add kadmin ACL enforcement tests

Add a Python script to test the enforcement of kadm5.acl
specifications, including wildcards and restrictions.

ticket: 7097

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

12 years agoAllow clearpolicy restriction for kadmin addprinc
Greg Hudson [Thu, 26 Apr 2012 04:34:20 +0000 (04:34 +0000)]
Allow clearpolicy restriction for kadmin addprinc

Although the kadmin client never generates a KADM5_POLICY_CLR mask bit
with addprinc, the bit will be set if a kadm5.acl line imposes the
-clearpolicy restriction.  Relax the sanity checking in
kadm5_create_principal_3 to allow KADM5_POLICY_CLR as long as
KADM5_POLICY is not also set.

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

12 years agoAdd k5test.py helpers for running kadmin
Greg Hudson [Thu, 26 Apr 2012 04:34:15 +0000 (04:34 +0000)]
Add k5test.py helpers for running kadmin

Add K5Realm.prep_kadmin() to create a ccache and K5Realm.run_kadmin()
to run a kadmin query using it.  Modify t_stringattr.py to use these
helpers instead of its own.

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

12 years agoFlip the default of start_kadmind in k5test.py
Greg Hudson [Thu, 26 Apr 2012 04:33:48 +0000 (04:33 +0000)]
Flip the default of start_kadmind in k5test.py

Very few Python tests need kadmind, so it makes more sense to have to
turn it on than to have to turn it off.

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

12 years agoMinor cleanup (mostly to remove the "Contents" section titles)
Zhanna Tsitkov [Wed, 25 Apr 2012 19:15:30 +0000 (19:15 +0000)]
Minor cleanup (mostly to remove the "Contents" section titles)

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

12 years agoUse "agogo" HTML theme (with some modifications) for the Sphinx documentation. Do...
Zhanna Tsitkov [Wed, 25 Apr 2012 19:10:41 +0000 (19:10 +0000)]
Use "agogo" HTML theme (with some modifications) for the Sphinx documentation. Do not show the ReST source files

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

12 years agoClear preauth use counts for each AS request
Greg Hudson [Wed, 25 Apr 2012 17:20:20 +0000 (17:20 +0000)]
Clear preauth use counts for each AS request

Initialize use_count fields in krb5_preauth_request_context_init,
which is invoked before each AS request.  Previously they were
initialized only in krb5_init_preauth_context, which is only invoked
once per krb5 library context.

ticket: 7119
target_version: 1.10.2
tags: pullup

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

12 years agoAdd KRB5_TRACE test case
Greg Hudson [Tue, 24 Apr 2012 17:04:29 +0000 (17:04 +0000)]
Add KRB5_TRACE test case

In t_general.py, run kinit with KRB5_TRACE enabled and make sure we
see some basic strings in the resulting file.

ticket: 7113

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

12 years agoAdjust t_general.py organization
Greg Hudson [Tue, 24 Apr 2012 17:04:21 +0000 (17:04 +0000)]
Adjust t_general.py organization

Move some tests out of the multipass_realms loop since they aren't
enctype-dependent.  Fix the success message not to mention kvno
wrapping.  Don't start kadmind in the multipass_realms loop since we
don't use it.

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

12 years agoTry all history keys to decrypt password history
Greg Hudson [Tue, 24 Apr 2012 01:05:41 +0000 (01:05 +0000)]
Try all history keys to decrypt password history

A database created prior to 1.3 will have multiple password history
keys, and kadmin prior to 1.8 won't necessarily choose the first one.
So if there are multiple keys, we have to try them all.  If none of
the keys can decrypt a password history entry, don't fail the password
change operation; it's not worth it without positive evidence of
password reuse.

ticket: 7099

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

12 years agoUse etypes from keytab in krb5_gic_keytab
Greg Hudson [Thu, 19 Apr 2012 17:55:14 +0000 (17:55 +0000)]
Use etypes from keytab in krb5_gic_keytab

When getting initial credentials with a keytab, filter the list of
request enctypes based on the keys in the keytab.

Based on a patch from Stef Walter.

ticket: 2131

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

12 years agoUnify krb5_get_init_creds_keytab code paths
Greg Hudson [Thu, 19 Apr 2012 17:55:10 +0000 (17:55 +0000)]
Unify krb5_get_init_creds_keytab code paths

Use krb5_init_creds_set_keytab in krb5_get_init_creds_keytab, so that
processing added to the former will be used by the latter.  This is
slightly awkward because of the way we do the use_master fallback, in
that we have to duplicate some of krb5int_get_init_creds.

Based on a patch from Stef Walter.

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

12 years agoReturn kinit output in k5test's K5Realm.kinit
Greg Hudson [Thu, 19 Apr 2012 17:55:07 +0000 (17:55 +0000)]
Return kinit output in k5test's K5Realm.kinit

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

12 years agoAdd keytab kinit test cases
Greg Hudson [Thu, 19 Apr 2012 17:55:03 +0000 (17:55 +0000)]
Add keytab kinit test cases

Create a test script for keytab-related tests.  Move the kvno wrapping
test there from t_general.py, and augment it to better match what's in
standalone.exp.  Add tests for kinit with keytab, including kinit with
the most-preferred enctype missing from the keytab (which currently
fails).

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

12 years agoAdd Doxygen markup to API functions that were introduced in 1.9 release
Zhanna Tsitkov [Thu, 19 Apr 2012 14:45:20 +0000 (14:45 +0000)]
Add Doxygen markup to API functions that were introduced in 1.9 release

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

12 years agoEdit resources page
Greg Hudson [Tue, 17 Apr 2012 18:18:08 +0000 (18:18 +0000)]
Edit resources page

Improve description of kerberos and krbcore.  Remove trailing
whitespace throughout.

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

12 years agoRename mitresources.rst to resources.rst
Greg Hudson [Tue, 17 Apr 2012 18:08:13 +0000 (18:08 +0000)]
Rename mitresources.rst to resources.rst

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

12 years agoTranslate @version Doxygen markup into rst format
Zhanna Tsitkov [Tue, 17 Apr 2012 18:07:07 +0000 (18:07 +0000)]
Translate @version Doxygen markup into rst format

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

12 years agoAdd Doxygen markup to API functions that were introduced in 1.10 release
Zhanna Tsitkov [Tue, 17 Apr 2012 17:58:56 +0000 (17:58 +0000)]
Add Doxygen markup to API functions that were introduced in 1.10 release

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

12 years agoAdded MIT resources document
Zhanna Tsitkov [Tue, 17 Apr 2012 17:49:10 +0000 (17:49 +0000)]
Added MIT resources document

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

12 years agoAllow preauth mechs to work with clock skew
Greg Hudson [Tue, 17 Apr 2012 04:07:34 +0000 (04:07 +0000)]
Allow preauth mechs to work with clock skew

Add a clpreauth callback which gets the time of day using an offset
determined by the preauth-required error, and use it in encrypted
timestamp and encrypted challenge.  This timestamp is not necessarily
authenticated, but the security consequences for those preauth mechs
are minor (and can be mitigated by turning off kdc_timesync on
clients).

Based on a patch from Stef Walter.

ticket: 7114

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

12 years agoAdd clock skew tests
Greg Hudson [Tue, 17 Apr 2012 03:19:12 +0000 (03:19 +0000)]
Add clock skew tests

Add a KDC option (-T) to run with a time offset, and use that to
test kdc_timesync behavior.

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

12 years agoCorrect kdc_timesync documentation
Greg Hudson [Tue, 17 Apr 2012 03:19:07 +0000 (03:19 +0000)]
Correct kdc_timesync documentation

kdc_timesync is read from the profile as an integer, not a boolean; go
back to documenting it that way.

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

12 years agoDocument kadm5_hook chpass randomize-key behavior
Greg Hudson [Mon, 16 Apr 2012 23:21:42 +0000 (23:21 +0000)]
Document kadm5_hook chpass randomize-key behavior

kadmind's randkey operation invokes the kadm5_hook chpass method with
a null newpass parameter, which wasn't documented.

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

12 years agoFix documention of unconfigured rsthml build
Tom Yu [Wed, 11 Apr 2012 22:45:56 +0000 (22:45 +0000)]
Fix documention of unconfigured rsthml build

It's necessary to specify srcdir=. on the command line when building
rsthtml in an unconfigured tree.

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

12 years agoFix trace logging initialization
Greg Hudson [Thu, 5 Apr 2012 14:07:05 +0000 (14:07 +0000)]
Fix trace logging initialization

Reported by stefw@gnome.org.

ticket: 7112

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

12 years agoFix app tag choices for decoding EncASRepPart
Greg Hudson [Thu, 5 Apr 2012 13:57:37 +0000 (13:57 +0000)]
Fix app tag choices for decoding EncASRepPart

When decoding an AS-REP enc part, we should accept app tags 26 (the
bogus one we generate) and 25 (the correct value).  We were accepting
26 and 24.  Bug report and fix by stefw@gnome.org.

ticket: 7111

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

12 years agoFix password reuse check with cpw -keepold
Greg Hudson [Wed, 4 Apr 2012 21:38:57 +0000 (21:38 +0000)]
Fix password reuse check with cpw -keepold

When we check for password reuse, only compare keys with the most
recent kvno against history entries, or else we will always fail with
-keepold.

This bug primarily affects rollover of cross-realm TGT principals,
which typically use password-derived keys and may have an associated
password policy such as "default".

Bug report and candidate fix (taken with a slight modification) by
Nicolas Williams.

ticket: 7110

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

12 years agoIf trace logging facility is enabled, report misconfiguration errors encountered...
Zhanna Tsitkov [Mon, 2 Apr 2012 18:38:45 +0000 (18:38 +0000)]
If trace logging facility is enabled, report misconfiguration errors encountered while initializing krb5 library context

ticket: 7091

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

12 years agoMake cross-TGT key rollover work from AD to MIT
Greg Hudson [Mon, 2 Apr 2012 17:49:56 +0000 (17:49 +0000)]
Make cross-TGT key rollover work from AD to MIT

Active Directory always issues cross-realm tickets without a kvno,
which we see as kvno 0.  When we see that, try the highest kvno (as we
already do) and then a few preceding kvnos so that key rollover of the
AD->MIT cross TGT can work.

Add new helpers kdc_rd_ap_req, which takes the place of a couple of
steps from kdc_process_tgs_req, and find_server_key, which takes the
place of some of the end steps of kdc_get_server_key.

Code changes by Nicolas Williams.  Test cases by me.

ticket: 7109

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

12 years agoEdit RST docs on building RST docs
Greg Hudson [Sat, 31 Mar 2012 06:01:02 +0000 (06:01 +0000)]
Edit RST docs on building RST docs

Fix a couple of grammar errors noted by Ben Kaduk, and elaborate a
little bit on why generated man pages are checked into the repository.

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

12 years agoFix data handling in rd_req_decoded_opt
Greg Hudson [Sat, 31 Mar 2012 00:38:20 +0000 (00:38 +0000)]
Fix data handling in rd_req_decoded_opt

We shouldn't peer at trans->tr_contents.data[0] if
trans->tr_contents.length is 0, even if the data field is non-null.
Harmless as long as the ASN.1 decoder uses null data fields for empty
krb5_data values, but still wrong.

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

12 years agoAvoid malloc(0) in ASN.1 bytestring decode
Greg Hudson [Sat, 31 Mar 2012 00:38:16 +0000 (00:38 +0000)]
Avoid malloc(0) in ASN.1 bytestring decode

In k5_asn1_decode_bytestring, just leave *str_out as NULL if len is 0,
instead of calling malloc(0) and possibly returning a spurious ENOMEM.

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

12 years agoAdd doc target with configured path substitutions
Greg Hudson [Wed, 28 Mar 2012 21:11:06 +0000 (21:11 +0000)]
Add doc target with configured path substitutions

Add a new target "substhtml" in src/doc to create HTML documentation
with configured paths, suitable for installation by an OS package.
The build target generates a file named paths.py containing the
directory substitutions, copies it into the rst_composite directory,
and instructs conf.py to use it with the "pathsubs" tag.

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

12 years agoUse reference substitutions for paths in docs
Greg Hudson [Wed, 28 Mar 2012 21:11:01 +0000 (21:11 +0000)]
Use reference substitutions for paths in docs

For the default doc build (used for the web site and release tarball),
substitute path variables with links to the paths table in
mitK5defaults.rst, using symbolic names for the link text.

The substitution of kdcdir for man pages is slightly altered as a
side-effect of this commit.  Regenerate the man pages to match.  The
rendered man pages are unchanged.

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

12 years agoEdit defaults page in documentation
Greg Hudson [Wed, 28 Mar 2012 21:10:49 +0000 (21:10 +0000)]
Edit defaults page in documentation

Eliminate unused values and OS-specific stuff.  Reformat tables.  Add
a path substitution for sysconfdir to be used in the default config
file path.

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

12 years agoMove rstman build target to man directory
Greg Hudson [Wed, 28 Mar 2012 02:03:45 +0000 (02:03 +0000)]
Move rstman build target to man directory

rstman makes more sense in man than in doc, so move it there.  Remove
the rstman target from the top-level doc Makefile to avoid confusion.

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

12 years agoAutomate RST HTML generation with doxygen info
Greg Hudson [Wed, 28 Mar 2012 02:03:33 +0000 (02:03 +0000)]
Automate RST HTML generation with doxygen info

In src/doc/Makefile.in, create an "rsthtml" target for generating
release tarball/web site HTML docs in doc/rst_html.  For now,
eliminate support for the bridge to the Doxygen HTML output; just
generate XML output with Doxygen and convert it to RST format.

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

12 years agoFix up gssapi_ext.h Doxygen markup somewhat
Greg Hudson [Tue, 27 Mar 2012 02:32:57 +0000 (02:32 +0000)]
Fix up gssapi_ext.h Doxygen markup somewhat

* Bring formatting for gss_userok and gss_authorize_localname into
  conformance.
* Bring parameter markup for gss_localname into conformance.

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

12 years agoFix up krb5.hin Doxygen markup somewhat
Greg Hudson [Tue, 27 Mar 2012 02:32:48 +0000 (02:32 +0000)]
Fix up krb5.hin Doxygen markup somewhat

* Put everything in an enclosing group, so it gets captured even
  without EXTRACT_ALL.
* Make sure there's documentation for all constants referenced by
  other markup.
* Fix references to the PAC constants.

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

12 years agoRemove krb5-send-pr man page
Greg Hudson [Sat, 24 Mar 2012 14:29:44 +0000 (14:29 +0000)]
Remove krb5-send-pr man page

The license on the krb5-send-pr man page was incompatible with the
rest of our documentation, and the content is questionably up to date
(krb5-send-pr still exists, but we don't use GNATS any more, and
free-form mail to krb5-bugs is equally acceptable at this point).  Get
rid of it for now.

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

12 years agoRemove references to the "feedback" and the original source of the document (such...
Zhanna Tsitkov [Fri, 23 Mar 2012 19:20:12 +0000 (19:20 +0000)]
Remove references to the "feedback" and the original source of the document (such as Kerberos V5 Installation Guide etc) in the rst files

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

12 years agoInstall path-substituted man pages
Greg Hudson [Fri, 23 Mar 2012 16:27:05 +0000 (16:27 +0000)]
Install path-substituted man pages

Introduce src/doc/Makefile.in, which will eventually subsume
doc/Makefile (but will still pull sources from doc).  In the rstman
target there, create man pages with symbolic path references (like
@SBINDIR@).  In man/Makefile.in, substitute the path references with
the configured paths before installing.

Man pages generated from RST source are now checked into the source
tree under the name filename.man.  This lets us use a single implicit
.man.sub rule for the path substitutions.

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

12 years agoMiscellaneous small edits to RST docs
Greg Hudson [Thu, 22 Mar 2012 17:28:42 +0000 (17:28 +0000)]
Miscellaneous small edits to RST docs

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

12 years agoUse substitutions in RST docs
Greg Hudson [Thu, 22 Mar 2012 17:28:34 +0000 (17:28 +0000)]
Use substitutions in RST docs

Create an rst_epilog variable defining substitutions for pathnames and
default enctypes, and use them in the RST source files.

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

12 years agoSuppress some gcc uninitialized variable warnings
Greg Hudson [Thu, 22 Mar 2012 14:07:44 +0000 (14:07 +0000)]
Suppress some gcc uninitialized variable warnings
ticket: 7107
gcc 4.6.2 reportedly finds some spurious maybe-uninitialized warnings.
Suppress them.  Patch from Eray Aslan with some adjustment.

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

12 years agoDescribe trace logging in troubleshooting docs
Greg Hudson [Wed, 21 Mar 2012 17:44:18 +0000 (17:44 +0000)]
Describe trace logging in troubleshooting docs

Add a section to the troubleshooting page in the RST documentation
describing how to use trace logging and giving sample output.

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

12 years agoOnly store master mey list in DAL handle
Greg Hudson [Wed, 21 Mar 2012 16:57:05 +0000 (16:57 +0000)]
Only store master mey list in DAL handle

r24314 (#6778) created a hybrid owernship model for the master key
list, with one virtual copy stored in the DAL handle and one provided
to the caller of krb5_db_fetch_mkey_list.  Replace this with a model
where only the DAL handle owns the list, and a caller can get access
to an alias pointer with a new function krb5_db_mkey_list_alias().
Functions which previously accepted the master key list as an input
parameter now expect to find it in the DAL handle.

Patch by Will Fiveash <will.fiveash@oracle.com>.

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

12 years agoMove supported enc/salt type docs to kdc.conf(5)
Greg Hudson [Tue, 20 Mar 2012 17:39:04 +0000 (17:39 +0000)]
Move supported enc/salt type docs to kdc.conf(5)

Remove enc_types.rst and move its contents into kdc.conf(5).  Adjust
references so that man page readers can find the section in the
kdc.conf man page.

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

12 years agoDo not insert a timestamp into manpages and Sphinx main page
Zhanna Tsitkov [Mon, 19 Mar 2012 18:19:55 +0000 (18:19 +0000)]
Do not insert a timestamp into manpages and Sphinx main page

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

12 years agoCorrect the location of k5identity and k5login in the man_page section of the Sphinx...
Zhanna Tsitkov [Mon, 19 Mar 2012 18:12:27 +0000 (18:12 +0000)]
Correct the location of k5identity and k5login in the man_page section of the Sphinx config file

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

12 years agoMake localedir work in build with autoconf 2.5x
Greg Hudson [Mon, 19 Mar 2012 04:40:52 +0000 (04:40 +0000)]
Make localedir work in build with autoconf 2.5x

autoconf 2.5x does not define localedir, so we have to detect that and
do it ourselves.

ticket: 7095
target_version: 1.10.2
tags: pullup

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

12 years agoMiscellaneous RST documentation edits
Greg Hudson [Fri, 16 Mar 2012 13:57:55 +0000 (13:57 +0000)]
Miscellaneous RST documentation edits

Make small changes to various RST documentation pages to improve
clarity or remove outdated statements.

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

12 years agoMove privileges section in database admin docs
Greg Hudson [Fri, 16 Mar 2012 13:57:50 +0000 (13:57 +0000)]
Move privileges section in database admin docs

The "Privileges" section in the RST database administration
documentation was tucked away in the middle of a section on principal
operations.  Move it out and put it between policy operations and
kdb5_util operations, without changing its content.

(We may want to replace this whole section with a reference to the
appropriate part of the kadmind man page, but that requires a bit of
reconciliation since the kadmind man page doesn't document
restrictions yet.)

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

12 years agoReorder top-level RST doc sections
Greg Hudson [Fri, 16 Mar 2012 13:57:45 +0000 (13:57 +0000)]
Reorder top-level RST doc sections

Order the top-level documentation according to the expertise level of
the intended audience.

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

12 years agoDocument the ccselect interface in krb5.conf
Greg Hudson [Fri, 16 Mar 2012 13:57:31 +0000 (13:57 +0000)]
Document the ccselect interface in krb5.conf

r25158 (#6957) omitted krb5.conf documentation for the ccselect
interface.  Add it now.

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

12 years agoRevise RST install guide client configuration
Greg Hudson [Fri, 16 Mar 2012 13:57:05 +0000 (13:57 +0000)]
Revise RST install guide client configuration

Stop recommending login.krb5.  Remove outdated OSX instructions.
Don't suggest modifying /etc/services as we don't rely on it any more
(and it's generally already done by the OS these days).  Add new
guidance for krb5.conf settings.

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

12 years agoEdit RST user man pages for clarity and accuracy
Greg Hudson [Fri, 16 Mar 2012 04:31:57 +0000 (04:31 +0000)]
Edit RST user man pages for clarity and accuracy

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

12 years agoEdit RST admin man pages for clarity and accuracy
Greg Hudson [Thu, 15 Mar 2012 22:52:45 +0000 (22:52 +0000)]
Edit RST admin man pages for clarity and accuracy

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

12 years agoMiscellaneous corrections to RST docs
Greg Hudson [Thu, 15 Mar 2012 04:55:41 +0000 (04:55 +0000)]
Miscellaneous corrections to RST docs

Fix various small errors pointed out by Ben Kaduk (and a couple of
minor misstatements in text adjacent to them).

ticket: 7106

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

12 years agoAdd plugin configuration documentation
Greg Hudson [Wed, 14 Mar 2012 21:06:01 +0000 (21:06 +0000)]
Add plugin configuration documentation

In the RST admin guide, add a page for host configuration, and include
a subsection on registering, enabling, and disabling plugin modules.
For now, do not cover the private KDB and authdata plugin interfaces.

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

12 years agoAdd config file section in RST user guide
Greg Hudson [Wed, 14 Mar 2012 19:55:49 +0000 (19:55 +0000)]
Add config file section in RST user guide

Move the .k5identity and .k5login man pages to a separate section from
user commands.  Also, kadmin.local and k5srvutil are not user-oriented
commands, so don't link to them in the user_commands index.

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

12 years agoRemove user_appl section in RST docs
Greg Hudson [Wed, 14 Mar 2012 19:55:44 +0000 (19:55 +0000)]
Remove user_appl section in RST docs

The user_appl directory contained documentation for krb5_appl programs
which have largely been subsumed by ssh, for ksu (essentially
duplicating the ksu man page), and for ssh (a stub).  Get rid of the
whole thing for now; we can add an ssh section back into the user
guide when we have more written about it.

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

12 years agoBring ticket management documentation up to date
Greg Hudson [Wed, 14 Mar 2012 19:55:38 +0000 (19:55 +0000)]
Bring ticket management documentation up to date

Refer to ssh instead of telnet; refer to login system integration
instead of the Kerberos login program.

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

12 years agoCreated a new basic Kerberos concepts section and moved stash_file_def there
Zhanna Tsitkov [Wed, 14 Mar 2012 19:18:09 +0000 (19:18 +0000)]
Created a new basic Kerberos concepts section and moved stash_file_def there

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

12 years agoConsolidate password and ticket management docs
Greg Hudson [Wed, 14 Mar 2012 18:30:39 +0000 (18:30 +0000)]
Consolidate password and ticket management docs

In the RST documentation, combine the pwd_mgmt and tkt_mgmt
subdirectories of krb_users into single files, without changing the
content.

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

12 years agoEdit RST admin guide for clarity and accuracy
Greg Hudson [Mon, 12 Mar 2012 20:24:45 +0000 (20:24 +0000)]
Edit RST admin guide for clarity and accuracy

Some more notable changes include:

* plugin development is a top-level guide, so remove the advanced
  topic page in the admin guide.
* Remove krb5-appl references in firewall configuration section.
* Remove dns.rst since it was only referenced from a man page (which
  doesn't work) and just contained a pair of links, one of which was
  to the immediately preceding section.
* Don't document TXT record support as if it were supported in the
  default build.  It can be documented in an appendix.
* A couple of troubleshooting segments gave very
  specifically-applicable advice based on general error messages, or
  described problems which were fixed several releases ago.

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

12 years agoFix the ref string
Zhanna Tsitkov [Fri, 9 Mar 2012 20:40:55 +0000 (20:40 +0000)]
Fix the ref string

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