]> git.ipfire.org Git - thirdparty/krb5.git/log
thirdparty/krb5.git
14 years agoExpand the pwqual_plugin.h documentation to tell module implementors plugins2
Greg Hudson [Wed, 1 Sep 2010 16:00:56 +0000 (16:00 +0000)] 
Expand the pwqual_plugin.h documentation to tell module implementors
what a pwqual initvt function should look like.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24283 dc483132-0cff-0310-8789-dd5450dbe970

14 years agoAdjust password quality interface documentation slightly
Greg Hudson [Tue, 31 Aug 2010 17:06:14 +0000 (17:06 +0000)] 
Adjust password quality interface documentation slightly

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24281 dc483132-0cff-0310-8789-dd5450dbe970

14 years agoAdd documentation of the plugins section to krb5.conf.M and
Greg Hudson [Tue, 31 Aug 2010 17:02:44 +0000 (17:02 +0000)] 
Add documentation of the plugins section to krb5.conf.M and
krb5-admin.texinfo, along with documentation of the pwqual interface
and built-in modules.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24280 dc483132-0cff-0310-8789-dd5450dbe970

14 years agoFor the password quality interface:
Greg Hudson [Tue, 31 Aug 2010 01:40:19 +0000 (01:40 +0000)] 
For the password quality interface:
  * Add a languages argument to the check method to allow localization
    of error messages (currently no languages are ever passed, though).
  * Add an error code KADM5_PASS_Q_GENERIC.
  * In most built-in modules and the combo module, set an error message
    with krb5_set_error_message.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24279 dc483132-0cff-0310-8789-dd5450dbe970

14 years agoBring back <kadm5/admin.h> as a dependency of <krb5/pwqual_plugin.h> so
Greg Hudson [Mon, 30 Aug 2010 16:28:58 +0000 (16:28 +0000)] 
Bring back <kadm5/admin.h> as a dependency of <krb5/pwqual_plugin.h> so
that modules can return appropriate error codes.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24278 dc483132-0cff-0310-8789-dd5450dbe970

14 years agoUpdate the plugins2 branch documentation
Greg Hudson [Sun, 29 Aug 2010 16:28:07 +0000 (16:28 +0000)] 
Update the plugins2 branch documentation

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24271 dc483132-0cff-0310-8789-dd5450dbe970

14 years agoUpdate sample password quality module to match new interface. Work
Greg Hudson [Sun, 29 Aug 2010 16:19:04 +0000 (16:19 +0000)] 
Update sample password quality module to match new interface.  Work
around unresolved issue with error codes by including <kadm5/admin.h>
for now.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24270 dc483132-0cff-0310-8789-dd5450dbe970

14 years agoRevise the password quality pluggable interface to match the project
Greg Hudson [Sat, 28 Aug 2010 22:39:40 +0000 (22:39 +0000)] 
Revise the password quality pluggable interface to match the project
page:

* Modules receive the policy name but not the policy object.
* Enforcement of password policy is out of the interface's scope.
* Built-in modules are: empty, dict, hesiod, princ.
* The consumer API loader takes care of open/close, so there is only
  a wrapper function for check.

The project page is at:
http://k5wiki.kerberos.org/wiki/Projects/Password_quality_pluggable_interface

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24266 dc483132-0cff-0310-8789-dd5450dbe970

14 years agoPull in r24264 from trunk to fix a make check build issue
Greg Hudson [Sat, 28 Aug 2010 20:20:14 +0000 (20:20 +0000)] 
Pull in r24264 from trunk to fix a make check build issue

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24265 dc483132-0cff-0310-8789-dd5450dbe970

14 years agoAdd documentation to k5-int.h aimed at developers of new pluggable
Greg Hudson [Fri, 27 Aug 2010 01:39:17 +0000 (01:39 +0000)] 
Add documentation to k5-int.h aimed at developers of new pluggable
interfaces.  Add documentation to pwqual_plugin.h aimed at developers
of password quality modules.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24262 dc483132-0cff-0310-8789-dd5450dbe970

14 years agoIn the design section of the plugins2 branch documentation, mention
Greg Hudson [Fri, 27 Aug 2010 00:01:03 +0000 (00:01 +0000)] 
In the design section of the plugins2 branch documentation, mention
wrapper functions as a component of a pluggable interface consumer
API.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24261 dc483132-0cff-0310-8789-dd5450dbe970

14 years agoCreate specific error codes for plugin-related failures, now that we
Greg Hudson [Thu, 26 Aug 2010 23:52:05 +0000 (23:52 +0000)] 
Create specific error codes for plugin-related failures, now that we
have an expansion error table to hold them in.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24260 dc483132-0cff-0310-8789-dd5450dbe970

14 years agoMerge trunk changes from r24202 to r24258 to plugins2 branch
Greg Hudson [Thu, 26 Aug 2010 23:19:40 +0000 (23:19 +0000)] 
Merge trunk changes from r24202 to r24258 to plugins2 branch

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24259 dc483132-0cff-0310-8789-dd5450dbe970

14 years agok5_ as an internal prefix is now formally okay, so remove that bullet
Greg Hudson [Tue, 24 Aug 2010 16:32:26 +0000 (16:32 +0000)] 
k5_ as an internal prefix is now formally okay, so remove that bullet
point in the plugins2 branch README.BRANCH.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24251 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoOn the plugins2 branch, improve the generic plugin support so that it
Greg Hudson [Thu, 29 Jul 2010 12:40:08 +0000 (12:40 +0000)] 
On the plugins2 branch, improve the generic plugin support so that it
does not dlopen/dlsym modules which would later be filtered out.  Also
edit README.BRANCH a little.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24217 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoOn the plugins2 branch, use function typedefs in pwqual_plugin.h so
Greg Hudson [Mon, 26 Jul 2010 22:25:50 +0000 (22:25 +0000)] 
On the plugins2 branch, use function typedefs in pwqual_plugin.h so
that the vtable declaration is tidier.  (This is consistent with the
preauth plugin interface; the old way was consistent with the DAL.)

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24215 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIn the plugins2 branch, untabify new files which accidentally used
Greg Hudson [Mon, 26 Jul 2010 22:16:56 +0000 (22:16 +0000)] 
In the plugins2 branch, untabify new files which accidentally used
tabs in indentation.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24214 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIn the plugins2 branch, rename "init" to "initvt" in all reference to
Greg Hudson [Mon, 26 Jul 2010 22:14:21 +0000 (22:14 +0000)] 
In the plugins2 branch, rename "init" to "initvt" in all reference to
module vtable initializer functions.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24213 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoAdd another note to the "What's wrong with this branch" section of the
Greg Hudson [Fri, 23 Jul 2010 05:30:37 +0000 (05:30 +0000)] 
Add another note to the "What's wrong with this branch" section of the
plugins2 branch readme.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24206 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoOn the plugins2 branch, add a comment to pwqual_dict.c labeling that
Greg Hudson [Fri, 23 Jul 2010 02:33:16 +0000 (02:33 +0000)] 
On the plugins2 branch, add a comment to pwqual_dict.c labeling that
file as a password quality module.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24205 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoFix a typo in the plugins2 README.BRANCH file and flesh out the
Greg Hudson [Fri, 23 Jul 2010 01:20:07 +0000 (01:20 +0000)] 
Fix a typo in the plugins2 README.BRANCH file and flesh out the
"what's wrong with" section a bit.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24204 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoProof of concept code for a candidate plugin framework
Greg Hudson [Thu, 22 Jul 2010 03:13:38 +0000 (03:13 +0000)] 
Proof of concept code for a candidate plugin framework

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24203 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoCreate a branch for a proof of concept of a second candidate plugin
Greg Hudson [Thu, 22 Jul 2010 03:03:15 +0000 (03:03 +0000)] 
Create a branch for a proof of concept of a second candidate plugin
framework.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/plugins2@24202 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoAddendum to r24200: fix kdb5_ldap_util call site of
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

15 years agoRevert the part of r24157 which added the dal_version argument to the
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

15 years agoGet the kdb_hdb module to compile again. Probably still buggy,
Greg Hudson [Tue, 20 Jul 2010 08:52:41 +0000 (08:52 +0000)] 
Get the kdb_hdb module to compile again.  Probably still buggy,
particularly around the master key logic.

ticket: 6749

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

15 years agoIn kdb5_util's kdb5_ldap_create(), add back the assignment of
Greg Hudson [Mon, 19 Jul 2010 10:05:13 +0000 (10:05 +0000)] 
In kdb5_util's kdb5_ldap_create(), add back the assignment of
rblock.key which was erroneously removed in r24162.

ticket: 6749

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

15 years agoAllow Microsoft HMAC-MD5 checksum types to use non-RC4 keys
Greg Hudson [Mon, 19 Jul 2010 05:01:45 +0000 (05:01 +0000)] 
Allow Microsoft HMAC-MD5 checksum types to use non-RC4 keys

In PAC signatures, the hmac-md5 checksum type can be used with AES
keys.  Make this work by removing the enc field from the hmac-md5 and
md5-hmac checksum types, and adding a check in
krb5int_hmacmd5_checksum() for a null key or a key which is longer
than the hash block size (64 bytes for MD5).  The checksum algorithm
only uses the key bits; it does invoke the cipher.

The checksum type names are kind of wrong, but we'll leave them alone
for compatibility.  The descriptions are updated.

ticket: 6751
target_version: 1.8.3
tags: pullup

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

15 years agoIn the DAL documentation, describe how a module can supply referral
Greg Hudson [Mon, 19 Jul 2010 04:30:47 +0000 (04:30 +0000)] 
In the DAL documentation, describe how a module can supply referral
encrypted padata.

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

15 years agoAdd check_allowed_to_delegate to the DAL with a corresponding libkdb5
Greg Hudson [Thu, 15 Jul 2010 04:18:00 +0000 (04:18 +0000)] 
Add check_allowed_to_delegate to the DAL with a corresponding libkdb5
API, replacing the last method (CHECK_ALLOWED_TO_DELEGATE) of
db_invoke.  Remove db_invoke since it no longer has any methods.

ticket: 6749

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

15 years agoAddendum to r24182: Fix a comment referencing the db_invoke
Greg Hudson [Thu, 15 Jul 2010 03:17:08 +0000 (03:17 +0000)] 
Addendum to r24182: Fix a comment referencing the db_invoke
SIGN_DB_AUTHDATA method.

ticket: 6749
status: open

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

15 years agoAdd refresh_config to the DAL with a corresponding libkdb5 API,
Greg Hudson [Thu, 15 Jul 2010 03:12:57 +0000 (03:12 +0000)] 
Add refresh_config to the DAL with a corresponding libkdb5 API,
replacing the REFRESH_POLICY method of db_invoke.

ticket: 6749
status: open

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

15 years agoAddendum to r24185: make audit_as_req return void, since it's an
Greg Hudson [Tue, 13 Jul 2010 16:09:01 +0000 (16:09 +0000)] 
Addendum to r24185: make audit_as_req return void, since it's an
informational method and we're not going to do anything with the
result.

ticket: 6749
status: open

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

15 years agoAdd audit_as_req to the DAL with a corresponding libkdb5 API,
Greg Hudson [Tue, 13 Jul 2010 15:53:23 +0000 (15:53 +0000)] 
Add audit_as_req to the DAL with a corresponding libkdb5 API,
replacing the AUDIT_AS_REQ method of db_invoke.  Remove the
AUDIT_TGS_REQ method of db_invoke without adding a replacement, as
there was no KDC support for it.  (It can be added at a later time if
necessary.)

ticket: 6749
status: open

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

15 years agoAdd check_policy_as and check_policy_tgs to the DAL table with
Greg Hudson [Tue, 13 Jul 2010 00:53:46 +0000 (00:53 +0000)] 
Add check_policy_as and check_policy_tgs to the DAL table with
corresponding libkdb5 APIs, replacing the CHECK_POLICY_AS and
CHECK_POLICY_TGS methods of db_invoke.

ticket: 6749
status: open

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

15 years agoAdd check_transited_realms to the DAL table with a corresponding
Greg Hudson [Mon, 12 Jul 2010 18:53:54 +0000 (18:53 +0000)] 
Add check_transited_realms to the DAL table with a corresponding
libkdb5 API, replacing the CHECK_TRANSITED_REALMS method of db_invoke.

ticket: 6749
status: open

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

15 years agoAdd sign_authdata to the DAL table with a corresponding libkdb5 API,
Greg Hudson [Mon, 12 Jul 2010 18:33:05 +0000 (18:33 +0000)] 
Add sign_authdata to the DAL table with a corresponding libkdb5 API,
replacing the SIGN_AUTH_DATA method of db_invoke.

ticket: 6749
status: open

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

15 years agoAddendum to r24180: make sure osa_adb_get_policy sets its output
Greg Hudson [Fri, 9 Jul 2010 12:25:50 +0000 (12:25 +0000)] 
Addendum to r24180: make sure osa_adb_get_policy sets its output
parameter in all cases, per coding standards.

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

15 years agoImprove output variable handling of osa_adb_get_policy() in the db2
Greg Hudson [Fri, 9 Jul 2010 01:22:38 +0000 (01:22 +0000)] 
Improve output variable handling of osa_adb_get_policy() in the db2
KDB module, and close some unlikely memory leaks.

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

15 years agoFix a memory leak in libkadm5clnt's get_init_creds()
Greg Hudson [Thu, 8 Jul 2010 23:51:24 +0000 (23:51 +0000)] 
Fix a memory leak in libkadm5clnt's get_init_creds()

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

15 years agoCreate a KRB5_KDB_FLAG_ALIAS_OK to control whether plugin modules
Greg Hudson [Thu, 8 Jul 2010 23:34:35 +0000 (23:34 +0000)] 
Create a KRB5_KDB_FLAG_ALIAS_OK to control whether plugin modules
should return in-realm aliases.  Set it where appropriate, and use it
in the LDAP module instead of intuiting the result based on other
flags.

ticket: 6749
status: open

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

15 years agoAdd a missing break in the parsing of krb5kdc's -P option. Reported
Greg Hudson [Wed, 7 Jul 2010 20:52:06 +0000 (20:52 +0000)] 
Add a missing break in the parsing of krb5kdc's -P option.  Reported
by nalin@redhat.com.

ticket: 6750
target_version: 1.8.3
tags: pullup

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

15 years agoRemove count parameters from get_principal, put_principal,
Greg Hudson [Tue, 6 Jul 2010 21:53:23 +0000 (21:53 +0000)] 
Remove count parameters from get_principal, put_principal,
free_principal, delete_principal, and get_policy.  Make get_principal
allocate the DB entry container.  Fold krb5_db_get_principal_ext into
krb5_db_get_principal.

ticket: 6749
status: open

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

15 years agoFollow-on to r24168: in kdb5_ldap_util, indirect through
Greg Hudson [Sun, 4 Jul 2010 18:34:04 +0000 (18:34 +0000)] 
Follow-on to r24168: in kdb5_ldap_util, indirect through
krb5_db_store_master_key instead of using the (now removed) default
implementation directly.

ticket: 6749
status: open

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

15 years agoIn kdb5.c, simplify the code for getting the profile config section
Greg Hudson [Sat, 3 Jul 2010 19:56:17 +0000 (19:56 +0000)] 
In kdb5.c, simplify the code for getting the profile config section

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

15 years agoRemove assertions for non-nullity of init_module and fini_module in
Greg Hudson [Sat, 3 Jul 2010 19:25:00 +0000 (19:25 +0000)] 
Remove assertions for non-nullity of init_module and fini_module in
kdb5.c for consistency with other uses of mandatory vtable functions.

ticket: 6749
status: open

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

15 years agoMake the APIs for iterate, get_master_key_list, set_master_key_list,
Greg Hudson [Sat, 3 Jul 2010 19:22:08 +0000 (19:22 +0000)] 
Make the APIs for iterate, get_master_key_list, set_master_key_list,
and promote_db return KRB5_PLUGIN_OP_NOTSUPP if the KDB module does
not implement them, avoiding the need for stub default
implementations.

ticket: 6749

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

15 years agoUse KRB5_PLUGIN_OP_NOTSUPP uniformly as the error code for operations
Greg Hudson [Sat, 3 Jul 2010 19:02:41 +0000 (19:02 +0000)] 
Use KRB5_PLUGIN_OP_NOTSUPP uniformly as the error code for operations
not supported by a KDB module.  (Previously KRB5_KDB_DBTYPE_NOSUP was
used in some cases and KRB5_PLUGIN_OP_NOTSUPP in others.)

ticket: 6749
status: open

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

15 years agoRemove return value from void function
Ken Raeburn [Sat, 3 Jul 2010 15:23:45 +0000 (15:23 +0000)] 
Remove return value from void function

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

15 years agoRemove store_master_key from the DAL table, and implement
Greg Hudson [Fri, 2 Jul 2010 20:16:21 +0000 (20:16 +0000)] 
Remove store_master_key from the DAL table, and implement
krb5_store_master_key in terms of krb5_store_master_key_list.

ticket: 6749
status: open

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

15 years agoMake krb5_db_free_principal and krb5_db_free_mkey_list return void.
Greg Hudson [Fri, 2 Jul 2010 19:18:12 +0000 (19:18 +0000)] 
Make krb5_db_free_principal and krb5_db_free_mkey_list return void.
Remove the stale prototype for krb5_db_free_master_key.

ticket: 6749
status: open

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

15 years agoRemove verify_master_key from the DAL table, as well as its associated
Greg Hudson [Fri, 2 Jul 2010 19:09:20 +0000 (19:09 +0000)] 
Remove verify_master_key from the DAL table, as well as its associated
libkdb5 interface.  Callers can (and mostly already do) use
krb5_fetch_mkey_list to verify master keyblocks.  Adjust tests/create,
tests/verify, and kdb5_util dump to do so.

ticket: 6749
status: open

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

15 years agoRemove db_ and similar prefixes from DAL function names, for
Greg Hudson [Fri, 2 Jul 2010 17:58:41 +0000 (17:58 +0000)] 
Remove db_ and similar prefixes from DAL function names, for
consistency.  Follow suit inside the DB2 and LDAP modules.  (No change
to the caller-facing libkdb5 APIs.)

ticket: 6749
status: open

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

15 years agoRename krb5_dbekd_encrypt_key_data and krb5_dbekd_decrypt_key_data to
Greg Hudson [Fri, 2 Jul 2010 17:33:44 +0000 (17:33 +0000)] 
Rename krb5_dbekd_encrypt_key_data and krb5_dbekd_decrypt_key_data to
just use the krb5_dbe prefix.

ticket: 6749
status: open

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

15 years agoRemove setup_master_key_name from the DAL table as it was not used
Greg Hudson [Fri, 2 Jul 2010 17:18:46 +0000 (17:18 +0000)] 
Remove setup_master_key_name from the DAL table as it was not used

ticket: 6749
status: open

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

15 years agoRemove the set_master_key and get_master_key DAL interfaces and their
Greg Hudson [Fri, 2 Jul 2010 17:13:40 +0000 (17:13 +0000)] 
Remove the set_master_key and get_master_key DAL interfaces and their
corresponding libkdb5 APIs, as they were not productively used.  In
kdb5_ldap_util, stop using the realm data's mkey field as a container
to communicate the master key to static helper functions, since the
field no longer exists.

ticket: 6749
status: open

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

15 years agoFollow-up to r24157: return correctly from krb5_ldap_lib_init() if
Greg Hudson [Fri, 2 Jul 2010 16:59:33 +0000 (16:59 +0000)] 
Follow-up to r24157: return correctly from krb5_ldap_lib_init() if
there is no version mismatch.

ticket: 6749

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

15 years agoFollow-on to r24157: pass KRB5_KDB_DAL_VERSION to krb5_ldap_lib_init()
Greg Hudson [Fri, 2 Jul 2010 14:41:26 +0000 (14:41 +0000)] 
Follow-on to r24157: pass KRB5_KDB_DAL_VERSION to krb5_ldap_lib_init()
in kdb5_ldap_util.c.

ticket: 6749

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

15 years agoRemove errcode_2_string and release_errcode_string from the DAL table,
Greg Hudson [Fri, 2 Jul 2010 14:19:39 +0000 (14:19 +0000)] 
Remove errcode_2_string and release_errcode_string from the DAL table,
and stop using them in kdb5.c.  Modules can simply set error messages
in the krb5 context on error.

ticket: 6749
status: open

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

15 years agoRemove db_supported_realms and db_free_supported_realms from the DAL
Greg Hudson [Fri, 2 Jul 2010 14:08:20 +0000 (14:08 +0000)] 
Remove db_supported_realms and db_free_supported_realms from the DAL
table, and remove the corresponding libkdb5 interfaces (which don't
seem to have been in the library export table).

ticket: 6749
status: open

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

15 years agoDAL improvements
Greg Hudson [Fri, 2 Jul 2010 03:23:21 +0000 (03:23 +0000)] 
DAL improvements

Add KRB5_KDB_API_VERSION to allow callers to adjust to incompatible
changes in libkdb; to be kept in sync with the libkdb major version,
which is bumped to 5 in anticipation of other changes.

Add KRB5_KDB_DAL_VERSION to allow database modules to detect when they
are mismatched with the KDB version.  Since KDB modules are often
developed concurrently with trunk code, this is defined to be the date
of the last incompatible DAL change.  The DAL version is passed to the
init_library DAL function; the module should check it against the value
of KRB5_KDB_DAL_VERSION it was compiled with and return
KRB5_KDB_DBTYPE_MISMATCH if it doesn't match.

ticket: 6749
status: open

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

15 years agoIn kpropd, when getting a wildcard address to listen on, try IPv6
Greg Hudson [Thu, 1 Jul 2010 16:56:22 +0000 (16:56 +0000)] 
In kpropd, when getting a wildcard address to listen on, try IPv6
explicitly (with AI_ADDRCONFIG specified where available, to avoid
IPv6 on hosts with no IPv6 interface) and then fall back to IPv4.
Only set IPV6_V6ONLY on the listener socket if the resulting address
is IPv6.

Note: we have mostly confirmed that OpenBSD does not have dual-stack
support, meaning that it would be better to open separate IPv4 and
IPv6 listener sockets, as we do in krb5kdc and kadmind.
Unfortunately, the complicated iprop retry-and-backoff logic makes
this less than straightforward.

ticket: 6686

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

15 years agoFactor out a common socket creation sequence in net-server.c, which
Greg Hudson [Wed, 30 Jun 2010 16:45:47 +0000 (16:45 +0000)] 
Factor out a common socket creation sequence in net-server.c, which
happens to coincide with what setup_a_rpc_listener does.

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

15 years agoEliminate warnings in net-server.c
Greg Hudson [Wed, 30 Jun 2010 16:11:33 +0000 (16:11 +0000)] 
Eliminate warnings in net-server.c

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

15 years agoImprove coding style conformance in net-server.c
Greg Hudson [Wed, 30 Jun 2010 16:03:22 +0000 (16:03 +0000)] 
Improve coding style conformance in net-server.c

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

15 years agoFix a bug in r24147 where svctcp_create() was passing the wrong length
Greg Hudson [Sat, 26 Jun 2010 17:37:20 +0000 (17:37 +0000)] 
Fix a bug in r24147 where svctcp_create() was passing the wrong length
argument to bind(), causing it to fail on Solaris.

ticket: 6746

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

15 years agoMake kadmin work over IPv6
Greg Hudson [Sat, 26 Jun 2010 03:32:55 +0000 (03:32 +0000)] 
Make kadmin work over IPv6

Make gssrpc work over IPv6 TCP sockets provided that the client
creates and connects/binds the sockets and doesn't query their
addresses or use bindresvport().  Make kadmin work within those
constraints and handle IPv6.  Specific changes:

* Make svctcp_create() able to extract the port from an IPv6 socket,
  using a new helper function getport().
* Make clnttcp_create() handle a null raddr value if *sockp is set.
* Make kadm5_get_service_name() use getaddrinfo() to canonicalize the
  admin server name.
* Make libkadm5clnt's init_any() responsible for connecting its socket
  using a new helper function connect_to_server(), which uses
  getaddrinfo instead of gethostbyname.  Pass a null address to
  clnttcp_create().
* Make libapputil's net-server.c set up IPv6 as well as IPv4 listener
  ports for RPC connections.
* Adjust the error code expected in a libkadm5 unit test.

ticket: 6746

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

15 years agoAdjust function names and declarations in libkadm5's client_init.c; in
Greg Hudson [Fri, 25 Jun 2010 22:26:04 +0000 (22:26 +0000)] 
Adjust function names and declarations in libkadm5's client_init.c; in
particular, avoid the use of library namespace prefixes for static
helper functions.

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

15 years agoSimplify the iprop conditionalization of _kadm5_init_any()
Greg Hudson [Fri, 25 Jun 2010 22:14:53 +0000 (22:14 +0000)] 
Simplify the iprop conditionalization of _kadm5_init_any()

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

15 years agoRemove some dead code in kdb5_stash() left behind by r24142
Greg Hudson [Tue, 22 Jun 2010 13:09:58 +0000 (13:09 +0000)] 
Remove some dead code in kdb5_stash() left behind by r24142

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

15 years agoIn kprop's sockaddr2krbaddr(), fill in addr.magic to avoid copying
Greg Hudson [Tue, 22 Jun 2010 12:52:03 +0000 (12:52 +0000)] 
In kprop's sockaddr2krbaddr(), fill in addr.magic to avoid copying
around uninitialized values.

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

15 years agoEliminate a bunch of duplicated code in kdb5_stash() by using
Greg Hudson [Mon, 21 Jun 2010 20:29:12 +0000 (20:29 +0000)] 
Eliminate a bunch of duplicated code in kdb5_stash() by using
util_context.

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

15 years agokdb5_stash() contains its own kdb5_db_open() call (because it doesn't
Greg Hudson [Mon, 21 Jun 2010 19:56:29 +0000 (19:56 +0000)] 
kdb5_stash() contains its own kdb5_db_open() call (because it doesn't
use util_context for some reason), which didn't work with the LDAP
back end because LDAP doesn't recognize KRB5_KDB_SRV_TYPE_OTHER.  As a
minimal fix, change that to KRB5_KDB_SRV_TYPE_ADMIN to be consistent
with open_db_and_mkey()--see also r18736.

ticket: 6345
target_version: 1.8.3
tags: pullup

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

15 years agoMake OFFLINE!=no work again
Tom Yu [Mon, 21 Jun 2010 15:25:38 +0000 (15:25 +0000)] 
Make OFFLINE!=no work again

ticket: 6744

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

15 years agoAdd correct error table when initializing gss-krb5
Greg Hudson [Mon, 21 Jun 2010 15:18:37 +0000 (15:18 +0000)] 
Add correct error table when initializing gss-krb5

gss_krb5int_lib_init was adding the generic GSS error table (again)
instead of the krb5 error table, which could lead to crashes on
library unload.  This bug was introduced in krb5 1.7; the fix is also
applicable there.

Patch from Leonardo Chiquitto <leonardo.lists@gmail.com>.

ticket: 6745
target_version: 1.8.3
tags: pullup

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

15 years agoonly test t_locate_kdc if known-good DNS name is present
Tom Yu [Fri, 18 Jun 2010 19:41:48 +0000 (19:41 +0000)] 
only test t_locate_kdc if known-good DNS name is present

Running "make check" while offline or on a firewalled network may
result in failure in lib/krb5/os because the invocation of
t_locate_kdc requires that the DNS servers for ATHENA.MIT.EDU be
reachable.  Autodetect DNS utilities "dig" and "nslookup", and use
them to check for existence of the known-good DNS name.  Also
parameterize the test so that the known-good DNS name can be
overridden on the make command line.

ticket: 6744
target_version: 1.8.3
tags: pullup

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

15 years agoIn PKINIT, notice if DH_compute_key() returns a value less than the
Greg Hudson [Mon, 14 Jun 2010 20:46:27 +0000 (20:46 +0000)] 
In PKINIT, notice if DH_compute_key() returns a value less than the
buffer size, and pad it on the left if so.

ticket: 6738
target_version: 1.8.3
tags: pullup

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

15 years agoAdjust the PKINIT DH debugging code:
Greg Hudson [Mon, 14 Jun 2010 20:00:03 +0000 (20:00 +0000)] 
Adjust the PKINIT DH debugging code:
  * Use %p and void * for pointers instead of %x and int
  * Don't call the computed symmetric key the "secret key" since
    that's easily confused with the private key g^x.
  * Print the private key when printing DH parameters, instead of the
    q value (not even sure what they is).

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

15 years agoUse getaddrinfo() in kprop and kpropd, and recognize IPv6 addresses
Greg Hudson [Fri, 11 Jun 2010 21:03:03 +0000 (21:03 +0000)] 
Use getaddrinfo() in kprop and kpropd, and recognize IPv6 addresses
when setting up krb5_address structures.  kpropd still only binds to
one socket to avoid the need for a select() loop, so we turn off
IPV6_V6ONLY on that socket to ensure that IPv4 connections will still
be accepted.

Based on a patch from Michael Stapelberg <michael@stapelberg.de>.

ticket: 6686

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

15 years agoRemove the code for krb5_append_addresses(), which was never used and
Greg Hudson [Fri, 11 Jun 2010 20:01:26 +0000 (20:01 +0000)] 
Remove the code for krb5_append_addresses(), which was never used and
was ifdef'd out fifteen years ago in r5464.

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

15 years agoEliminate actx_copy_addr in auth_con.c; use krb5_copy_addr instead
Greg Hudson [Fri, 11 Jun 2010 19:58:55 +0000 (19:58 +0000)] 
Eliminate actx_copy_addr in auth_con.c; use krb5_copy_addr instead
(it's exactly the same).

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

15 years agoIn yarrow.c, undefine k5-trace.h's TRACE before defining it to avoid a
Greg Hudson [Thu, 10 Jun 2010 14:57:33 +0000 (14:57 +0000)] 
In yarrow.c, undefine k5-trace.h's TRACE before defining it to avoid a
conflict.

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

15 years agoRemove some unused (as of yet) trace macro definitions
Greg Hudson [Thu, 10 Jun 2010 14:54:28 +0000 (14:54 +0000)] 
Remove some unused (as of yet) trace macro definitions

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

15 years agoFix a couple of minor defects in trace.c
Greg Hudson [Thu, 10 Jun 2010 14:50:09 +0000 (14:50 +0000)] 
Fix a couple of minor defects in trace.c

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

15 years agokadmin ktadd may display wrong name of default keytab
Greg Hudson [Tue, 8 Jun 2010 18:18:03 +0000 (18:18 +0000)] 
kadmin ktadd may display wrong name of default keytab

kadmin's ktadd (and ktrem) displays WRFILE:/etc/krb5.keytab whenever
it uses the default keytab, even if the default has been overridden
(e.g. by KRB5_KTNAME).  Use krb5_kt_get_name to get the correct name
of the default cache instead of displaying the string we think was
used to open it.

ticket: 6740
target_version: 1.8.2
tags: pullup

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

15 years agoWhen we display enctypes, display the input name rather than the
Greg Hudson [Tue, 8 Jun 2010 17:53:19 +0000 (17:53 +0000)] 
When we display enctypes, display the input name rather than the
description.  Affects klist -e, kdb5_util list_mkeys, kdb5_util stash
(error message), kadmin getprinc, kadmin ktadd, and ktutil list -e.

ticket: 5014

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

15 years agoStop checking the current time against the context expiration time in
Greg Hudson [Tue, 8 Jun 2010 16:26:23 +0000 (16:26 +0000)] 
Stop checking the current time against the context expiration time in
the message wrap/unwrap functions in the krb5 GSS mech.  Heimdal
doesn't do it, and it generally results in poor app behavior when a
ticket expires.  In exchange, it doesn't provide much security benefit
since it's not enforced across the board--for example, ssh sessions
can persist beyond ticket expiration time since they don't use GSS to
wrap payload data.

(This is a continuation of r24120, which should have contained the
changes to all four files.)

ticket: 6739

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

15 years agoStop checking the current time against the context expiration time in
Greg Hudson [Tue, 8 Jun 2010 16:14:24 +0000 (16:14 +0000)] 
Stop checking the current time against the context expiration time in
the message wrap/unwrap functions in the krb5 GSS mech.  Heimdal
doesn't do it, and it generally results in poor app behavior when a
ticket expires.  In exchange, it doesn't provide much security benefit
since it's not enforced across the board--for example, ssh sessions
can persist beyond ticket expiration time since they don't use GSS to
wrap payload data.

ticket: 6739
target_version: 1.8.2
tags: pullup

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

15 years agomake depend
Greg Hudson [Mon, 7 Jun 2010 18:28:05 +0000 (18:28 +0000)] 
make depend

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

15 years agoTrace logging
Greg Hudson [Mon, 7 Jun 2010 18:26:17 +0000 (18:26 +0000)] 
Trace logging

Add trace logging infrastructure code, enabled by the KRB5_TRACE
environment variable or the API functions krb5_set_trace_callback()
or krb5_set_trace_filename().  As a start, add tracing events for:
  * AS-REQ client code, including FAST and preauth
  * TGS-REQ client code
  * AP-REQ and AP-REP code (client and server)
  * sendto_kdc
  * Selected ccache operations
  * Selected keytab operations

ticket: 6737

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

15 years agoAdd krb5_enctype_to_name() API
Greg Hudson [Fri, 4 Jun 2010 18:33:26 +0000 (18:33 +0000)] 
Add krb5_enctype_to_name() API

Add an API to return the input name, or optionally the shortest alias,
of an enctype.  Similar to krb5_enctype_to_string() which returns a
description.

ticket: 6736

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

15 years agoIn krb5_cc_set_config, don't call krb5_cc_remove_cred; it's redundant
Greg Hudson [Fri, 28 May 2010 18:26:43 +0000 (18:26 +0000)] 
In krb5_cc_set_config, don't call krb5_cc_remove_cred; it's redundant
with the krb5_cc_remove_cred call in krb5_cc_store_cred.

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

15 years agomake depend
Greg Hudson [Fri, 28 May 2010 15:56:05 +0000 (15:56 +0000)] 
make depend

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

15 years agoFrom Luke: make copies of S4U2Proxy authdata modules work when there
Greg Hudson [Fri, 28 May 2010 14:38:37 +0000 (14:38 +0000)] 
From Luke: make copies of S4U2Proxy authdata modules work when there
is no S4U2Proxy authdata.

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

15 years agoRemove the get_masters logic in locate_srv_conf_1 which was orphaned
Greg Hudson [Thu, 27 May 2010 22:25:51 +0000 (22:25 +0000)] 
Remove the get_masters logic in locate_srv_conf_1 which was orphaned
by r15736 when we added the master_kdc profile variable.

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

15 years agoGet t_ser to build again after the S4U authdata branch merge
Greg Hudson [Thu, 27 May 2010 22:17:23 +0000 (22:17 +0000)] 
Get t_ser to build again after the S4U authdata branch merge

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

15 years agoIn testrealm.py, stash the passwords in testdir/passwords so that they
Greg Hudson [Tue, 25 May 2010 15:36:40 +0000 (15:36 +0000)] 
In testrealm.py, stash the passwords in testdir/passwords so that they
can be retrieved after they've scrolled away.

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

15 years agoFAST negotiation could erroneously succeed
Greg Hudson [Tue, 25 May 2010 02:44:45 +0000 (02:44 +0000)] 
FAST negotiation could erroneously succeed

When FAST negotiation is performed against an older KDC
(rep->enc_part2->flags & TKT_FLG_ENC_PA_REP not set),
krb5int_fast_verify_nego did not set the value of *fast_avail, causing
stack garbage to be used in init_creds_step_reply.  Initialize
*fast_avail at the beginning of the function per coding practices.

ticket: 6734
target_version: 1.8.2
tags: pullup

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

15 years agoFix long lines and other formatting issues in fast.h
Greg Hudson [Mon, 24 May 2010 19:22:02 +0000 (19:22 +0000)] 
Fix long lines and other formatting issues in fast.h

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

15 years agoFix long lines and other formatting issues in fast.c
Greg Hudson [Mon, 24 May 2010 19:17:36 +0000 (19:17 +0000)] 
Fix long lines and other formatting issues in fast.c

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