Greg Hudson [Mon, 4 Feb 2013 23:21:45 +0000 (18:21 -0500)]
Add more tests for dump and load
Move the existing dump/load tests from t_general.py to a new script
t_dump.py. Add additional tests using pre-created dumpfiles, to
exercise the -r18, -r13, -b7, and -ov formats.
Greg Hudson [Mon, 4 Feb 2013 19:01:40 +0000 (14:01 -0500)]
Simplify kdb5_util create using a null password
kadm5_create_principal now uses a random key if passed a null
password, so we don't need a multi-step process to create admin
principals when creating a database any more.
Greg Hudson [Fri, 1 Feb 2013 16:52:48 +0000 (11:52 -0500)]
Fix kdb5_util dump.c uninitialized warnings
Some versions of clang report an uninitialized variable warning (which
we treat as an error) in process_k5beta_record. Due to the if-ladder
style of the function, uninitialized tmpint values can be copied
around in certain error cases, although the garbage values would be
ultimately ignored. As a minimal fix, initialize the tmpint
variables.
Greg Hudson [Fri, 1 Feb 2013 07:14:45 +0000 (02:14 -0500)]
Simplify LDAP password decoding
Make dec_password a static function in ldap_service_stash.c and remove
some impedance mismatch with krb5_ldap_readpassword() by making it
operate on C strings and return a krb5_error_code.
Tom Yu [Fri, 18 Jan 2013 04:29:59 +0000 (23:29 -0500)]
Reduce copied code in layout.html
layout.html unneccesarily copied code from the parent
agogo/layout.html content block just to alter the sidebar. Override
various subblocks of the sidebar instead.
Tom Yu [Fri, 18 Jan 2013 03:58:46 +0000 (22:58 -0500)]
Consolidate style settings in kerb.css
Move style settings that were previously in layout.html to kerb.css.
Rename kerb.css kerb.css_t, making it a template, to allow
parameterized style settings to remain parameterized.
Greg Hudson [Thu, 31 Jan 2013 18:40:36 +0000 (13:40 -0500)]
Remove partial LDAP client cert support
The LDAP KDB module has some code to interpret {FILE} values in stash
files, and set the service_cert_path/pass fields in the ldap context.
But there was no code to actually use those values to do client cert
authentication, so it wasn't useful. Remove the partial
implementation.
Viktor Dukhovni [Thu, 31 Jan 2013 03:58:50 +0000 (22:58 -0500)]
Fix COPY_FIRST_CANONNAME hostent search
In fake-addrinfo.c, the COPY_FIRST_CANONNAME logic erroneously assumes
that h_name is the same as h_aliases[0]. Look at h_name before
h_aliases for an FQDN, since h_name is normally the
forward-canonicalized name and h_aliases are not.
Greg Hudson [Thu, 31 Jan 2013 07:15:59 +0000 (02:15 -0500)]
Revert previous change to process_tgs_req
Commit c072b059ecff257e7600be0e86869decd135d422 did not have the
intended effect because, at the point where is_referral is set,
request->server has already been modified to contain server->princ.
Greg Hudson [Thu, 31 Jan 2013 06:26:22 +0000 (01:26 -0500)]
Fix is_referral flag in KDC TGS code
A server response which is a cross-realm TGT is not a referral if it
was directly requested by the client. Misclassifying such a response
as a referral means we don't mirror the request's name type, which has
been observed to break older Java clients.
Greg Hudson [Tue, 29 Jan 2013 18:13:04 +0000 (13:13 -0500)]
Fix prepend_err_str in LDAP KDB module
Use the oerr parameter to fetch the existing message. Stop handling
oerr == 0, since no call sites were using it. Free the old error
message before returning.
Greg Hudson [Tue, 29 Jan 2013 01:15:01 +0000 (20:15 -0500)]
Refactor LDAP DB option parsing code
krb5_ldap_open and krb5_ldap_create contain two large, almost
identical blocks of DB option processing code. Factor it out into a
new function krb5_ldap_parse_db_params in ldap_misc.c, and simplify
the factored-out code. Create a helper function to add server entries
and use it to simplify krb5_ldap_read_server_params as well as DB
option parsing. Since the new DB option helper uses isspace instead
of isblank, we no longer require portability goop for isblank.
Greg Hudson [Fri, 25 Jan 2013 23:59:09 +0000 (18:59 -0500)]
Make kproplog handle underfull iprop logs
kproplog currently assumes that an iprop log is full once it has
circled--which is true right now but will need to change for
hierarchical slaves. Avoid this assumption by using the correct
index modulus in print_update whether or not the log is full.
Based on a patch from Richard Basch <basch@alum.mit.edu>.
Greg Hudson [Thu, 24 Jan 2013 18:13:36 +0000 (13:13 -0500)]
Adjust kdb5.c check for ulog being mapped
Check the ulog pointer, which is a little more direct, rather than the
ulogfd field. (ulogfd is currently initialized to 0 prior to
ulog_map; we could fix that instead, but this feels simpler.)
Nicolas Williams [Thu, 25 Oct 2012 23:26:10 +0000 (18:26 -0500)]
Remove ulog_check(); the ulog is not a DB journal
The db2 DB is not power-fail safe. There's no point trying to
replay an incompletely committed entry from the ulog at kadmind
startup time. For that matter, even if the db2 DB was power-fail
safe there'd be no point replaying an uncommitted entry from the
ulog as the libkadm5srv app (nor any client of it, as in the case of
kadmind) will not have received any notice of success -- it'd be
wrong to complete that operation later when the user thought it'd
failed.
[ghudson@mit.edu: merge with master, adjust comment]
Greg Hudson [Wed, 23 Jan 2013 03:29:30 +0000 (22:29 -0500)]
Propagate policy changes over iprop via full dump
Since iprop cannot carry policy changes, force a full resync to happen
each time a policy change occurs. Based on a patch from
Richard Basch <basch@alum.mit.edu>.
Greg Hudson [Wed, 23 Jan 2013 03:12:51 +0000 (22:12 -0500)]
Verify iprop test results more thoroughly
In k5test.py, allow run_kadminl to take an environment argument. In
t_iprop.py, perform some queries on the slaves after each propagation
to spot-check that it got modifications from master. Use a helper
function to check serial numbers for conciseness.
Greg Hudson [Tue, 22 Jan 2013 22:42:37 +0000 (17:42 -0500)]
Fix iprop log reinitialization
If the master iprop log is reinitialized to serial number 0, slaves
will need to take a full dump--but after that happens, we need to know
whether the slave has taken that full dump, we we don't offering full
dumps indefinitely.
So, record a timestamp in kdb_last_time when we reinitialize the log
header, and compare the slave timestamp to kdb_last_time whenever it
has the current serial number, even if it's 0. Test this by
performing a propagation with sno 0 in t_iprop.py and detecting
whether kpropd gets a second UPDATE_FULL_RESYNC_NEEDED response from
kadmind.
Greg Hudson [Fri, 18 Jan 2013 07:01:55 +0000 (02:01 -0500)]
Clean up iprop flow control in kdb5.c
Add a helper predicate to determine whether to log operations. In the
predicate, check if the ulog is actually mapped. Use a single cleanup
label in krb5_db_put_principal. Use a cleanup label in
krb5_db_delete_principal instead of releasing resources individually
at each exit point. Avoid locking and unlocking the ulog if we're not
logging (although it would be a no-op).
Based on a patch from Nico Williams <nico@cryptonector.com>.
Greg Hudson [Wed, 16 Jan 2013 16:38:55 +0000 (11:38 -0500)]
Get rid of krb5_read_realm_params
Read realm parameters directly from the profile in the KDC's
init_realm(), getting rid of the intermediate krb5_realm_params
structure. Then get rid of krb5_realm_params and
krb5_read_realm_params, since nothing else uses it.
Greg Hudson [Sun, 13 Jan 2013 15:54:37 +0000 (10:54 -0500)]
Remove KDC macros for realm config fields
Stop using macros to refer to kdc_realm_t fields, as they could
conflict with structure field names for the same. Leave behind the
kdc_context and tgs_server macros for now.
Greg Hudson [Tue, 15 Jan 2013 13:43:10 +0000 (08:43 -0500)]
Remove unused krb5_realm_params fields
krb5_realm_params is only consumed by the KDC (everything else uses
kadm5_config_params), so only needs to contain fields used by the KDC.
Get rid of everything else. Also get rid of realm_profile, which is
read in by KDC code but never used (and was never set anyway).
Zhanna Tsitkov [Mon, 14 Jan 2013 18:54:25 +0000 (13:54 -0500)]
Help Sphinx to diff C-types for better x-reference
In some cases Doxygen xml output does not provide accurate classification
of the various C-types, thus preventing the full documentation x-referencing.
Give some hints to the Doxy/RST bridge.
Greg Hudson [Sat, 12 Jan 2013 05:21:07 +0000 (00:21 -0500)]
Clean up style of alt_prof.c
Get rid of K&R-style function headers, format code and comments
consistently according to current conventions, rename some variables
using idiomatic names, and de-indent some nested control blocks.
Greg Hudson [Fri, 11 Jan 2013 23:32:55 +0000 (18:32 -0500)]
Use [out] more sparingly in doxygen markup
In krb5.hin doxygen markup, only use [out] or [in,out] when a function
changes the entire value of what the parameter points to, not when the
function mutates a larger object (especially an abstract object).
Also remove a couple of incorrect [in] annotations, change a few
parameter descriptions to be more consistent, and fix one typo.
Zhanna Tsitkov [Fri, 11 Jan 2013 20:40:28 +0000 (15:40 -0500)]
Better doxygen markup for RESPONDER_QUESTION_OTP
Doxygen and, consequently, Sphinx gets confused with the
KRB5_RESPONDER_QUESTION_OTP comment layout.
Also, mark the output parameter of krb5_responder_set_answer().
Greg Hudson [Fri, 11 Jan 2013 18:26:37 +0000 (13:26 -0500)]
Simplify KDC host referral code
Remove some unnecessary optimizations to reduce code complexity. Get
rid of krb5_match_config_pattern in favor of a simpler helper function
in do_tgs_req_c. Get rid of KRB5_CONF_ASTERISK and just use "*"
instead. Use a helper function to combine [kdcdefaults] and realm
subsection values of variables, and don't bother adding leading and
trailing spaces. Consistently use the names "hostbased" and
"no_referral" to refer to variable values (with a "realm_" prefix for
structures which currently use it).
Greg Hudson [Fri, 11 Jan 2013 18:15:43 +0000 (13:15 -0500)]
Test multi-value host referral variables
host_based_services and no_host_referral are allowed to have multiple
relations in each place they appear, so alter a couple of the test
cases to exercise that.
Greg Hudson [Fri, 11 Jan 2013 17:25:56 +0000 (12:25 -0500)]
Test KDC host-based referral support
Test the KDC host-based referral support in t_referral.py, using a new
harness to call krb5_get_credentials with a specified server name
type. Also use this new harness for the #7483 regression test, to
avoid relying on an undocumented kvno extension.
Greg Hudson [Fri, 11 Jan 2013 17:17:12 +0000 (12:17 -0500)]
Add k5test support for KDC special environments
Accept environment parameters in the K5Realm start_kdc and
start_kadmind methods, so that krb5kdc or kadmind can be started or
restarted with a modified configuration.
Greg Hudson [Fri, 11 Jan 2013 17:06:37 +0000 (12:06 -0500)]
Clean up k5_locate_server error handling
profile_get_values() cannot return success with an empty list of
values, so don't bother counting them. Return 0 from
locate_srv_conf_1 if no profile values exist and from
dns_locate_server if we decide not to make a SRV query. Adjust
k5_locate_server to match the new helper behavior, and return
KRB5_REALM_UNKNOWN if neither profile nor DNS come up with any answers
(not KRB5_REALM_CANT_RESOLVE, which doesn't make sense now that we're
deferring KDC hostname resolution).
Greg Hudson [Fri, 11 Jan 2013 15:13:25 +0000 (10:13 -0500)]
Fix no_host_referral concatention in KDC
If no_host_referral is set in both [kdcdefaults] and the realm
subsection, we're supposed to concatenate their values. But the logic
in handle_referral_params would overwrite the value with the
non-concatenated realm value. Similar bugs of this nature were fixed
in 639c9d0f5a7c68dc98a2a452abc05ca32443cddf (r22037) but this one was
missed.
Greg Hudson [Thu, 10 Jan 2013 17:43:57 +0000 (12:43 -0500)]
Get rid of adm.h
adm.h predates the ovsec kadm5 integration. It contains a bunch of
obsolete defines and a redundant definition of krb5_realm_params. Get
rid of it, and include <kadm5/admin.h> where we currently include it.
Greg Hudson [Wed, 9 Jan 2013 07:07:05 +0000 (02:07 -0500)]
Fold kadm5 internal policy functions into callers
kadm5_create_policy and kadm5_modify_policy had _internal variants in
libkadm5srv (but not libkadm5clnt) which only existed to protect the
policy_refcnt field from modification over the wire. Now that
policy_refcnt is no longer used, we don't need the separation.
Bump the library soname since this is technically an ABI change.
Greg Hudson [Wed, 9 Jan 2013 00:57:41 +0000 (19:57 -0500)]
Test more policy features
Add tests to t_policy.py for password quality enforcement, password
history (apart from the existing #7099 regression test), and for
references to nonexistent policies.
Greg Hudson [Tue, 8 Jan 2013 20:20:45 +0000 (15:20 -0500)]
Allow principals to refer to nonexistent policies
Stop using and maintaining the policy_refcnt field, and do not try to
prevent deletion of a policy which is still referenced by principals.
Instead, allow principals to refer to policy names which do not exist
as policy objects; treat those principals as having no associated
policy.
In the kadmin client, warn if addprinc or modprinc tries to reference
a policy which doesn't exist, since the server will no longer error
out in this case.
Greg Hudson [Mon, 7 Jan 2013 20:22:26 +0000 (15:22 -0500)]
Stop loading policy for pw_expiration in LDAP
populate_krb5_db_entry() performs a subsidiary LDAP search to load the
password policy, which it uses to update the pw_expiration field.
This has some minimal value (it causes pw_expiration values in
principals to auto-update whenever the pw_max_life field of a policy
changes), but it's complicated, expensive, and inconsistent with the
DB2 back end. Get rid of it.
Zhanna Tsitkov [Wed, 9 Jan 2013 15:36:12 +0000 (10:36 -0500)]
Update release numbers, refs in feature list doc
At the moment the latest release number is 1.11 and the supported releases
are 1.10 and 1.9.
Also, update some references to the documents and fix typos.
Greg Hudson [Wed, 9 Jan 2013 15:21:00 +0000 (10:21 -0500)]
Error on void pointer arithmetic with gcc
Add -Werror=pointer-arith to the gcc warning flags. The equivalent
was added to the Solaris compiler flags in 2dc1ef4078acd7ca463a8eee2ef20de54e672f37 (r21886).
Greg Hudson [Wed, 9 Jan 2013 15:07:27 +0000 (10:07 -0500)]
Fix void pointer arithmetic in oid_ops.c
When asserting that out has advanced the expected number of bytes in
generic_gss_str_to_oid, avoid adding to oid->elements, which is a void
pointer. Instead subtract from out and compare.
Greg Hudson [Thu, 3 Jan 2013 18:47:01 +0000 (13:47 -0500)]
Install pkg-config data files
Add seven data files for pkg-config, corresponding to the five modules
supported by krb5-config. For krb5 and krb5-gssapi, we also provide
mit- versions for callers desiring to distinguish between our
implementation and Heimdal's.
Based on a patch from Stef Walter <stefw@gnome.org>.
Greg Hudson [Thu, 3 Jan 2013 16:07:15 +0000 (11:07 -0500)]
Move krb5-config to new src/build-tools directory
In preparation for adding a bunch of pkg-config data files, move
krb5-config into a new source tree subdirectory containing tools we
provide as outputs to other build systems.
Greg Hudson [Tue, 1 Jan 2013 05:23:43 +0000 (00:23 -0500)]
Fix gss_str_to_oid and gss_oid_to_str edge cases
Neither function correctly handled OIDs whose second arc exceeds 47
(theoretically possible if the first arc is 2). gss_str_to_oid had
additional problems: it used scanf, it didn't consistently protect
against read overrun if the input buffer wasn't null-terminated, and
it could get confused by + or - characters in the first two arcs. Fix
gss_oid_to_str and rewrite gss_str_to_oid.
Greg Hudson [Mon, 31 Dec 2012 22:21:46 +0000 (17:21 -0500)]
Fix a small memory leak in util_errmap
Calls to gssint_mecherrmap_map_errcode would result in calling
mecherror_copy with a zero-length mech OID, which would result in an
OID with 0 for length and malloc(0) for elements. On platforms which
return non-null from malloc(0), gssint_mecherrmap_destroy() wouldn't
free the elements pointer.
Avoid calling malloc(0) and don't use the length field to decide
whether to free an elements pointer.
Tom Yu [Fri, 21 Dec 2012 21:07:28 +0000 (16:07 -0500)]
Delete timestamp_to_sfstring sprintf fallback
The final fallback for krb5_timestamp_to_sfstring() is an explicit
European date-order format string passed to sprintf(). This can be
confused with a conventional US date format. Because we attempt to
build a strftime() replacement anyway, and we try passing some
unambiguous ISO 8601 date and time formats to strftime(), remove this
final fallback.
Tom Yu [Fri, 21 Dec 2012 20:45:53 +0000 (15:45 -0500)]
Add more formats to krb5_timestamp_to_sfstring
krb5_timestamp_to_string() can produce ambiguous dates. The final
fallback, "%d/%m/%Y %R", contains a European order date format that
can be confused with a US date format. Add some additional strftime()
format strings, including locale-dependent formats and some ISO 8601
formats. Remove the hardcoded strftime() format that had an ambiguous
date order.
Greg Hudson [Fri, 21 Dec 2012 17:20:43 +0000 (12:20 -0500)]
Use krb5_init_creds_context as clpreauth rock
The clpreauth rock had become a collection of alias pointers into the
init_creds context structure. Get rid of it and just pass the context
(suitably casted) to clpreauth modules. Simplify the signatures of
k5_preauth(), k5_preauth_tryagain(), process_pa_data(), and
fill_response_items() by referencing fields from the init_creds
context.
Since we can't use the non-nullity of rock->selected_preauth_type to
determine whether to record the selected preauth type, k5_preauth now
reports it in an output parameter, and get_in_tkt.c decides whether or
not to record it.
Greg Hudson [Fri, 21 Dec 2012 21:18:34 +0000 (16:18 -0500)]
Initialize ret in process_pa_data
If the for loop never consults any preauth modules and must_preauth is
false, we might never set ret, so we need to initialize it. The bug
was introduced in 5c23bce0e8d3328bb36bc85ee10cfac486b8ae9b and is
detected by some versions of gcc with -O2.
Greg Hudson [Thu, 20 Dec 2012 19:20:37 +0000 (14:20 -0500)]
Fix signed overflow check in k5_ucs2s_to_utf8s
Signed overflow must be checked before it happens, since modern
versions of gcc will optimize out checks of the result. Reported by
Nickolai Zeldovich <nickolai@csail.mit.edu>.
Greg Hudson [Thu, 20 Dec 2012 19:19:16 +0000 (14:19 -0500)]
Remove inoperative null checks in KDC code
In prepare_error_tgs, kdc_free_rstate, and kdc_fast_handle_error,
remove unnecessary null checks. The callers avoid passing null
states, and in each case we've already dereferenced the pointer
earlier. Reported by Nickolai Zeldovich <nickolai@csail.mit.edu>.
Greg Hudson [Thu, 20 Dec 2012 19:17:45 +0000 (14:17 -0500)]
Avoid null dereference in BDB dbtree error case
An error case in __bt_first would deference a null pointer. This is
an old upstream BDB bug. Use a separate variable to hold the result
of mpool_get() until it has been checked. Reported by Nickolai
Zeldovich <nickolai@csail.mit.edu>.
Greg Hudson [Thu, 20 Dec 2012 19:00:37 +0000 (14:00 -0500)]
Fix clntraw_create initialization
clntraw_create has been broken since inception; on the first call, it
would compute invalid values of xdrs and client and dereference them.
Fix that. (This is pretty strong evidence that no one has ever used
it.) Reported by Nickolai Zeldovich <nickolai@csail.mit.edu>.
Greg Hudson [Sun, 16 Dec 2012 21:55:29 +0000 (16:55 -0500)]
Simplify k5test.py environments
The initial k5test.py design, copied from the dejagnu suite, is to
create config files and environments for four expected roles: client,
server, master, and slave. This approach exaggerates the complexity
of the common case, where the configurations don't need to vary, and
limits us to having just one slave for kprop/iprop tests.
Instead, create just one configuration by default, and add a
special_env() method which sets up a differently configured
environment for the few test cases which need one. The run_as_*()
methods are collapsed into just run(), which accepts an optional
argument for the environment returned by special_env().
Greg Hudson [Sun, 18 Nov 2012 20:48:08 +0000 (15:48 -0500)]
Remove LDAP realm krbTicketPolicyReference code
ldap_realm.c had some code intended to handle a
krbTicketPolicyReference from a krbRealmContainer object, but there
wasn't enough of it to ever do anything. Remove it.
Greg Hudson [Sun, 18 Nov 2012 18:59:48 +0000 (13:59 -0500)]
Simplify LDAP KDB module container DN handling
Outside of krb5_ldap_read_krbcontainer_params and
krb5_ldap_create_krbcontainer, no fields of
krb5_ldap_krbcontainer_params were used except for the DN. There was
code to create a krbTicketPolicyReference attribute (which would fail
because the schema doesn't allow that attribute, and was never
exercised because kdb5_ldap_util would never set the parameter) and to
read fields like max ticket life from the referenced ticket policy,
but those fields were never used.
Eliminate the structure and just store the container DN in
krb5_ldap_context. Continue creating the container object when
creating a realm (by calling krb5_ldap_create_krbcontainer
unconditionally; it now exits successfully if the container already
exists), but don't ever read it.
Greg Hudson [Sun, 18 Nov 2012 01:24:11 +0000 (20:24 -0500)]
Remove unneeded code in krb5_ldap_put_principal
krb5_ldap_put_principal contained some conditionals for the case where
entry->princ is NULL, but only after entry->princ was dereferenced
unconditionally. It's not necessary to handle this case, so don't.
Greg Hudson [Thu, 20 Dec 2012 16:27:49 +0000 (11:27 -0500)]
Don't output trailing whitespace in depfix.pl
All of our deps files have a trailing space in the first line,
originating from depfix.pl. This space triggers the whitespace
checker when generating a new deps file. Get rid of the trailing
whitespace in the script; the change will be reflected in the deps
files the next time they are regenerated.
Greg Hudson [Sun, 28 Oct 2012 15:31:37 +0000 (11:31 -0400)]
Pass through module errors when preauthenticating
If we are responding to a KDC_ERR_PREAUTH_REQUIRED and cannot
preauthenticate, report the error from the first real preauth type we
tried.
k5_preauth() now accepts a boolean input indicating that it must
succeed on a real preauth type, instead of returning a boolean saying
whether or not it did.
Greg Hudson [Sat, 27 Oct 2012 19:29:48 +0000 (15:29 -0400)]
Rename internal preauth functions
The preauth functions are internal to libkrb5, so use the k5_ prefix,
don't use KRB5_CALLCONV, and prototype them in int-proto.h. Also
remove krb5_do_preauth from the Unix libkrb5 export list.
Reorder the k5_preauth() and k5_preauth_tryagain() arguments for more
consistency with the clpreauth interface, and put the output padata
arguments at the end.
Rename any remaining uses of "kcontext" to "context" in preauth2.c.
Greg Hudson [Sat, 27 Oct 2012 15:55:36 +0000 (11:55 -0400)]
Make clpreauth flags function optional
With one exception (KRB5_PADATA_PKINIT_KX), every padata type
processed by a clpreauth module is now a real preauthentication type.
Reduce the amount of boilerplate required for a clpreauth module by
making the flags method optional if all of the preauth types
advertised by the module are real.
Greg Hudson [Tue, 23 Oct 2012 17:02:12 +0000 (13:02 -0400)]
Use a proper consumer interface for clpreauth
In preauth2.c, use wrapper functions for calls to clpreauth functions.
Get rid of the expanded-out module table, instead using a helper
function to find the handle for a preauth type. Replace use counts
with a list of previously processed pa types. Check for pa type
conflicts when loading clpreauth modules.
Greg Hudson [Sun, 21 Oct 2012 23:37:14 +0000 (19:37 -0400)]
Separate clpreauth and kdcpreauth interfaces
Since there is no overlap between the clpreauth and kdcpreauth
interface declarations, there's no particular reason to combine them
into one header. For backward compatibility and convenience, leave
behind a preauth_plugin.h which includes both.
Greg Hudson [Sun, 21 Oct 2012 20:14:59 +0000 (16:14 -0400)]
Save extended messages across fallback to master
In krb5_get_init_creds_password and krb5_get_init_creds_keytab, save
the extended error before retrying against the master KDC, and restore
that state if returning the error from the original request.
Greg Hudson [Sun, 21 Oct 2012 00:16:19 +0000 (20:16 -0400)]
Simplify error message retrieval
Eliminate the scratch_buf field of struct error_info and just return a
non-localized constant error message if we can't allocate a copy of
the real one. Also rely on a conformant strerror().
Greg Hudson [Sat, 20 Oct 2012 20:52:29 +0000 (16:52 -0400)]
Style cleanup for internal error handling
Fix style issues in kerrs.c and errors.c. Rename error handling
functions to use shorter k5_ prefix. Eliminate an inoperable
krb5int_set_error() call in gic_opte_alloc and convert the other
call to use krb5_set_error_message().