Greg Hudson [Thu, 5 Feb 2009 18:19:23 +0000 (18:19 +0000)]
Fix a memory leak in krb5_kt_resolve when we fail to lock
kt_typehead_lock.
ticket: 6367
tags: pullup
target_version: 1.7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21890
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 5 Feb 2009 02:59:08 +0000 (02:59 +0000)]
include omitted system header string.h
Sun cc warns about some of the string functions being undeclared in
several source files. So, include string.h there.
ticket: 6365
target_version: 1.7
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21889
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 5 Feb 2009 02:16:22 +0000 (02:16 +0000)]
declare replacement [v]asprintf functions
If HAVE_VASPRINTF is not defined, make sure krb5int_{,v}asprintf
functions always get declared, applying the preprocessor conditional
test only to the GCC format attribute. If HAVE_VASPRINTF is defined,
don't declare them at all.
This fixes a bunch of function-not-declared warnings under Sun cc.
ticket: 6364
target_version: 1.7
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21888
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 5 Feb 2009 01:49:21 +0000 (01:49 +0000)]
int/ptr bug in gssapi code
Fix a pointer argument passed where an integer is needed.
Update Sun compiler options to make that an error. (The options we're
currently using make it an error for assignment but not for argument passing.)
ticket: 6363
target_version: 1.7
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21887
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 4 Feb 2009 23:28:09 +0000 (23:28 +0000)]
don't do arithmetic on void pointers
Fix one file in gssapi where we compute offsets from a void* without casting.
Change options used with Sun compiler to make such expressions an error.
ticket: 6362
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21886
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 4 Feb 2009 23:06:12 +0000 (23:06 +0000)]
regenerate
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21885
dc483132-0cff-0310-8789-
dd5450dbe970
Will Fiveash [Wed, 4 Feb 2009 22:29:44 +0000 (22:29 +0000)]
new multi-masterkey support doesn't work well when system clock is set
back
The ticket contains the details.
ticket: 6361
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21884
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 4 Feb 2009 20:32:05 +0000 (20:32 +0000)]
Remove xfread/xfwrite macros. Casting the first argument to char * is
unnecessary (fread's first argument is void *, which does not require
a cast) and confuses Coverity's UNINIT checker; casting the third
argument to unsigned is not necessary for our current set of warnings.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21883
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 4 Feb 2009 19:31:33 +0000 (19:31 +0000)]
In tcl_ovsec_kadm_get_policy, initialize ent since (at least in
theory) there's a code path which gets through to the finalizers
without setting it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21882
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 4 Feb 2009 19:25:51 +0000 (19:25 +0000)]
In krb5int_utf8s_to_ucs2les, free the correct value on error, instead
of the caller-supplied result pointer.
ticket: 6360
tags: pullup
target_version: 1.7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21881
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 4 Feb 2009 19:15:13 +0000 (19:15 +0000)]
Include k5-int.h in several pkinit source files, in order to define
the KRB5_CONFIG symbols now used by those files.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21880
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Wed, 4 Feb 2009 17:08:44 +0000 (17:08 +0000)]
Use macros for config parameters
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21879
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 4 Feb 2009 03:18:04 +0000 (03:18 +0000)]
remove some krb4 testing hooks
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21878
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 4 Feb 2009 02:41:24 +0000 (02:41 +0000)]
don't create or delete krb.conf, krb.realms
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21877
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 3 Feb 2009 16:38:34 +0000 (16:38 +0000)]
prefer structure assignment to memcpy
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21876
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 23:41:40 +0000 (23:41 +0000)]
Remove unnecessary pointer casts in args to free,memcpy,memset,memchr except unicode, windows code
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21875
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 22:28:34 +0000 (22:28 +0000)]
TWRITE_STR casts second argument; don't add redundant casting
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21874
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 2 Feb 2009 21:55:13 +0000 (21:55 +0000)]
Fix a whitespace error introduced when fixing a typo in the defines
added to k5-int.h.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21873
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Mon, 2 Feb 2009 21:53:16 +0000 (21:53 +0000)]
Fix a typo in the defines added to k5-int.h
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21872
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Mon, 2 Feb 2009 21:34:19 +0000 (21:34 +0000)]
Introduces macros for config parameters
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21871
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 21:13:42 +0000 (21:13 +0000)]
Get rid of casts of free() argument to char*, except where it's
casting away const (so as to make this change warning-neutral), and in
unicode source (which we may want to keep in sync with another
source), and krb5_xfree macro (to be handled separately).
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21870
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 20:56:18 +0000 (20:56 +0000)]
Collect hairy parts of krb5_is_<msgtype> macros into one helper macro
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21869
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 20:37:41 +0000 (20:37 +0000)]
Revise last change to better resemble the original test, keeping the
min-lifetime test code collected together. Change policy to have a
minimum password lifetime of 10s instead of 30s, and reduce the test
delays accordingly.
ticket: 6358
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21868
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 19:29:52 +0000 (19:29 +0000)]
speed up kpasswd tests
Reorder some tests and tune delays, so that we don't need to run for
much more than twice the min-password-life interval when testing that
functionality. (This could be made faster if we can assume that
init_db will always have been run immediately before the tests start.)
In my tests, this cuts something like 11 seconds off the run time (now
down to about 65 seconds).
ticket: 6358
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21867
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 18:42:06 +0000 (18:42 +0000)]
address lib/kadm5 test suite slowness
In mod-principal tests for clearing the principal's policy, instead of
just testing to see if the wrong string is output and timing out
looking for it, check also for the new expected value. Cuts test
suite run time by about two minutes for each pass (client vs server).
ticket: 6357
target_version: 1.7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21866
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 18:29:28 +0000 (18:29 +0000)]
don't delay so long while waiting for daemon startup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21865
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 18:14:50 +0000 (18:14 +0000)]
comment needed some grammatical/typographical fixes too
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21864
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 18:12:57 +0000 (18:12 +0000)]
comment whitespace
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21863
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 18:10:30 +0000 (18:10 +0000)]
reapply memchr patch
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21862
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 17:39:59 +0000 (17:39 +0000)]
explicitly initialize pointer fields after memset (for coverity)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21861
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 2 Feb 2009 16:54:38 +0000 (16:54 +0000)]
small storage leak in KDC startup
Remove duplicate strdup call.
ticket: 6356
target_version: 1.7
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21860
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 31 Jan 2009 04:39:34 +0000 (04:39 +0000)]
use t_inetd with a ready message and avoid waiting a lot in non-root tests
Change t_inetd to print a ready message when it has started listening
on the indicated port number.
Look for this message in sample.exp rather than waiting an arbitrary
(and usually excessive) 2s each time for the inetd-mode tests. Use
run_once to perform the standalone-mode test only once per test suite
invocation.
Change rsh and rcp tests to start the servers via t_inetd and avoid
excessive waiting at startup.
In some of my tests, this reduces the tests/dejagnu tests from taking
over 6 minutes to taking around 2 minutes.
(This does mean the server process will no longer have started up
before we launch the client, so it may be slower to respond, but it'll
still be faster than the 2s delay we used before even trying to
connect.)
We can probably eliminate the -D option code from krshd.c now.
The tests run as root (rlogin, telnet) still need updating.
ticket: 6355
target_version: 1.7
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21855
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Sat, 31 Jan 2009 04:04:50 +0000 (04:04 +0000)]
back to trunk
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21854
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Sat, 31 Jan 2009 04:00:10 +0000 (04:00 +0000)]
README and patchlevel.h for 1.7 release branch
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21852
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Sat, 31 Jan 2009 03:57:20 +0000 (03:57 +0000)]
Default allow_weak_crypto=true for now. Default supported_enctypes to
exclude single-DES enctypes.
ticket: 6353
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21851
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 31 Jan 2009 02:55:25 +0000 (02:55 +0000)]
export new functions
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21850
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 31 Jan 2009 01:50:37 +0000 (01:50 +0000)]
fix resource leak
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21849
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 31 Jan 2009 01:07:04 +0000 (01:07 +0000)]
recode as more straight-line code to simplify analysis
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21848
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 31 Jan 2009 00:54:33 +0000 (00:54 +0000)]
don't use uninitialized variable
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21847
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 31 Jan 2009 00:49:53 +0000 (00:49 +0000)]
handle freeing null keyblock
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21846
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 31 Jan 2009 00:39:51 +0000 (00:39 +0000)]
don't double-free
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21845
dc483132-0cff-0310-8789-
dd5450dbe970
Will Fiveash [Fri, 30 Jan 2009 23:55:14 +0000 (23:55 +0000)]
Master Key Migration Project
Commit for the Master Key Migration Project.
http://k5wiki.kerberos.org/wiki/Projects/Master_Key_Migration
This commit provides the ability to add a new master key (with an
enctype differing from the current master key) to the master key
principal and stash file and then migrate the encryption of existing
principals long term keys to use the new master key. In addition
deletion of master keys is provided.
ticket: 6354
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21844
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 30 Jan 2009 21:25:40 +0000 (21:25 +0000)]
krb5_get_server_rcache had some dead (and incorrect) code for cleaning
up the rcache on failure. Fix the cleanup code and make use of it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21842
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 30 Jan 2009 21:22:31 +0000 (21:22 +0000)]
Make output parameter value of krb5_rc_resolve_full well-defined on
error return.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21841
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 30 Jan 2009 21:21:10 +0000 (21:21 +0000)]
In krb5_kdcrep2creds, call the correct free function when cleaning up
the keyblock, and clean up the keyblock if krb5_copy_data fails.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21840
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Fri, 30 Jan 2009 20:40:46 +0000 (20:40 +0000)]
Changed the name match_config_pattern to krb5_match_config_pattern. Check strdup return code.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21838
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Thu, 29 Jan 2009 19:23:22 +0000 (19:23 +0000)]
Introduced match_config_pattern function to find a pattern in the config value strings
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21828
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 29 Jan 2009 01:19:01 +0000 (01:19 +0000)]
whitespace
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21826
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 29 Jan 2009 01:12:17 +0000 (01:12 +0000)]
clear outbuf[0].data to unconfuse coverity
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21825
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Wed, 28 Jan 2009 23:22:27 +0000 (23:22 +0000)]
disable single-DES by default
Mark all single-DES enctypes as "weak", and create a new libdefaults
variable "allow_weak_crypto", which defaults to "false".
ticket: 6353
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21823
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 28 Jan 2009 17:01:36 +0000 (17:01 +0000)]
include netinet/in.h to make sure we know what struct in_addr looks like
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21820
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 28 Jan 2009 05:42:11 +0000 (05:42 +0000)]
no more -r option for setting krb.conf path
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21819
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 28 Jan 2009 05:37:10 +0000 (05:37 +0000)]
remove some remnants of krb4-related config file options
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21818
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Wed, 28 Jan 2009 01:28:25 +0000 (01:28 +0000)]
return correct kvno in TGS case
krb5_c_encrypt sets the kvno of ciphertext to 0.
So fill it in after the call to encrypt_tkt_part.
ticket: 6352
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21815
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Wed, 28 Jan 2009 00:32:29 +0000 (00:32 +0000)]
Run a single expect statement to read from both client and server, to
avoid an apparent race condition on Darwin.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21814
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 28 Jan 2009 00:30:06 +0000 (00:30 +0000)]
whitespace
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21813
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Wed, 28 Jan 2009 00:04:15 +0000 (00:04 +0000)]
Start to phase out krb5_xfree macro, which just casts its argument to
char* and calls free.
Replace most uses, outside of the LDAP KDB plugin, which doesn't build
on my test system of the moment because of version dependencies. Add
one explicit cast to make the change warning-neutral (under gcc 4.0.1
on Mac OS X 10.5.6).
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21812
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 27 Jan 2009 23:14:35 +0000 (23:14 +0000)]
Helper script for processing valgrind logs that don't indicate any errors, or are for system programs
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21810
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 27 Jan 2009 22:00:15 +0000 (22:00 +0000)]
use memchr
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21809
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Tue, 27 Jan 2009 21:09:35 +0000 (21:09 +0000)]
"Coding practices" related fixes
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21808
dc483132-0cff-0310-8789-
dd5450dbe970
Luke Howard [Mon, 26 Jan 2009 22:50:02 +0000 (22:50 +0000)]
In asn1_decode_pa_for_user(), ensure that user member is allocated
before assigning a value to it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21805
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Mon, 26 Jan 2009 21:26:33 +0000 (21:26 +0000)]
Introduced new static function prep_reprocess_req to make code more readable
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21801
dc483132-0cff-0310-8789-
dd5450dbe970
Sam Hartman [Mon, 26 Jan 2009 20:02:54 +0000 (20:02 +0000)]
gss_header|trailerlen should be unsigned int
The krb5_c_crypto_length API returns unsigned int per its design.
so, use unsigned int not size_t for its output.
ticket: 6351
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21799
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Mon, 26 Jan 2009 19:47:57 +0000 (19:47 +0000)]
Preliminary update of README for krb5-1.7 release
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21798
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Mon, 26 Jan 2009 19:06:21 +0000 (19:06 +0000)]
Use 16/32-bit big/little-endian store functions in more places
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21796
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Mon, 26 Jan 2009 16:20:41 +0000 (16:20 +0000)]
Check asprintf return codes. Styling
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21795
dc483132-0cff-0310-8789-
dd5450dbe970
Ezra Peisach [Sun, 25 Jan 2009 16:44:02 +0000 (16:44 +0000)]
Use a struct in_addr to insure alignment of address - instead of
random alignment on the stack. Solaris 2.10 has issues if the address
is not aligned. The rest of the code in the tree uses a struct
in_addr or mallocs the address - which will be sufficiently aligned.
ticket: 6308
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21794
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 24 Jan 2009 01:27:16 +0000 (01:27 +0000)]
Change 16/32/64-bit big-/little-endian/native unaligned load/store
routines to take void pointers, so they can operate on both plain and
unsigned char buffers, or other types.
Remove some now-unneeded casts.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21793
dc483132-0cff-0310-8789-
dd5450dbe970
Zhanna Tsitkov [Fri, 23 Jan 2009 19:59:50 +0000 (19:59 +0000)]
Eliminate the need for the domain_realm mapping table on the client side by implementing minimal referral support in the KDC
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21792
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 23 Jan 2009 19:04:57 +0000 (19:04 +0000)]
Remove some null checks in cases where pointers can't be null
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21790
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 23 Jan 2009 19:01:56 +0000 (19:01 +0000)]
In krb5_pac_get_buffer, check the correct value for null after calling
malloc.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21789
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 23 Jan 2009 18:41:39 +0000 (18:41 +0000)]
In krb5_pac_parse, change the code around a bit to avoid harmlessly
copying an uninitialized Buffers field of a PACTYPE structure.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21788
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 23 Jan 2009 18:19:19 +0000 (18:19 +0000)]
Initialize ds.magic in k5_md5_hmac_hash, to avoid harmlessly copying
around its uninitialized value in krb5_hmac.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21787
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 23 Jan 2009 18:04:08 +0000 (18:04 +0000)]
hash db2 code breaks if st_blksize > 64k
The hash db code assumes in places that the block size is no larger
than 64K. There's a range check in the case where you don't have a
file but provide initialization info. The btree code will cap the
block size used at 64K.
Apparently Sun's ZFS can report back a block size of 128K, causing the
db2 tests to fail.
Add such a cap to the hash db creation code.
Note that our default configuration is to use the btree code when
creating a new database, so it's unlikely that this will cause
real-world problems unless someone went out of their way to specify
use of the hash format.
ticket: 6342
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21786
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 23 Jan 2009 17:53:52 +0000 (17:53 +0000)]
In krb5_get_init_creds, null out err_reply in a case where we free it
and do not necessarily exit the loop.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21785
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 23 Jan 2009 17:45:58 +0000 (17:45 +0000)]
Always initialize the output parameter in krb5_parse_name and friends
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21784
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 23 Jan 2009 17:24:50 +0000 (17:24 +0000)]
In kadmin, free the correct item in an error case (fixes a double-free
and a memory leak).
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21783
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 23 Jan 2009 06:51:03 +0000 (06:51 +0000)]
Add some output parameter initializations n order to eliminate some
spurious Coverity defects. (Far from a comprehensive pass.)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21782
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Fri, 23 Jan 2009 05:02:07 +0000 (05:02 +0000)]
Per coding standards, don't declare variables in inner scopes in new
rcache code except when it really makes sense (option processing for
t_replay).
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21781
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 23 Jan 2009 00:46:46 +0000 (00:46 +0000)]
Include cksumtypes.h from aead.h to get struct krb5_cksumtypes (moved
in rev 21753).
Protect cksumtypes.h from multiple inclusions.
Update dependencies.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21780
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Thu, 22 Jan 2009 23:37:35 +0000 (23:37 +0000)]
fix trailing whitespace
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21779
dc483132-0cff-0310-8789-
dd5450dbe970
Tom Yu [Thu, 22 Jan 2009 23:21:11 +0000 (23:21 +0000)]
whitespace
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21778
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 22 Jan 2009 19:19:34 +0000 (19:19 +0000)]
Adapted patch from Apple: in kadmind's process_chpw_request, make sure
to free error message strings.
ticket: 6284
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21776
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 22 Jan 2009 06:34:14 +0000 (06:34 +0000)]
If USE_VALGRIND, check that source principal is defined before copying.
Initialize magic number fields of allocated name components.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21775
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 22 Jan 2009 06:30:08 +0000 (06:30 +0000)]
If USE_VALGRIND, check readability of byte string before copying
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21774
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 22 Jan 2009 06:04:10 +0000 (06:04 +0000)]
Define valgrind macros as no-ops if not USE_VALGRIND, and use unconditionally, per Danilo's suggestion
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21773
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 21 Jan 2009 19:38:12 +0000 (19:38 +0000)]
Patch from Love: when opening an existing replay cache, check more
thoroughly to prevent symlink attacks.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21770
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Wed, 21 Jan 2009 18:23:58 +0000 (18:23 +0000)]
Patch from Luke: fix error return of krb5_gss_use_kdc_context
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21768
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 20 Jan 2009 23:49:08 +0000 (23:49 +0000)]
When encoding, and compiling with -DUSE_VALGRIND, explicitly get valgrind to check the inputs
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21766
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Tue, 20 Jan 2009 22:52:15 +0000 (22:52 +0000)]
delete trailing whitespace, including insanely long 'blank' lines
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21764
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Tue, 20 Jan 2009 18:50:51 +0000 (18:50 +0000)]
In krb5_rd_rep_dce, initialize repl to NULL to avoid using its
initialized value when we take the first goto to clean_scratch.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21763
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 17 Jan 2009 01:00:22 +0000 (01:00 +0000)]
If buffer length is 0, force pointer to NULL, to keep valgrind happier when callers don't bother
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21762
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 17 Jan 2009 00:06:06 +0000 (00:06 +0000)]
patch from Luke - minor cleanup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21761
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 17 Jan 2009 00:04:49 +0000 (00:04 +0000)]
patch from Luke - fix enctype-nego enctype list setup
ticket: 6336
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21760
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Sat, 17 Jan 2009 00:02:05 +0000 (00:02 +0000)]
patch from Luke - fix sign problem
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21759
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 16 Jan 2009 23:55:01 +0000 (23:55 +0000)]
include dependencies for decoder test
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21758
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Fri, 16 Jan 2009 00:33:00 +0000 (00:33 +0000)]
Use valgrind in more cases if VALGRIND is set
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21754
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 15 Jan 2009 23:22:53 +0000 (23:22 +0000)]
Make enctype and checksumtype name mapping table types private to the
crypto library. Add a field for aliases to the record type so that
aliases don't have to be implemented by duplicating all the other
information.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21753
dc483132-0cff-0310-8789-
dd5450dbe970
Ken Raeburn [Thu, 15 Jan 2009 19:15:22 +0000 (19:15 +0000)]
Fix an additional multiple-write case noted by John, where sendauth
calls write_message twice in a row.
Add new function krb5int_write_messages, calls krb5_net_writev with
multiple messages (currently only two at a time). Use it from
krb5_write_message and krb5_sendauth.
ticket: 6339
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21752
dc483132-0cff-0310-8789-
dd5450dbe970
Greg Hudson [Thu, 15 Jan 2009 19:11:45 +0000 (19:11 +0000)]
Rework the replay cache extensions to make the hash extension records
stand alone. Otherwise, reordering of records during an expunge could
cause the hash to be applied to the wrong record.
Also add an "expunge" option to the t_replay program, and clean up some
memory-handling inconsistencies.
ticket: 1201
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21751
dc483132-0cff-0310-8789-
dd5450dbe970