Greg Hudson [Tue, 5 Oct 2010 14:53:09 +0000 (14:53 +0000)]
Propagate modprinc -unlock from master to slave KDCs
Create a new tl-data type to hold the time of the last administrative
unlock, and factor it into decisions about account lockout. Since
tl-data values are propagated from master to slave, this will cause
modprinc -unlock operations to reach slave KDCs on the next
propagation.
ticket: 6795
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24424
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Tue, 5 Oct 2010 13:57:27 +0000 (13:57 +0000)]
Add additional NRL copyright
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24423
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Tue, 5 Oct 2010 13:57:23 +0000 (13:57 +0000)]
Document kadm5_hook interface
* krb5.conf
* admin.texinfo
* kadm5_hook_plugin.h: document initvt requirement
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24422
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Tue, 5 Oct 2010 03:29:35 +0000 (03:29 +0000)]
Some missed files needed for rev #24420
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24421
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Tue, 5 Oct 2010 03:18:22 +0000 (03:18 +0000)]
Improves prng code modularity. Introduces fortuna-like prng that can be used in lieu of yarrow.
Yarrow stays the default prng while fortuna may be engaged during configuration by using "--with-prng-alg=fortuna" flag.
Also, nss crypto backend continues to use its own prng.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24420
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Tue, 5 Oct 2010 03:01:01 +0000 (03:01 +0000)]
Add mit_afs_string_to_key declaration
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24419
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 5 Oct 2010 00:16:10 +0000 (00:16 +0000)]
Add a missing protototype which was breaking the crypto build with the
NSS back end after r24409.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24418
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 4 Oct 2010 18:23:00 +0000 (18:23 +0000)]
Protoize old-style function definitions in kdb5.c and normalize
formatting of definition headers. No functional changes.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24417
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Sat, 2 Oct 2010 17:21:54 +0000 (17:21 +0000)]
Merge branches/nss to trunk
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24416
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Sat, 2 Oct 2010 17:17:35 +0000 (17:17 +0000)]
Copyright statements, whitespace, and other code formatting
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24415
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Sat, 2 Oct 2010 11:48:06 +0000 (11:48 +0000)]
In the krb5_kuserok implementation, fix an unintentional type change
to "gobble" (was an int, was accidentally changed to a char) which
could result in an infinite loop.
ticket: 6792
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24413
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Sat, 2 Oct 2010 11:34:27 +0000 (11:34 +0000)]
Fix type errors in t_gssexts
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24412
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Sat, 2 Oct 2010 11:30:50 +0000 (11:30 +0000)]
Eliminate K&R-style function definition headers in t_gssexts.c, and
reformat other definitions according to coding practices.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24411
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 2 Oct 2010 03:29:37 +0000 (03:29 +0000)]
Use gss_set_cred_option instead of (undeclared) gssspi_set_cred_option
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24410
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 2 Oct 2010 03:29:34 +0000 (03:29 +0000)]
Try to require function declarations for GCC, as we already do for the
Sun compiler.
Change the cache variable name construction to distinguish "=" from
"-" in option names. Prefer -Werror-implicit-function-declaration
over -Werror=implicit-function-declaration since in some versions of
GCC only the former works properly.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24409
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Fri, 1 Oct 2010 20:15:00 +0000 (20:15 +0000)]
Add empty src/plugins/preauth/securid_sam2/deps to allow build to work again
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24407
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Fri, 1 Oct 2010 17:12:41 +0000 (17:12 +0000)]
Add an error to be returned by a preauth mechanism indicating that the KDC should not respond to a packet
* Do not generate an error response in this case
* Drop a TCP connection if we are not going to respond to it.
kdc: add KRB5KDC_ERR_DISCARD
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24406
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Fri, 1 Oct 2010 17:12:37 +0000 (17:12 +0000)]
Initial securid2 support.
builds but untested
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24405
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Fri, 1 Oct 2010 17:12:30 +0000 (17:12 +0000)]
Enable sam_challenge_2 encoders
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24404
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Fri, 1 Oct 2010 17:12:26 +0000 (17:12 +0000)]
Remove support for the old pa-sam-challenge and pa-sam-response
preauth type per discussion on krbdev. The pa-sam-challenge-2 code
remains in the client.
preauth: remove pa-sam-challenge
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24403
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 1 Oct 2010 15:56:30 +0000 (15:56 +0000)]
Implement k5login_directory and k5login_authoritative options
Add and document two new options for controlling k5login behavior.
ticket: 6792
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24402
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 1 Oct 2010 13:44:12 +0000 (13:44 +0000)]
Add a simple test harness for kuserok. Build it during make check but
don't run any automated tests for the moment.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24401
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 1 Oct 2010 03:47:38 +0000 (03:47 +0000)]
A cleaner impleentation of r24399 which adds two new auth context APIs
(and is therefore less suitable for backporting to 1.8) but doesn't
reach inside the auth context structure in the krb5 mechanism code.
ticket: 6768
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24400
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 1 Oct 2010 03:45:43 +0000 (03:45 +0000)]
GSSAPI forwarded credentials must be encrypted in session key
When IAKERB support was added, the krb5_mk_req checksum function
gained access to the send subkey. This caused GSSAPI forwarded
credentials to be encrypted in the subkey, which violates RFC 4121
section 4.1.1 and is not accepted by Microsoft's implementation.
Temporarily null out the send subkey in the auth context so that
krb5_mk_ncred uses the session key instead.
ticket: 6768
target_version: 1.8.4
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24399
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 30 Sep 2010 17:16:46 +0000 (17:16 +0000)]
Whitespace
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24393
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 30 Sep 2010 17:02:29 +0000 (17:02 +0000)]
Whitespace
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24392
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 30 Sep 2010 17:01:30 +0000 (17:01 +0000)]
Use a different construction for defaulting ks_tuple and n_ks_tuple in
the libkadm5 server principal routines, to avoid repeated conditional
expressions.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24391
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 30 Sep 2010 15:53:44 +0000 (15:53 +0000)]
Whitespace and minor style changes
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24390
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 30 Sep 2010 13:13:41 +0000 (13:13 +0000)]
Correct the admin documentation for auth_to_local
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24387
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 29 Sep 2010 21:38:26 +0000 (21:38 +0000)]
Follow-on to r24258: initialize the new k5e1 error table where we
initialize the krb5 error table, and add initialize_k5e1_error_table
to the libkrb5 exports list for consistency with the other error
tables.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24378
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Wed, 29 Sep 2010 21:29:25 +0000 (21:29 +0000)]
make depend
Add kadm5_hook test plugin to toplevel Makefile.in
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24377
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Wed, 29 Sep 2010 21:29:20 +0000 (21:29 +0000)]
Automated tests for kadm5_hook plugin
Include a k5test Python test and test plugin for the kadm5_hook interface.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24376
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Wed, 29 Sep 2010 21:29:14 +0000 (21:29 +0000)]
kadm5_hook: new plugin interface
Implement http://k5wiki.kerberos.org/wiki/Projects/Kadmin_hook_interface
This provides an interface that allows a plugin to track kadmin
operations. This can be used for projects like the krb5-sync project.
ticket: 6791
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24375
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 28 Sep 2010 19:09:11 +0000 (19:09 +0000)]
Make krb5_dbe_def_search_enctype skip key data entries with invalid
enctypes instead of erroring out on them. We had this behavior prior
to 1.8 (more by accident than by design), but it changed as a
side-effect of r23599.
ticket: 6790
target_version: 1.8.4
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24370
dc483132-0cff-0310-8789-
dd5450dbe970
Luke Howard [Mon, 27 Sep 2010 18:51:55 +0000 (18:51 +0000)]
Use IAKERB OID header for all IAKERB messages including AP-REQ
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24363
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Mon, 27 Sep 2010 17:16:47 +0000 (17:16 +0000)]
Doxygen for k5-buf.h
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24360
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Mon, 27 Sep 2010 17:16:41 +0000 (17:16 +0000)]
kpasswd: if a credential cache is present, use FAST
If a credentials cache is available, use it as an armor cache to enable FAST negotiation for kpasswd. This requires an attacker to attack both the user's long-term key for the old password as well as the ticket used for the armor cache in order to attack the password change. Depending on how the armor ticket is obtained, this may provide limited value. However, it provides users an easy option if they are concerned about their current password. Users can kinit with one principal to help protect changing the password of another principal.
* krb5_get_init_creds_opt_set_fast_ccache: new API to set fast ccache based on a krb5_ccache object rather than a resolvable string
* kpasswd: always open the current credential cache even if not needed
for determining the principal. If the cache has tickets, use it as
an armor cache.
* tests/dejagnu/krb-standalone/kadmin.exp: Arrange to test new code path
ticket: 6786
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24359
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 27 Sep 2010 03:46:57 +0000 (03:46 +0000)]
Simplify acquire_accept_cred very slightly, avoiding some long lines
and repeated macro calls.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24357
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 27 Sep 2010 03:39:22 +0000 (03:39 +0000)]
Add gss_krb5_import_cred
Add gss_krb5_import_cred from Heimdal; allows krb5 creds to be
acquired from a keytab or ccache into a GSSAPI credential without
using global process or thread variables.
Merged from the users/lhoward/import-cred branch.
ticket: 6785
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24356
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 22 Sep 2010 22:09:24 +0000 (22:09 +0000)]
Initialize kdb5_ldap_util's context with kadm5_init_krb5_context, like
kdb5_util does, in order to get the KDC profile settings as well as
the regular krb5 profile settings.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24337
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Wed, 22 Sep 2010 21:50:48 +0000 (21:50 +0000)]
relicense Sun RPC to 3-clause BSD-style
Per e-mail from Wim Coekaerts, Oracle America authorizes the
relicensing of Sun RPC to 3-clause BSD-style.
ticket: 6784
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24336
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 20 Sep 2010 18:25:18 +0000 (18:25 +0000)]
Adjust the k5login man page to have a slightly more neutral tone
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24335
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Sun, 19 Sep 2010 12:03:18 +0000 (12:03 +0000)]
Slight revisions to create_workers() in the KDC:
* Use calloc() to allocate the pids array; squashes a Coverity false
positive.
* Don't leak the pids array in worker processes.
* Use consistent terminology in comments.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24329
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 17 Sep 2010 17:42:31 +0000 (17:42 +0000)]
KDC worker processes feature
Add support for a krb5kdc -w option which causes the KDC to spawn
worker processes which can process requests in parallel. See also:
http://k5wiki.kerberos.org/wiki/Projects/Parallel_KDC
ticket: 6783
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24328
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 17 Sep 2010 16:06:34 +0000 (16:06 +0000)]
Add an extra arguments parameter to k5test's realm.start_kdc()
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24327
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 17 Sep 2010 15:52:23 +0000 (15:52 +0000)]
In kinit_kdb_init(), ensure that we don't return an error with the
old, freed value of *pcontext still there--that would result in a
double free.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24326
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 16 Sep 2010 17:38:30 +0000 (17:38 +0000)]
Follow-on to r24315: remove get/set_mkey_list from export list of
libkdb_ldap.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24324
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 15 Sep 2010 22:43:00 +0000 (22:43 +0000)]
In the PKINIT OpenSSL crypto code, use a signed int to hold the result
of X509_get_ext_by_NID so we can detect negative return values.
Reported by nalin@redhat.com.
ticket: 6774
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24323
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 15 Sep 2010 20:07:39 +0000 (20:07 +0000)]
Whitespace
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24322
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 15 Sep 2010 17:45:31 +0000 (17:45 +0000)]
Add a license statement to the new extern.h in kinit, use an include
blocker which does not impinge on the system's symbol namespace, and
use the recommended formatting for function prototypes.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24319
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 15 Sep 2010 17:30:17 +0000 (17:30 +0000)]
Whitespace
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24318
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 15 Sep 2010 17:22:57 +0000 (17:22 +0000)]
Formatting fix
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24317
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Wed, 15 Sep 2010 17:13:41 +0000 (17:13 +0000)]
kinit: add KDB keytab support
This implements
http://k5wiki.kerberos.org/Projects/What_does_God_need_with_a_password.
If the KDB keytab is selected by command line options, then kinit will
register the KDB keytab and open the database. This permits an
administrator to obtain tickets as a user without knowing that user's
password.
As a result kinit links against libkadm5srv and libkdb5. Discussion is
ongoing about whether this is desirable or about whether two versions
of kinit are required.
ticket: 6779
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24316
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Wed, 15 Sep 2010 17:13:34 +0000 (17:13 +0000)]
Remove dead code from DAL and kdb plugins
kdb: remove get/set_mkey_list
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24315
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Wed, 15 Sep 2010 17:13:23 +0000 (17:13 +0000)]
kdb: store mkey list in context and permit NULL mkey for kdb_dbe_decrypt_key_data
Previously, code needed to run a loop to find the current master key,
possibly fetch a new master key list and try finding the master key
again around each key decryption. This was not universally done;
there are cases where only the current master key was used. In
addition, the correct ideom for decrypting key data is too complicated
and is potentially unavailable to plugins that do not have access to
the master key. Instead, store the master key list in the dal_handle
whenever it is fetched and permit a NULL master key for
krb5_dbe_decrypt_key_data.
* Remove APIs for krb5_db_{get|set}_mkey_list
* krb5_db_fetch_mkey_list: memoize master key list in dal_handle
* krb5_db_free_mkey_list: don't free the memoized list; arrange for it to be freed later
* krb5_dbe_decrypt_key_data: Search for correct master key on NULL argument
* change call sites to take advantage
ticket: 6778
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24314
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 15 Sep 2010 17:10:05 +0000 (17:10 +0000)]
In the PKINIT OpenSSL code, ensure that appropriate cerficiate fields
have been set before using ku_reject. Patch from nalin@redhat.com.
ticket: 6775
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24313
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 15 Sep 2010 17:06:43 +0000 (17:06 +0000)]
Use correct CRL stack macros in pkinit OpenSSL code. Patch from Olaf
Flebbe.
ticket: 6776
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24312
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 15 Sep 2010 16:51:31 +0000 (16:51 +0000)]
Whitespace
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24311
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Wed, 15 Sep 2010 16:40:32 +0000 (16:40 +0000)]
Fix warnings in encrypt_key and decrypt_key. Avoid a segfault if NULL
master key is passed into default decryption function.
kdb: fix warnings
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24310
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 15 Sep 2010 15:50:15 +0000 (15:50 +0000)]
In krb5_sname_to_principal, correctly handle failures from
krb5_build_principal.
ticket: 6777
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24309
dc483132-0cff-0310-8789-
dd5450dbe970
Luke Howard [Thu, 9 Sep 2010 15:54:32 +0000 (15:54 +0000)]
Allow a zero checksum type to be passed into krb5_k_verify_checksum_iov;
this indicates that the mandatory checksum type for the key is to be used.
This interface is necessary because there is no public interface through
which the mandatory checksum type for an encryption type can be determined.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24304
dc483132-0cff-0310-8789-
dd5450dbe970
Luke Howard [Thu, 9 Sep 2010 15:39:47 +0000 (15:39 +0000)]
krb5_k_make_checksum will use the mandatory checksum type if 0 is
passed in as the checksum type; however krb5_k_make_checksum_iov
does not support this. Add the same logic for the behaviour is
consistent.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24303
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 8 Sep 2010 17:38:22 +0000 (17:38 +0000)]
Add dummy camellia subdir to openssl back end makefile
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24299
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 8 Sep 2010 03:51:31 +0000 (03:51 +0000)]
Make depend
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24298
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 8 Sep 2010 03:48:05 +0000 (03:48 +0000)]
Don't build the built-in Camellia block cipher code if Camellia-CCM
enctypes aren't enabled.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24297
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 8 Sep 2010 03:15:49 +0000 (03:15 +0000)]
X509_verify_cert can return without setting cert_ctx.current_cert. If
it does, don't dereference a null pointer when creating the pkiDebug
message.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24296
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 7 Sep 2010 17:54:15 +0000 (17:54 +0000)]
Merge the camellia-ccm branch to trunk. Since there are no IANA
assignments for Camellia-CCM enctypes or cksumtypes yet, they are
disabled in a default build. They can be made available by defining
(via CPPFLAGS) local-use enctype numbers for the enctypes and
cksumtypes.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24295
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Sat, 4 Sep 2010 21:46:53 +0000 (21:46 +0000)]
Ensure valid key in krb5int_yarrow_cipher_encrypt_block
Under low memory conditions (or when testing memory allocation failures),
the key pointer will be 0 - and not initialized. Test and return failure
before deref a NULL.
ticket: 6772
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24292
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Sat, 4 Sep 2010 21:43:04 +0000 (21:43 +0000)]
Fix memory leaks in kdb5_verify
Minor leaks. Just cleaning up code.
ticket: 6771
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24291
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Sat, 4 Sep 2010 14:50:27 +0000 (14:50 +0000)]
In k5_pwqual_load(), if the last vtable initializer fails, return 0
and not its exit value.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24290
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 3 Sep 2010 22:24:25 +0000 (22:24 +0000)]
Fix output argument ordering and handling in k5_pwqual_load()
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24289
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 3 Sep 2010 22:21:39 +0000 (22:21 +0000)]
Prevent a double free in k5_pwqual_load()
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24288
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Fri, 3 Sep 2010 02:43:21 +0000 (02:43 +0000)]
clean up memory leak and potential unused variable in crypto tests
t_prf.c: Ensure prfsz is set before use (not exercised in current tests)
t_short.c: Fix memory leak
ticket: 6769
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24287
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 2 Sep 2010 15:35:25 +0000 (15:35 +0000)]
Properly search for MANDATORY-FOR-KDC authdata elements. Reported by
Mike Roszkowski.
ticket: 6764
tags: pullup
target_version: 1.8.4
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24286
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 1 Sep 2010 21:16:05 +0000 (21:16 +0000)]
Oops, pwqual_combo wasn't supposed to make it out of the plugins2
branch. Delete it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24285
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 1 Sep 2010 16:40:22 +0000 (16:40 +0000)]
Password quality pluggable interface
Merge branches/plugins2 to trunk. Adds a password quality pluggable
interface described in this project page:
http://k5wiki.kerberos.org/wiki/Projects/Password_quality_pluggable_interface
ticket: 6765
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24284
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 31 Aug 2010 21:37:51 +0000 (21:37 +0000)]
Make the new profile tcl tests work with tcl 8.3
ticket: 6761
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24282
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 30 Aug 2010 16:20:34 +0000 (16:20 +0000)]
Make relative plugin module paths be interpreted as relative to
LIBDIR/krb5/plugins.
ticket: 6763
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24277
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Sun, 29 Aug 2010 22:35:41 +0000 (22:35 +0000)]
Fix a resource leak in the profile include support
ticket: 6761
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24274
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Sun, 29 Aug 2010 15:39:08 +0000 (15:39 +0000)]
Add simple automated tests for account lockout support
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24269
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Sun, 29 Aug 2010 15:32:04 +0000 (15:32 +0000)]
Fix an account lockout error-handling regression by converting the
result of krb5_db_check_policy_as/tgs from a krb5_error_code to a
protocol error number.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24268
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Fri, 27 Aug 2010 18:01:14 +0000 (18:01 +0000)]
Add plugin.o to T_ETYPES_OBJS because init_ctx.o needs it now
ticket: 6763
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24264
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 27 Aug 2010 04:29:11 +0000 (04:29 +0000)]
New plugin infrastructure
Merge domain-independent plugin framework code from branches/plugins2,
leaving out the password quality interface.
ticket: 6763
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24263
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 26 Aug 2010 16:59:37 +0000 (16:59 +0000)]
Add an expansion error table for libkrb5, since krb5_err.et is full
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24258
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Wed, 25 Aug 2010 23:31:59 +0000 (23:31 +0000)]
rd_req_decoded: clarify behavior in comment
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24257
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 25 Aug 2010 18:22:53 +0000 (18:22 +0000)]
Revise the profile include design so that included files are
syntactically independent of parent files.
ticket: 6761
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24256
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 24 Aug 2010 22:57:40 +0000 (22:57 +0000)]
Correct a comment
ticket: 6761
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24255
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 24 Aug 2010 22:45:37 +0000 (22:45 +0000)]
In the LDAP KDB module's populate_krb5_db_entry, fix the checks for
the KDB_PRINC_EXPIRE_TIME_ATTR and KDB_PWD_EXPIRE_TIME_ATTR flags so
that they properly succeed when the flags are set. Bug report from
Rob Crittenden, patch from nalin@redhat.com.
ticket: 6762
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24254
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 24 Aug 2010 21:52:32 +0000 (21:52 +0000)]
add profile include support
Add support for "include" and "includedir" directives in profile files.
See http://k5wiki.kerberos.org/wiki/Projects/Profile_Includes for more
details.
ticket: 6761
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24253
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 23 Aug 2010 22:03:25 +0000 (22:03 +0000)]
Fail properly when profile can't be accessed
Make profile_init() return EACCESS or EPERM if one of those errors was
encountered when failing to open any of the specified profile files.
This causes krb5_init_os_context() to fail properly when krb5.conf is
unreadable, instead of treating that situation like a nonexistent
krb5.conf.
The library will continue to soldier on if one profile file is
readable and another is not. This is deliberate as of r14116, whether
or not it's a good idea.
ticket: 6760
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24250
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 19 Aug 2010 16:38:30 +0000 (16:38 +0000)]
Allow krb5_gss_register_acceptor_identity to unset keytab name
krb5_gss_register_acceptor_identity sets a mutex-locked global (not
thread-specific) variable containing a keytab name. This change
allows the variable to be unset by passing a null value.
A more elegant long-term solution to the problem is Heimdal's
gss_krb5_import_cred function.
ticket: 6758
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24242
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 12 Aug 2010 17:41:41 +0000 (17:41 +0000)]
Add GIC option for password/account expiration callback
Add a new GIC option to specify a callback to receive password and
account expiration times found in an AS reply.
See also:
http://k5wiki.kerberos.org/wiki/Projects/Password_expiration_API
ticket: 6755
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24241
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 12 Aug 2010 17:39:09 +0000 (17:39 +0000)]
In AS replies, set the key-expiration field to the minimum of account
and password expiration time as specified in RFC 4120. Reported by
Mary Cushion <mary@eiger.demon.co.uk>.
ticket: 2032
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24240
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 12 Aug 2010 17:15:17 +0000 (17:15 +0000)]
Correct the documentation for the start_kadmind keyword in k5test.py
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24239
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 12 Aug 2010 14:28:13 +0000 (14:28 +0000)]
Remove two unused source files in lib/gssapi/generic
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24238
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 10 Aug 2010 19:02:23 +0000 (19:02 +0000)]
Move the password expiry warning code out of
krb5_get_init_creds_password() into a helper function.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24237
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 26 Jul 2010 18:19:49 +0000 (18:19 +0000)]
Use xdr_int32 instead of xdr_u_int in xdr_krb5_enctype(), since
enctypes are signed 32-bit values. Wire representation does not
change.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24211
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 26 Jul 2010 18:18:57 +0000 (18:18 +0000)]
Fix XDR decoding of large values in xdr_u_int
Our ancient RPC value internally decodes 32-bit wire values into a
signed long, which is then casted to the appropriate type.
xdr_u_int() contains a check intended to catch wire values that don't
fit into a u_int on platforms with 16-ints, but on platforms with
64-bit longs it was failing on values of 2^31 or larger because the
sign-extended value appeared larger than UINT_MAX. Fix the check by
casting the value to uint32_t before comparing.
This bug, in combination with a poor choice of types in
kadm_rpc_xdr.c's xdr_krb5_enctype(), prevented negative enctype values
from being transported properly in kadmin's change_password command
result.
ticket: 6753
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24210
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 21 Jul 2010 20:37:51 +0000 (20:37 +0000)]
Addendum to r24200: fix kdb5_ldap_util call site of
krb5_ldap_lib_init.
ticket: 6749
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24201
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 21 Jul 2010 19:01:35 +0000 (19:01 +0000)]
Revert the part of r24157 which added the dal_version argument to the
init_library interface. Instead use the already existing maj_ver
field of the DAL vtable to detect incompatibilities. Since maj_ver
is a short int, use an incrementing number instead of a date for the
major version.
ticket: 6749
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24200
dc483132-0cff-0310-8789-
dd5450dbe970