krb5.git
17 years agoSet KTFILEP field to null any time we close the file
Ken Raeburn [Fri, 27 Jul 2007 04:39:48 +0000 (04:39 +0000)]
Set KTFILEP field to null any time we close the file

ticket: 3099
status: open

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

17 years agoDebugged version of patch worked up with Luke
Ken Raeburn [Fri, 27 Jul 2007 04:39:21 +0000 (04:39 +0000)]
Debugged version of patch worked up with Luke

Adds a callback to krb5int_sendto to examine the response and indicate
whether to quit the loop or not.  For sendto_kdc, keep going if the
returned error is "service unavailable".  Updated all other callers to
pass a null function pointer, which means to always break out of the
loop on any response (the old behavior).

ticket: 3334

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

17 years agomake depend
Ken Raeburn [Fri, 27 Jul 2007 04:39:05 +0000 (04:39 +0000)]
make depend

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

17 years agoCheck for null file handle in get_next.
Ken Raeburn [Fri, 27 Jul 2007 04:38:46 +0000 (04:38 +0000)]
Check for null file handle in get_next.
Patch from Luke Howard.

ticket: 5471

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

17 years agoProvide {,v}asprintf prototypes if needed
Ken Raeburn [Fri, 27 Jul 2007 04:38:32 +0000 (04:38 +0000)]
Provide {,v}asprintf prototypes if needed

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

17 years agoCheck whether a prototype for vasprintf is needed
Ken Raeburn [Fri, 27 Jul 2007 04:38:18 +0000 (04:38 +0000)]
Check whether a prototype for vasprintf is needed

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

17 years agoIf no salt is included with the key data, set the salt length field to 0.
Ken Raeburn [Fri, 27 Jul 2007 04:37:50 +0000 (04:37 +0000)]
If no salt is included with the key data, set the salt length field to 0.
Bug report and patch from Nalin Dahyabhai.

ticket: 5545

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

17 years agoUpdated API version to 7 because we added the wait_for_change functions
Alexandra Ellwood [Wed, 25 Jul 2007 19:50:37 +0000 (19:50 +0000)]
Updated API version to 7 because we added the wait_for_change functions

ticket: 4644
status: open

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

17 years agoAdded callback support for wait_for_change functions
Alexandra Ellwood [Wed, 25 Jul 2007 19:29:39 +0000 (19:29 +0000)]
Added callback support for wait_for_change functions

ticket: 4644
status: open

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

17 years agoInclude k5-platform.h
Ken Raeburn [Sun, 22 Jul 2007 09:17:20 +0000 (09:17 +0000)]
Include k5-platform.h

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

17 years agoPull out code for looking up the current time, comparing the offset of
Ken Raeburn [Fri, 20 Jul 2007 08:51:58 +0000 (08:51 +0000)]
Pull out code for looking up the current time, comparing the offset of
a supplied timestamp against the configured maximum clock skew, and
possibly generating an error message, into a separate routine.

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

17 years agodeclare xasprintf
Ken Raeburn [Fri, 20 Jul 2007 07:59:38 +0000 (07:59 +0000)]
declare xasprintf

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

17 years agoprovide more useful error message when running kpropd on command line
Ken Raeburn [Fri, 20 Jul 2007 03:20:36 +0000 (03:20 +0000)]
provide more useful error message when running kpropd on command line

The way kpropd indicates that it's supposed to be connected to the network
is by printing out a socket error:

kpropd: getpeername: Socket operation on non-socket

With this patch, it's a bit more friendly:

./kpropd: Standard input does not appear to be a network socket.
        (Not run from inetd, and missing the -S option?)

ticket: new

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

17 years agoMade callback code generic so that change time callbacks can use it as well
Alexandra Ellwood [Thu, 19 Jul 2007 21:13:01 +0000 (21:13 +0000)]
Made callback code generic so that change time callbacks can use it as well

ticket: 4644
status: open

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

17 years agoAdded new autogenerated file to generate-files-mac target
Alexandra Ellwood [Thu, 19 Jul 2007 21:10:57 +0000 (21:10 +0000)]
Added new autogenerated file to generate-files-mac target

ticket: new

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

17 years agoccs_pipe_t needs copy and release functions
Alexandra Ellwood [Thu, 19 Jul 2007 18:32:44 +0000 (18:32 +0000)]
ccs_pipe_t needs copy and release functions

On Windows it is an allocated type.

ticket: new

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

17 years agomake depend
Ken Raeburn [Fri, 13 Jul 2007 00:12:52 +0000 (00:12 +0000)]
make depend

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

17 years agoUse [v]snprintf or asprintf instead of unchecked sprintf and separate allocation...
Ken Raeburn [Thu, 12 Jul 2007 23:35:24 +0000 (23:35 +0000)]
Use [v]snprintf or asprintf instead of unchecked sprintf and separate allocation size calculations

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

17 years agoCreate and use xasprintf akin to xmalloc, returns pointer on success or exits on...
Ken Raeburn [Thu, 12 Jul 2007 23:35:09 +0000 (23:35 +0000)]
Create and use xasprintf akin to xmalloc, returns pointer on success or exits on error

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

17 years agoRecommend snprintf/asprintf. Specify 'static inline'. Use @code for in6addr_any
Ken Raeburn [Thu, 12 Jul 2007 23:34:55 +0000 (23:34 +0000)]
Recommend snprintf/asprintf.  Specify 'static inline'.  Use @code for in6addr_any

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

17 years agoMissed a sprintf->snprintf switch
Ken Raeburn [Thu, 12 Jul 2007 23:34:41 +0000 (23:34 +0000)]
Missed a sprintf->snprintf switch

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

17 years agoAvoid unchecked sprintf in some KDC-side programs
Ken Raeburn [Thu, 12 Jul 2007 23:34:21 +0000 (23:34 +0000)]
Avoid unchecked sprintf in some KDC-side programs

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

17 years agoAvoid unchecked sprintf in some more support code
Ken Raeburn [Thu, 12 Jul 2007 23:34:04 +0000 (23:34 +0000)]
Avoid unchecked sprintf in some more support code

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

17 years agoAvoid use of unchecked sprintf in libraries. Use asprintf if the
Ken Raeburn [Thu, 12 Jul 2007 23:33:25 +0000 (23:33 +0000)]
Avoid use of unchecked sprintf in libraries.  Use asprintf if the
output buffer is allocated according to the size of data to be
written, or snprintf otherwise.

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

17 years agoNuke disabled support for ancient .klogin syntax
Ken Raeburn [Thu, 12 Jul 2007 23:32:45 +0000 (23:32 +0000)]
Nuke disabled support for ancient .klogin syntax

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

17 years agoFilled in dummy descriptions. Also, no longer errors out of test with ccIteratorEnd
Justin Anderson [Thu, 12 Jul 2007 17:57:37 +0000 (17:57 +0000)]
Filled in dummy descriptions. Also, no longer errors out of test with ccIteratorEnd

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

17 years agoAdd #ifdef WIN32 section
Kevin Koch [Thu, 12 Jul 2007 17:55:06 +0000 (17:55 +0000)]
Add #ifdef WIN32 section

TargetVersion: 1.7
Component: krb5-libs
Ticket: 5594

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

17 years ago#include of Kerberos.h removed. It can't work on Windows and looks like its not...
Kevin Koch [Thu, 12 Jul 2007 17:52:52 +0000 (17:52 +0000)]
#include of Kerberos.h removed.  It can't work on Windows and looks like its not needed on the Mac, either

TargetVersion: 1.7
Component: krb5-libs
Ticket: 5594

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

17 years agoAdded dummy Description arguments where needed. Compiles on Windows now
Kevin Koch [Thu, 12 Jul 2007 14:46:56 +0000 (14:46 +0000)]
Added dummy Description arguments where needed.  Compiles on Windows now

TargetVersion: 1.7
Component: krb5-libs
Ticket: 5594

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

17 years agoAdded dummy Description arguments where needed. Compiles on Windows now
Kevin Koch [Thu, 12 Jul 2007 14:45:47 +0000 (14:45 +0000)]
Added dummy Description arguments where needed.  Compiles on Windows now

TargetVersion: 1.7
Component: krb5-libs
Ticket: 5594

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

17 years agoTargetVersion: 1.7
Kevin Koch [Wed, 11 Jul 2007 20:31:54 +0000 (20:31 +0000)]
TargetVersion: 1.7
Component: krb5-libs
Ticket: new
Subj: Work on compiling the CCAPI test suite on Windows.

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

17 years agomake depend
Ken Raeburn [Tue, 10 Jul 2007 07:02:08 +0000 (07:02 +0000)]
make depend

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

17 years agoGet rid of .o files when cleaning
Ken Raeburn [Tue, 10 Jul 2007 06:55:08 +0000 (06:55 +0000)]
Get rid of .o files when cleaning

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

17 years agoSet PERL
Ken Raeburn [Thu, 5 Jul 2007 19:10:52 +0000 (19:10 +0000)]
Set PERL

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

17 years agoMake error_map.h depend on ktemplate.pm too
Ken Raeburn [Wed, 4 Jul 2007 05:58:12 +0000 (05:58 +0000)]
Make error_map.h depend on ktemplate.pm too

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

17 years agoAdd a note at the start of the output reminding the reader that it's a generated...
Ken Raeburn [Wed, 4 Jul 2007 05:57:30 +0000 (05:57 +0000)]
Add a note at the start of the output reminding the reader that it's a generated file

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

17 years agoHandle 'Credentials cache file <path> not found'
Ken Raeburn [Wed, 4 Jul 2007 05:47:49 +0000 (05:47 +0000)]
Handle 'Credentials cache file <path> not found'

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

17 years agogss krb5 mech enhanced error messages
Ken Raeburn [Wed, 4 Jul 2007 05:46:24 +0000 (05:46 +0000)]
gss krb5 mech enhanced error messages

Save detailed error messages (usually from the krb5 library) in
per-thread storage, mapping each error code to the most recently
produced message for it.  Return the message from display_status.

Currently not implemented for a few cases where the krb5 mechanism
returns a minor status code of 0, or another value different from the
libkrb5 error code.

Other functions are available to store a generic string or formatted
message, but aren't used much at present.

Tested with these errors in context establishment:
 * missing ccache (libkrb5 shows pathname if FILE: type)
 * missing keytab (libkrb5 shows pathname if FILE: type)
 * server principal unknown (libkrb5 shows server principal)

ticket: new

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

17 years agoUse strdup
Ken Raeburn [Wed, 4 Jul 2007 04:27:32 +0000 (04:27 +0000)]
Use strdup

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

17 years agoUse global spawn_id
Ken Raeburn [Wed, 4 Jul 2007 04:26:14 +0000 (04:26 +0000)]
Use global spawn_id

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

17 years agoPerl code for generating "map" routines from a common template with
Ken Raeburn [Wed, 4 Jul 2007 04:06:54 +0000 (04:06 +0000)]
Perl code for generating "map" routines from a common template with
supplied type info.

* ktemplate.pm: Code for parsing a command line and writing out a
supplied template with substitutions.
* gen-map.pl: Parameter info and template for "map" type.

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

17 years agoAdd a new per-thread datum for error message info in gssapi krb5 mech
Ken Raeburn [Wed, 4 Jul 2007 04:03:44 +0000 (04:03 +0000)]
Add a new per-thread datum for error message info in gssapi krb5 mech

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

17 years agoSome handy debugging code for gssapi errors in credential acquisition; currently...
Ken Raeburn [Wed, 4 Jul 2007 04:00:36 +0000 (04:00 +0000)]
Some handy debugging code for gssapi errors in credential acquisition; currently disabled

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

17 years agoIf error is KDC_ERR_S_PRINCIPAL_UNKNOWN, report the server name
Ken Raeburn [Wed, 4 Jul 2007 03:51:45 +0000 (03:51 +0000)]
If error is KDC_ERR_S_PRINCIPAL_UNKNOWN, report the server name

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

17 years agoIn file-not-found case, report the filename sought
Ken Raeburn [Wed, 4 Jul 2007 03:49:52 +0000 (03:49 +0000)]
In file-not-found case, report the filename sought

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

17 years agoRemove debugging message accidentally left in
Ken Raeburn [Wed, 4 Jul 2007 01:58:06 +0000 (01:58 +0000)]
Remove debugging message accidentally left in

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

17 years agoSave a detailed message for FCC_NOFILE including the file name
Ken Raeburn [Wed, 4 Jul 2007 01:49:17 +0000 (01:49 +0000)]
Save a detailed message for FCC_NOFILE including the file name

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

17 years agoWhen skipping debugging '-->' data, only take through the end of the line
Ken Raeburn [Wed, 4 Jul 2007 01:04:13 +0000 (01:04 +0000)]
When skipping debugging '-->' data, only take through the end of the line

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

17 years agoReport in make output when updating OBJS.ST/SH/PF
Ken Raeburn [Tue, 3 Jul 2007 22:51:53 +0000 (22:51 +0000)]
Report in make output when updating OBJS.ST/SH/PF

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

17 years agoTell Emacs to use C mode for this file
Ken Raeburn [Tue, 3 Jul 2007 19:09:20 +0000 (19:09 +0000)]
Tell Emacs to use C mode for this file

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

17 years agoTest for va_copy should be a link test, not a compile test
Ken Raeburn [Mon, 2 Jul 2007 19:13:05 +0000 (19:13 +0000)]
Test for va_copy should be a link test, not a compile test

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

17 years agoInclude k5-platform.h
Ken Raeburn [Mon, 2 Jul 2007 19:11:53 +0000 (19:11 +0000)]
Include k5-platform.h

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

17 years agoCheck for error indication from localtime.
Ken Raeburn [Fri, 29 Jun 2007 02:37:57 +0000 (02:37 +0000)]
Check for error indication from localtime.
In a few cases this means changing internal function signatures to
allow for passing back the error indication up the call stack.

Thanks to Domagoj Babic for pointing out the possible null pointer
dereferences that would result if localtime fails.

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

17 years agoDefine a localtime_r wrapper around localtime if the system doesn't
Ken Raeburn [Fri, 29 Jun 2007 02:32:02 +0000 (02:32 +0000)]
Define a localtime_r wrapper around localtime if the system doesn't
provide localtime_r, instead of handling it in-line.  Check for error
indication from localtime_r.  Call localtime_r only once instead of
each time around the loop.

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

17 years agoUnder gcc, declare k5_v?asprintf with format attribute
Ken Raeburn [Fri, 29 Jun 2007 01:55:08 +0000 (01:55 +0000)]
Under gcc, declare k5_v?asprintf with format attribute

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

17 years agoAttach format attributes to declarations of various message-formatting
Ken Raeburn [Fri, 29 Jun 2007 01:01:24 +0000 (01:01 +0000)]
Attach format attributes to declarations of various message-formatting
routines under gcc.  In a couple of routines, hard-code the preference
for using the vsnprintf paths instead of list-of-int-arguments hacks
now that we're assuming vsnprintf is available in other places.

Installed headers affected:
  com_err.h (com_err, com_err_va)
  ss.h (ss_error)
  krb5.h (krb5_set_error_message, krb5_vset_error_message)

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

17 years agoEven though the passed string never has a %, use an explicit %s format string in...
Ken Raeburn [Fri, 29 Jun 2007 00:31:10 +0000 (00:31 +0000)]
Even though the passed string never has a %, use an explicit %s format string in fprintf call to make analysis simpler

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

17 years agoIgnore __attribute__
Ken Raeburn [Fri, 29 Jun 2007 00:28:32 +0000 (00:28 +0000)]
Ignore __attribute__

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

17 years agoCheck for null pointer returns when allocating storage.
Ken Raeburn [Thu, 28 Jun 2007 23:36:51 +0000 (23:36 +0000)]
Check for null pointer returns when allocating storage.
Clean up some memory leaks in out-of-memory error paths.
Use strdup and asprintf when appropriate.

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

17 years agoUpdate mkstemp and export-list handling for Windows
Ken Raeburn [Thu, 28 Jun 2007 00:09:34 +0000 (00:09 +0000)]
Update mkstemp and export-list handling for Windows

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

17 years agoImplement S_ISDIR from S_IFMT or _S_IFMT if necessary (e.g., on Windows)
Ken Raeburn [Thu, 28 Jun 2007 00:08:21 +0000 (00:08 +0000)]
Implement S_ISDIR from S_IFMT or _S_IFMT if necessary (e.g., on Windows)

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

17 years agoFor Win32 environment, define CAN_COPY_VA_LIST, and define an inline
Ken Raeburn [Wed, 27 Jun 2007 23:43:04 +0000 (23:43 +0000)]
For Win32 environment, define CAN_COPY_VA_LIST, and define an inline
version of vsnprintf using the MS versions.  (Apparently no need for
plain snprintf just yet.)

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

17 years agoIf mkstemp is missing, define the mkstemp macro is k5-platform.h, not autoconf.h
Ken Raeburn [Wed, 27 Jun 2007 23:22:36 +0000 (23:22 +0000)]
If mkstemp is missing, define the mkstemp macro is k5-platform.h, not autoconf.h

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

17 years ago* v4rcp.c (error): Use stdarg version always. Call vsnprintf instead of vsprintf.
Ken Raeburn [Tue, 26 Jun 2007 23:04:09 +0000 (23:04 +0000)]
* v4rcp.c (error): Use stdarg version always.  Call vsnprintf instead of vsprintf.
(strsave): Call strdup.

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

17 years ago* v4rcp.c (kstream_write): Allocate buffer space if it hasn't been
Ken Raeburn [Tue, 26 Jun 2007 22:58:46 +0000 (22:58 +0000)]
* v4rcp.c (kstream_write): Allocate buffer space if it hasn't been
allocated, in the encrypting case, even if outlen is zero.  While I
don't believe this can ever happen, it requires careful examination of
lots of code paths to figure it out.  This change doesn't fix a
serious bug, but makes the analysis simple.  Also, don't bother with
separate code paths for malloc vs realloc depending on the previous
values; we can just use realloc always.

Thanks to Domagoj Babic for pointing out the (false but
understandable) null-pointer problem.

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

17 years agoCheck malloc return for null in kstream_create_* instead of
Ken Raeburn [Tue, 26 Jun 2007 22:50:36 +0000 (22:50 +0000)]
Check malloc return for null in kstream_create_* instead of
unconditionally dereferencing.  Thanks to Domagoj Babic for finding
the bug.

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

17 years agofix MITKRB5-SA-2007-005 [CVE-2007-2798/VU#554257]
Tom Yu [Tue, 26 Jun 2007 18:08:35 +0000 (18:08 +0000)]
fix MITKRB5-SA-2007-005 [CVE-2007-2798/VU#554257]

Truncate the principal names when logging a rename operation to avoid
a stack buffer overflow.

ticket: new
target_version: 1.6.2
tags: pullup

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

17 years agofix MITKRB5-SA-2007-004 [CVE-2007-2442/VU#356961, CVE-2007-2443/VU#365313]
Tom Yu [Tue, 26 Jun 2007 18:08:20 +0000 (18:08 +0000)]
fix MITKRB5-SA-2007-004 [CVE-2007-2442/VU#356961, CVE-2007-2443/VU#365313]

CVE-2007-2442/VU#356961: The RPC library can free an uninitialized
pointer.  This may lead to execution of arbitrary code.

CVE-2007-2443/VU#365313: The RPC library can write past the end of a
stack buffer.  This may (but is unlikely to) lead to execution of
arbitrary code.

ticket: new
target_version: 1.6.2
tags: pullup

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

17 years agoUpdate configuration schema in ui\uiconfig.csv to include additional
Jeffrey Altman [Fri, 22 Jun 2007 19:06:44 +0000 (19:06 +0000)]
Update configuration schema in ui\uiconfig.csv to include additional
documentation for settings and and remove unused values.

ticket: 5584

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

17 years agoThe new credentials window now applies Windows XP theme settings to
Jeffrey Altman [Fri, 22 Jun 2007 19:05:44 +0000 (19:05 +0000)]
The new credentials window now applies Windows XP theme settings to
dialog panels that are hosted within tab controls.

ticket: 5584

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

17 years ago1. Add a '--minimized' option to start NIM in minimized mode
Jeffrey Altman [Fri, 22 Jun 2007 19:04:54 +0000 (19:04 +0000)]
1. Add a '--minimized' option to start NIM in minimized mode

2. If the NIM window is requested to open in a minimized state, keep
   the window hidden until there's a request to show it.

ticket: 5584

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

17 years ago1. Use the debug CRT versions of the memory allocation functions in
Jeffrey Altman [Fri, 22 Jun 2007 19:03:57 +0000 (19:03 +0000)]
1. Use the debug CRT versions of the memory allocation functions in
   util\perfstat.c.  These functions allow associating file and line
   numbers with each allocation.

2. Perform a heap verification periodically to check for heap
   corruption in the debug build when using util\perfstat.c to manage
   memory allocations.

3. Change wcscmp() to _wcscmp() for compatibility in util\perfstat.h

ticket: 5584

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

17 years ago1. Fix a malformed line in ui\lang\en_us\khapp.rc in a TEXTINCLUDE
Jeffrey Altman [Fri, 22 Jun 2007 19:02:50 +0000 (19:02 +0000)]
1. Fix a malformed line in ui\lang\en_us\khapp.rc in a TEXTINCLUDE
   section.

2. Update the dialog template for the "About" dialog to change the
   size of the dialog box and sort the modules list.

ticket: 5584

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

17 years agoNetIDMgr:
Jeffrey Altman [Fri, 22 Jun 2007 19:01:51 +0000 (19:01 +0000)]
NetIDMgr:

Product version => 1.3.0.0
API version     => 9

ticket: 5584

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

17 years agoBe more aggressive about forcing the new credentials dialog to the
Jeffrey Altman [Fri, 22 Jun 2007 19:00:27 +0000 (19:00 +0000)]
Be more aggressive about forcing the new credentials dialog to the
top.

Many applications call GSSAPI functions from the main GUI thread.
Doing so blocks the window message pump for that application.  When
the GSSAPI call results in the new credentials dialog being displayed,
it will be unable to bring itself to the top and grab the user input
focus because the foreground window is not responding.  This patch
makes the new credentials window a top-most window at creation time
that results in it being created at the top of the Z-order.  It can
then flash the window to indicate that it requires user attention.

ticket: 5584

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

17 years agoIf the new credentials window is in the advanced mode and the user
Jeffrey Altman [Fri, 22 Jun 2007 18:59:35 +0000 (18:59 +0000)]
If the new credentials window is in the advanced mode and the user
tries to switch back to basic mode, we should set the active panel to
the identity selector before switching since the basic mode only
supports the identity selector panel.

ticket: 5584

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

17 years agoDon't assume that WM_DESTROY is the last message to be received by a
Jeffrey Altman [Fri, 22 Jun 2007 18:58:09 +0000 (18:58 +0000)]
Don't assume that WM_DESTROY is the last message to be received by a
window.  Since the child windows are still alive and kicking by the
time the parent receives WM_DESTROY, it's still possible to receive
other messages after WM_DESTROY.

If we free any window specific data when handling WM_DESTROY, we
should reset the window data field as well, and check if we have a
valid pointer when retrieving the window data field later.

ticket: 5584

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

17 years agoThe clean:: target of plugins\common\Makefile should reference the
Jeffrey Altman [Fri, 22 Jun 2007 18:56:56 +0000 (18:56 +0000)]
The clean:: target of plugins\common\Makefile should reference the
target directories using the symbolic names rather than hard coded
paths.

ticket: 5584

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

17 years ago1. When freeing a message type object, it should also be removed from
Jeffrey Altman [Fri, 22 Jun 2007 18:55:46 +0000 (18:55 +0000)]
1. When freeing a message type object, it should also be removed from
   the all_msg_types list.

2. When a type handler is being removed from a message type, we
   shouldn't re-create the message type object if it has already been
   destroyed.

ticket: 5584

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

17 years ago. Fix formatting in kherr.c
Jeffrey Altman [Fri, 22 Jun 2007 18:54:49 +0000 (18:54 +0000)]
. Fix formatting in kherr.c

2. The FormatMessage() call needs special handling for 64 bit
   platforms.  Add a compile time check for now until we figure out
   what to do.

3. Remove unused code from kherr.c.

4. Correct bad references to typedefs.  kherr_severity and
   kherr_suggestion were sometimes referenced as 'enum kherr_severity'
   and 'enum kherr_suggestion' even though they are typedefs.

ticket: 5584

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

17 years agoAdd new notification flags KHERR_CTX_NEWCHILD, KHERR_CTX_FOLDCHILD,
Jeffrey Altman [Fri, 22 Jun 2007 18:53:45 +0000 (18:53 +0000)]
Add new notification flags KHERR_CTX_NEWCHILD, KHERR_CTX_FOLDCHILD,
KHERR_CTX_PROGRESS for listeners of error context events to enable
them to listen for child context events and progress updates.

ticket: 5584

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

17 years agoError context objects should be verified by checking the magic number
Jeffrey Altman [Fri, 22 Jun 2007 18:52:40 +0000 (18:52 +0000)]
Error context objects should be verified by checking the magic number
in addition to checking if the pointer to the object is valid.

ticket: 5584

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

17 years agoEach error context in NIM can maintain a progress counter to indicate
Jeffrey Altman [Fri, 22 Jun 2007 18:51:34 +0000 (18:51 +0000)]
Each error context in NIM can maintain a progress counter to indicate
the progress of the operation.  The progress counter for a context
that contains child contexts should be computed by adding the progress
counters of its children.  This update corrects the behavior of
kherr_get_progress() and kherr_get_progress_i() to take child contexts
into account.

In addition, since the progress counter of a context now depend on the
progress counters of its children, kherr_set_progress() will send
progress change notifications for any parent context as well.

ticket: 5584

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

17 years agoUpdate developer documentation
Jeffrey Altman [Fri, 22 Jun 2007 18:50:26 +0000 (18:50 +0000)]
Update developer documentation

These updates reflect changes that were made to the new credentials
acquisition process and add information to incomplete API
documentation.

ticket: 5584

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

17 years agoRemove unused file Makefile.w2k from the uilib directory
Jeffrey Altman [Fri, 22 Jun 2007 18:49:30 +0000 (18:49 +0000)]
Remove unused file Makefile.w2k from the uilib directory

ticket: 5584

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

17 years agoAll exports in nidmgr32.dll are declared as __declspec(dllexport)
Jeffrey Altman [Fri, 22 Jun 2007 18:47:16 +0000 (18:47 +0000)]
All exports in nidmgr32.dll are declared as __declspec(dllexport)
using the KHMEXP macro in the header files.  However, since the same
header files are used to declare imports when building applications
and plug-ins that use nidmgr32.dll, the KHMEXP macro should switch to
__declspec(import) so that the relevant import table entries are
created.

To make this switch, the source files that go into nidmgr32.dll are
compiled with the special macro _NIMLIB_ defined that indicates that
the KHMEXP should expand to __declspec(dllexport).  In the absence of
this macro, KHMEXP will expand to __declspec(dllimport).

ticket: 5584

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

17 years agoFix typo in yesterday's change (u_int_8_t -> u_int8_t)
Ken Raeburn [Wed, 20 Jun 2007 22:00:05 +0000 (22:00 +0000)]
Fix typo in yesterday's change (u_int_8_t -> u_int8_t)

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

17 years agoFix typo and add verbosity in function-capable shell test
Ken Raeburn [Wed, 20 Jun 2007 06:54:59 +0000 (06:54 +0000)]
Fix typo and add verbosity in function-capable shell test

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

17 years agoRemove check-ac-syms rules
Ken Raeburn [Wed, 20 Jun 2007 06:11:54 +0000 (06:11 +0000)]
Remove check-ac-syms rules

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

17 years agoConfigure libdb2 in top-level configure script
Ken Raeburn [Wed, 20 Jun 2007 05:47:59 +0000 (05:47 +0000)]
Configure libdb2 in top-level configure script

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

17 years agoAdd the libdb2 type-existence tests to the top-level configure script.
Ken Raeburn [Wed, 20 Jun 2007 05:18:59 +0000 (05:18 +0000)]
Add the libdb2 type-existence tests to the top-level configure script.
Replace the generated header files in db2 with static ones that
include autoconf.h and make decisions based on the macros defined
there.  Omit some tests that test for things we assume now, like
"const" working and "size_t" being defined.  Update dependencies.

The libdb2 configure script now generates no header files.

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

17 years agoUse k5-platform.h instead of local configure to find mkstemp
Ken Raeburn [Wed, 20 Jun 2007 04:29:06 +0000 (04:29 +0000)]
Use k5-platform.h instead of local configure to find mkstemp

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

17 years agoAdd 'make depend' capability, and dependencies
Ken Raeburn [Wed, 20 Jun 2007 04:13:59 +0000 (04:13 +0000)]
Add 'make depend' capability, and dependencies

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

17 years agoWe have code elsewhere that assumes the existence of memmove and
Ken Raeburn [Wed, 20 Jun 2007 04:06:02 +0000 (04:06 +0000)]
We have code elsewhere that assumes the existence of memmove and
strerror, and it builds everywhere we care about.  So punt the
substitute versions and everything else from libdb2/clib.

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

17 years agoupdate dependencies
Ken Raeburn [Wed, 20 Jun 2007 03:55:07 +0000 (03:55 +0000)]
update dependencies

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

17 years agoMove (BSD-licensed) mkstemp from libdb2 to libkrb5support, and rename
Ken Raeburn [Wed, 20 Jun 2007 03:53:37 +0000 (03:53 +0000)]
Move (BSD-licensed) mkstemp from libdb2 to libkrb5support, and rename
the function to krb5int_mkstemp.  Generate the symbol export list for
libkrb5support at build time.

Declare krb5int_mkstemp in k5-platform.h.
Change cc_file.c to use mkstemp unconditionally.

Make libdb2.so (built for testing only) link against the
libkrb5support, and use krb5int_mkstemp if mkstemp is not available.

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

17 years agoinitial draft contribution guidelines
Tom Yu [Wed, 20 Jun 2007 01:51:52 +0000 (01:51 +0000)]
initial draft contribution guidelines

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

17 years agoset svn:eol-style to native for *.[ch]
Ken Raeburn [Wed, 20 Jun 2007 01:19:59 +0000 (01:19 +0000)]
set svn:eol-style to native for *.[ch]

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

17 years agoprovide asprintf functionality for internal use
Ken Raeburn [Wed, 20 Jun 2007 01:09:10 +0000 (01:09 +0000)]
provide asprintf functionality for internal use

I plan to use asprintf in some gssapi error-message management
routines, so let's make sure we have the functionality available,
implementing it locally if necessary.

This implementation assumes vsnprintf is available, an assumption that
the support library is already making at the moment.

Since this implementation requires calling vsnprintf potentially
multiple times with the same va_list, use va_copy if it's available,
or provide a hack version (which should work okay if va_list is a
scalar or array type that requires no other special handling, and if
va_end does nothing interesting, which is usually the case) if the
compiler doesn't provide it.

I also changed a couple bits of code to use asprintf, to make sure we
exercise our implementation in testing.

(C99 requires vsnprintf and va_copy; vasprintf is a GNU/BSD extension,
but an oh so useful one....)

* configure.in: Check for va_copy, or if va_list objects can be simply
assigned.  Define HAS_VA_COPY and CAN_COPY_VA_LIST as appropriate.
* include/k5-platform.h: Define a va_copy macro if the compiler
doesn't provide it.

* include/k5-platform.h: If vsnprintf isn't available from the OS,
abort compilation.  If vasprintf isn't available from the OS, provide
k5_{v,}asprintf based on vsnprintf and define {v,}asprintf macros.
* lib/krb5/keytab/t_keytab.c (do_test): Use asprintf.
* util/support/errors.c (krb5int_vset_error): Use asprintf
unconditionally.

ticket: new

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

17 years agoset eol-style and mime-type properties
Ken Raeburn [Tue, 19 Jun 2007 23:45:48 +0000 (23:45 +0000)]
set eol-style and mime-type properties

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