Ken Raeburn [Thu, 12 Mar 2009 16:48:15 +0000 (16:48 +0000)]
crash using library-allocated storage for header in wrap_iov
When allocating storage for the header buffer, update the internal
output buffer pointer as well.
ticket: 6412
target_version: 1.7
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22081
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 11 Mar 2009 22:14:24 +0000 (22:14 +0000)]
Report verbose error messages from KDC
We were losing verbose error messages when logging from the KDC because
the context passed to krb5_klog_init did not match the realm-specific
context used for most library function calls. Introduce a wrapper
function kdc_err which copies the error state from the call context
to the log context. The wrapper function also knows the program name,
which removes the need to pass argv[0] around everywhere or make up
program names.
ticket: 6408
target_version: 1.7
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22079
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 11 Mar 2009 22:11:06 +0000 (22:11 +0000)]
Make a working krb5_copy_error_message
The krb5_copy_error_state macro wasn't used, didn't work, and didn't
need to be a macro. Replace it with an exported API function named
krb5_copy_error_message.
ticket: 6407
target_version: 1.7
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22078
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Wed, 11 Mar 2009 15:36:41 +0000 (15:36 +0000)]
Make Lite Client lib link again
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22077
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Wed, 11 Mar 2009 15:32:14 +0000 (15:32 +0000)]
Make it link again
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22076
dc483132-0cff-0310-8789-
dd5450dbe970
Will Fiveash [Tue, 10 Mar 2009 20:26:24 +0000 (20:26 +0000)]
Several small fixes to enable the migrate mkey commands to work properly with a LDAP KDB. See the ticket for more details
ticket: 6405
Tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22073
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Tue, 10 Mar 2009 14:49:43 +0000 (14:49 +0000)]
Added test for KRB5_NT_UNKNOWN princ type
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22072
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 10 Mar 2009 01:28:12 +0000 (01:28 +0000)]
Rename kdb_setup_lib_handle to krb5_db_setup_lib_handle and export it.
Make kdb5_ldap_util work again by calling this function to set up
dal_handle instead of using one with an uninitialized lib_handle.
It is likely that kdb5_ldap_util will only function given a krb5.conf
which specifies a realm with an LDAP database module as the default
realm. Not sure if that was the case before.
ticket: 6403
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22071
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Mon, 9 Mar 2009 14:23:31 +0000 (14:23 +0000)]
Removed unneeded printf's
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22070
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Mon, 9 Mar 2009 14:21:20 +0000 (14:21 +0000)]
Introduced '-u' option to kvno to enforce KRB5_NT_UNKNOWN princ type
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22069
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 6 Mar 2009 23:57:10 +0000 (23:57 +0000)]
Add "-V" option to klist to print the package name and version, and exit
ticket: 4241
target_version: 1.7
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22068
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Fri, 6 Mar 2009 17:26:29 +0000 (17:26 +0000)]
send_as_req re-encodes the request
krb5_get_init_creds calls encode_krb5_as_req to produce an encoding
for the preauth plugins, then passes the unencoded request structure
into the static function send_as_req. That function re-encodes the
request. This is an unnecessary call to the encoder. In addition,
for the FAST project, it is desirable to encapsulate the unencoded
outer request so that krb5_get_init_creds does not need it.
* send_as_req is modified to take an encoded request and realm
* Remove unused logic to fill in request nonce from send_as_req
ticket: 6401
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22067
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Thu, 5 Mar 2009 16:49:12 +0000 (16:49 +0000)]
Take out of the loop unchangeble assignments. Tabulation
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22065
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Thu, 26 Feb 2009 20:32:35 +0000 (20:32 +0000)]
krb5_merge_authdata should initialize output on failure
ticket: 6400
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22057
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Thu, 26 Feb 2009 20:07:05 +0000 (20:07 +0000)]
Include authenticator and ticket authdata in gss-api
Currently, the GSS-API routines for handling authdata only extract the
authorization data from the ticket, not that from the authenticator.
This is incorrect. Introduce a new function krb5_merge_authadata to
merge two authdata arrays into a newly allocated result array. Use
this function in accept_sec_context.c to include both sets of
authdata.
ticket: 6400
Target_version: 1.7
Tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22056
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Mon, 23 Feb 2009 21:26:29 +0000 (21:26 +0000)]
Check return code of encode_krb5_ap_req. Also, tabs vs whitespace
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22050
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 23 Feb 2009 20:15:05 +0000 (20:15 +0000)]
In krb5int_generate_and_save_subkey, check the return value of
krb5_crypto_us_timeofday. It can't really fail in practice, but if it
did we'd be passing stack garbage to krb5_c_random_add_entropy.
That's harmless, but poor form.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22049
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 23 Feb 2009 19:30:36 +0000 (19:30 +0000)]
Check the return value of fseek in two places in kt_file.c
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22047
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Mon, 23 Feb 2009 18:47:28 +0000 (18:47 +0000)]
Correct the return code
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22046
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 23 Feb 2009 18:28:48 +0000 (18:28 +0000)]
Kill an odd (but harmless) use of strncpy in
krb5_get_in_tkt_with_password, by using the construction from
krb5_get_init_creds_password.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22045
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Mon, 23 Feb 2009 16:22:47 +0000 (16:22 +0000)]
send_tgs.c:
* Move generation of subkey into krb5int_send_tgs from construct_authenticator so that it is available for encrypting authorization data.
* Initialize rep->message_type and note that rep is touched on
unsuccessful calls (this has always been true).
* Do not set *subkey until successful return.
Thanks to Greg Hudson for pointing out these problems.
Ticket: 6393
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22044
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 20 Feb 2009 19:13:00 +0000 (19:13 +0000)]
In krcp, check the return value when closing the output file after
successfully writing it. close cannot return an error status on most
local filesystems, but can on some network filesystems such as AFS or
NFS.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22043
dc483132-0cff-0310-8789-
dd5450dbe970
Russ Allbery [Fri, 20 Feb 2009 18:48:26 +0000 (18:48 +0000)]
Also install k5srvutil into PREFIX/bin instead of PREFIX/sbin
Ticket: 6348
Tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22042
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Fri, 20 Feb 2009 18:24:18 +0000 (18:24 +0000)]
Adjust to the return value of isflagset routine
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22041
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Fri, 20 Feb 2009 14:34:34 +0000 (14:34 +0000)]
KDC realm referral test
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22040
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 19 Feb 2009 20:51:27 +0000 (20:51 +0000)]
remove obsolete GNU.ORG realm info
Our sample krb5.conf has obsolete info on the GNU.ORG realm; the DNS
entries named don't exist, and AFAIK this hasn't been accurate in
years. (I don't even know if they're currently running a Kerberos
realm.)
ticket: 6398
target_version: 1.7
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22038
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Thu, 19 Feb 2009 20:15:04 +0000 (20:15 +0000)]
Fix in handle_referral_params
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22037
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 18 Feb 2009 18:20:41 +0000 (18:20 +0000)]
Some fixups and stubs for building ccapi on UNIX, and dependencies.
(Doesn't make a complete working implementation, but it mostly compiles.)
Does *not* include the changes to actually cause the ccapi code to get
built in normal UNIX builds.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22023
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 17 Feb 2009 17:32:19 +0000 (17:32 +0000)]
Revert the fopen part of the previous krb5_kuserok change, but keep
the string-handling change. It introduced an unwanted behavior change
when .k5login was detectable but unreadable.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22011
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 17 Feb 2009 17:09:35 +0000 (17:09 +0000)]
In krb5_kuserok, just try opening .k5login; don't check ahead of time
whether it looks accessible. Also rewrite the construction of the
.k5login filename to use snprintf instead of strnpy/strncat.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22010
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 13 Feb 2009 22:23:24 +0000 (22:23 +0000)]
Be less verbose about routing-socket messages
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22005
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 13 Feb 2009 22:05:48 +0000 (22:05 +0000)]
Correct numerous memory leaks on error conditions in the ASN.1
decoder functions.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22004
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 13 Feb 2009 22:03:37 +0000 (22:03 +0000)]
In krb5_decode_leak.c, work around the oddity that
krb5_free_cred_enc_part is a contents-only free function.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22003
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 13 Feb 2009 22:00:47 +0000 (22:00 +0000)]
In tgs_construct_tgsreq, free scratch even if scratch->data is NULL.
(Which probably can't happen, but static analyzers don't know that.)
Also protect scratch from being freed before initialization.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22002
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Fri, 13 Feb 2009 15:55:32 +0000 (15:55 +0000)]
Implement TGS authenticator subkey usage
Implement support for use of a subkey in the TGS req. This is needed
by FAST TGS support. The interface to krb5_send_tgs changed in order
to gain a subkey output parameter. Since this is a private interface
it was renamed to krb5int_send_tgs and removed from the export list.
* send_tgs.c: generate a subkey and return to caller
* decode_kdc_rep.c: Use subkey keyusage
* gc_via_tkt.c: pass in subkey to decode_kdc_rep
* send_tgs.c: use subkey for encrypting authorization data
ticket: 6393
tags: enhancement
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21993
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 12 Feb 2009 20:35:15 +0000 (20:35 +0000)]
Don't pass negative numbers to strerror
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21988
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 12 Feb 2009 20:19:21 +0000 (20:19 +0000)]
Don't apply 'const' twice. Make kg_arcfour_l40 static
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21987
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 12 Feb 2009 20:18:20 +0000 (20:18 +0000)]
Don't apply 'const' twice
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21986
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 12 Feb 2009 20:07:15 +0000 (20:07 +0000)]
In krb5_get_in_tkt_with_password, free opte before returning the error
from krb5_unparse_name, not after.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21985
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 12 Feb 2009 19:43:23 +0000 (19:43 +0000)]
Make output parameter of krb5_generate_subkey_extended well-defined on
error, and reformat function to fit coding standards.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21984
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 12 Feb 2009 19:43:08 +0000 (19:43 +0000)]
Remove useless unsigned >=0 tests
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21983
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 12 Feb 2009 19:38:08 +0000 (19:38 +0000)]
In krb5_rc_io_open_internal, d->fn is always set for the cleanup
handler, so do not check it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21982
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 12 Feb 2009 18:21:33 +0000 (18:21 +0000)]
Modify asn12krb5_buf and asn1_do_full_encode to make output parameter
values well-defined on error. Clean up memory handling and an unused
variable in asn1_do_full_encode.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21981
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 12 Feb 2009 17:51:45 +0000 (17:51 +0000)]
Fix allocation failure check in walk_rtree
Check the correct variable for null after allocating the server string
in rtree_capath_vals.
ticket: 6392
tags: pullup
target_version: 1.7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21980
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 11 Feb 2009 20:28:40 +0000 (20:28 +0000)]
Add a new test harness to facilitate memory leak detection in the
ASN.1 decoder routines.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21970
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 11 Feb 2009 20:18:43 +0000 (20:18 +0000)]
Ensure we have a free function for every data type we have an ASN.1
decoder for. Export the new free functions, but only declare them
in k5-int.h since they shouldn't be needed by applications. Also
export a couple of encoder and decoder functions not previously
exported.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21969
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 11 Feb 2009 13:01:11 +0000 (13:01 +0000)]
--disable-rpath is not working
AC_ARG_ENABLE returns its value in enableval not withval. --disable-rpath
was not working - or dependent on some previous setting...
ticket: 6390
tags: pullup
target_version: 1.7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21968
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Wed, 11 Feb 2009 12:47:51 +0000 (12:47 +0000)]
Add test for krb5_cc_get_principal and ensure returned value correct
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21967
dc483132-0cff-0310-8789-
dd5450dbe970
Russ Allbery [Wed, 11 Feb 2009 05:00:24 +0000 (05:00 +0000)]
Install ktutil and kadmin into CLIENT_BINDIR instead of ADMIN_BINDIR
since both are useful for users other than the system administrator.
Ticket: 6348
Tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21966
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 11 Feb 2009 01:15:58 +0000 (01:15 +0000)]
remove local objects from list for windows
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21965
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 11 Feb 2009 01:14:27 +0000 (01:14 +0000)]
remove des425 syms; add some new dce,iov syms needed for gssapi
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21964
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 11 Feb 2009 01:12:21 +0000 (01:12 +0000)]
Updates for current CCAPI code; build krb5 unicode support
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21963
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 11 Feb 2009 00:58:41 +0000 (00:58 +0000)]
Some updates to compile and link on Windows, with recent CCAPI changes
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21962
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 11 Feb 2009 00:53:28 +0000 (00:53 +0000)]
pull in unicode stuff on windows
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21961
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 11 Feb 2009 00:53:00 +0000 (00:53 +0000)]
hide stat buf init on windows
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21960
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 11 Feb 2009 00:51:46 +0000 (00:51 +0000)]
make build on windows, in current makefile framework
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21959
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 11 Feb 2009 00:51:06 +0000 (00:51 +0000)]
Windows version of 'copy a bunch of files around'
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21958
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 11 Feb 2009 00:24:39 +0000 (00:24 +0000)]
build strlcpy.c, printf.c, ipc_stream.c on windows
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21957
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 11 Feb 2009 00:16:23 +0000 (00:16 +0000)]
define SSIZE_MAX forWindows
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21956
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 11 Feb 2009 00:15:55 +0000 (00:15 +0000)]
unistd.h is posix only
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21955
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 11 Feb 2009 00:11:33 +0000 (00:11 +0000)]
pull in dependency files
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21954
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 10 Feb 2009 23:38:36 +0000 (23:38 +0000)]
update
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21953
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 10 Feb 2009 19:05:58 +0000 (19:05 +0000)]
In krb5_ccache_internalize: fix resource leaks, fix several cases
where success could be returned on failure, validate the length of the
ccache name, make the value of *argp well-defined on failure, and lay
out the function in a linear style with a cleanup handler.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21952
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 10 Feb 2009 18:25:15 +0000 (18:25 +0000)]
In the ccache serialization code, remove some unnecessary checks for
nullity of ccache->ops; we assume a valid ops pointer in neighboring
parts of the code.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21951
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 10 Feb 2009 17:17:39 +0000 (17:17 +0000)]
Fix a memory leak (unlikely to happen in practice) in krb5_mcc_store;
use a cleanup handler for robustness.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21950
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 10 Feb 2009 02:01:58 +0000 (02:01 +0000)]
Adjust the structure of krb5_decode.c functions to initialize output
parameters to NULL and not set them to the real values until a
successful return is guaranteed. Also fix get_eoc which was returning
without clean_return.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21940
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 10 Feb 2009 00:20:48 +0000 (00:20 +0000)]
Update t_k5buf.c for the renamed buffer type constants
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21939
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 23:43:04 +0000 (23:43 +0000)]
Rename functions from k5_ipc_stream_* to krb5int_ipc_stream_*, because some of them will have to be exported
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21938
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 23:27:50 +0000 (23:27 +0000)]
Add variables for optionally building ipc_stream.c; currently empty
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21937
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 23:00:59 +0000 (23:00 +0000)]
Adjust names to not conflict with Windows headers
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21936
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 22:59:00 +0000 (22:59 +0000)]
Include assert.h
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21935
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 22:42:43 +0000 (22:42 +0000)]
Use winsock2.h on Windows. Make initializer value static
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21934
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 22:38:31 +0000 (22:38 +0000)]
More KfW generated stuff
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21933
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 22:34:31 +0000 (22:34 +0000)]
More KfW generated stuff
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21932
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 22:31:16 +0000 (22:31 +0000)]
Ignore some stuff generated for KfW build
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21931
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 22:22:24 +0000 (22:22 +0000)]
Rename X11 resource file to avoid name conflict on Mac in in-place build
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21930
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 22:20:13 +0000 (22:20 +0000)]
Ignore files generated by in-place build on Mac
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21929
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 9 Feb 2009 21:25:53 +0000 (21:25 +0000)]
Make asn1buf_destroy return void, since it's a free function. In
krb5_encode.c functions, make *code well-defined in case of error,
and clean up some memory leaks.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21928
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 9 Feb 2009 21:23:00 +0000 (21:23 +0000)]
In asn1_k_encode.c, stop inconsistently destroying buf on some errors.
It belongs to the caller.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21927
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 20:39:54 +0000 (20:39 +0000)]
Fix one more case of an explicit null check before calling a free
function that does the null check.
Also, use krb5_free_keyblock_contents instead of open-coding all the
work (and not trying hard enough to clear the memory).
ticket: 6377
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21926
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Mon, 9 Feb 2009 19:07:09 +0000 (19:07 +0000)]
Check if mem allocation was successful
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21925
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 9 Feb 2009 18:52:40 +0000 (18:52 +0000)]
Fix possible free of uninitialized value in walk_rtree
In rtree_hier_realms, if the first rtree_hier_tweens call failed, the
cleanup handler would free stweens which had not been initialized.
Initialize ctweens and stweens to NULL in the variable declarations to
make the cleanup handler safe.
ticket: 6379
tags: pullup
target_version: 1.7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21924
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 9 Feb 2009 18:35:19 +0000 (18:35 +0000)]
Change contract of krb5int_utf8_normalize and fix memory leaks
Make krb5int_utf8_normalize return a krb5_error_code and always allocate
a structure to be placed in the output parameter. Adjust the function
structure to use a cleanup handler, fixing many memory leaks.
ticket: 6378
tags: pullup
target_version: 1.7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21923
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 18:13:08 +0000 (18:13 +0000)]
Provide omitted return value in last change
ticket: 6377
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21922
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 17:58:22 +0000 (17:58 +0000)]
Remove unused file
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21921
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 17:53:21 +0000 (17:53 +0000)]
make krb5_free_* functions ignore NULL
This makes them safer to call in various contexts where NULL may leak
through, and makes analysis easier.
Also, remove some checks for NULL before calling a free routine that
will also check for NULL.
ticket: 6377
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21920
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 16:36:09 +0000 (16:36 +0000)]
Check C++ compatibility for some internal headers that may (now or in
the future) be used in C++ code on Windows.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21919
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 16:35:01 +0000 (16:35 +0000)]
More C++ compatibility: Don't use "typedef struct tag *tag"; rename
the tag and keep the same typedefname.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21918
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 16:28:29 +0000 (16:28 +0000)]
C++ compatibility fix -- g++ says "types may not be defined in casts",
so do the gcc unaligned-struct trick only for C, not C++.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21917
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 16:15:51 +0000 (16:15 +0000)]
For Sun CC, also make implicit function declarations into errors
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21916
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 16:14:38 +0000 (16:14 +0000)]
Supply missing fn declarations
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21915
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 16:07:42 +0000 (16:07 +0000)]
use unsigned value for shifting, avoiding undefined behavior
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21914
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 9 Feb 2009 15:57:58 +0000 (15:57 +0000)]
For Sun CC, create one errwarn arg with commas instead of multiple
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21913
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 6 Feb 2009 20:43:44 +0000 (20:43 +0000)]
Memory handling fixes in walk_rtree
In walk_rtree's rtree_hier_tree, don't leak the result of
rtree_hier_realms. In rtree_hier_realms, avoid freeing one too many
krb5_data contents on allocation failure, and use the recommend
pattern to ensure well-defined output parameter values.
ticket: 6376
tags: pullup
target_version: 1.7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21912
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 6 Feb 2009 19:46:40 +0000 (19:46 +0000)]
Fix whitespace on previous commit to ure.c. Correct two other cases
where %lX was used with a krb5_ui_4 type argument without a cast to
unsigned long.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21911
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 6 Feb 2009 19:18:20 +0000 (19:18 +0000)]
Pass the correct width argument to fprintf for URE_CHAR in
ure_write_dfa.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21910
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 6 Feb 2009 18:40:04 +0000 (18:40 +0000)]
Fix error handling in krb5_walk_realm_tree
rtree_hier_realms was forgetting to assign the return value of
krb5int_copy_data_contents to retval, which would cause a failure to
notice out-of-memory conditions.
ticket: 6375
tags: pullup
target_version: 1.7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21909
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Fri, 6 Feb 2009 05:42:32 +0000 (05:42 +0000)]
Unsigned/signed fixes
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21908
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Fri, 6 Feb 2009 05:31:09 +0000 (05:31 +0000)]
Change variable accepting return from strftime to time_t. This
matches prototype for function and removes a signed/unsigned warning.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21907
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Fri, 6 Feb 2009 05:22:34 +0000 (05:22 +0000)]
Do not assume sizeof(bool_t) == sizeof(krb5_boolean)
bool_t is defined as int, krb5_boolean as unsigned int. These are
similar size but someone someday might change the krb5_boolean.
Instead of passing a krb5_boolean * to xdr_bool, implement xdr_krb5_boolean
which keeps the different types separate.
This cleans up a number of warnings.
ticket: 6374
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21906
dc483132-0cff-0310-8789-
dd5450dbe970