krb5.git
16 years agoGet rid of some old SunOS 4 config stuff
Ken Raeburn [Wed, 8 Aug 2007 22:16:44 +0000 (22:16 +0000)]
Get rid of some old SunOS 4 config stuff

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

16 years agoPatch developed by kpkoch with style changes from jaltman
Jeffrey Altman [Wed, 8 Aug 2007 17:45:37 +0000 (17:45 +0000)]
Patch developed by kpkoch with style changes from jaltman

The size/position of the main application window is
internally updated in response to WM_MOVE messages but is
only written to the registry after a timeout period.  This
is done due to the large number of WM_MOVE messages that
can be delivered during a windows drag / resize operation
involving the user or explorer shell's tile and cascade
operations.  (or those involving third party desktop managers.)

In NIM 1.8 two different application view modes (standard
and advanced) replaced the single view mode in previous
releases.  The size/position update logic was not modified
to take into consideration the possibility that a user might
move/resize the window and then quickly toggle modes before
the new location or size were recorded to the registry.

This change ensures that when a mode change occurs, via a
call to khm_set_main_window_mode(), that the current
location/size will be written to the registry and any
outstanding timer, MW_RESIZE_TIMER, will be cleared.

The logic to save the location/size has been extracted
into the new static function main_wnd_save_sizepos().

main_wnd_save_sizepos() is only called after the application
window has been created.

ticket: 5613

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

16 years agoIn krb5_preauth_context ftable should be
Jeffrey Altman [Wed, 8 Aug 2007 05:04:45 +0000 (05:04 +0000)]
In krb5_preauth_context ftable should be
struct krb5plugin_preauth_client_ftable_v1 *
instead of
struct krb5plugin_preauth_client_ftable_v0 *

ticket: 5617

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

16 years agoOnly build pkinit plugin if a sufficiently recent version of OpenSSL is available
Ken Raeburn [Wed, 8 Aug 2007 05:00:05 +0000 (05:00 +0000)]
Only build pkinit plugin if a sufficiently recent version of OpenSSL is available

ticket: 5617

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

16 years agoRelease mechtok_out in spnego_gss_init_sec_context.
Tom Yu [Tue, 7 Aug 2007 20:13:11 +0000 (20:13 +0000)]
Release mechtok_out in spnego_gss_init_sec_context.
Reported by Markus Moeller.

ticket: 5629
version_reported: 1.6.1
target_version: 1.6.3
tags: pullup

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

16 years agomissing comma
Jeffrey Altman [Mon, 6 Aug 2007 15:19:50 +0000 (15:19 +0000)]
missing comma

The pkinit additions in revision 18973 left out a comma after the
last function in the list.  This caused builds that did not define
DESIGNATED_INITIALIZERS to break.

ticket: new

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

16 years agoKRB5_CALLCONV must be specified inside parens
Jeffrey Altman [Mon, 6 Aug 2007 15:11:03 +0000 (15:11 +0000)]
KRB5_CALLCONV must be specified inside parens

When declaring a function pointer, the function type
modifiers must be inside the parentheses.

  return-type (modifers * function-name) (parameters)

ticket: new

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

16 years agoRemove these files that were not intended to be moved onto the trunk
Kevin Coffman [Mon, 6 Aug 2007 13:57:26 +0000 (13:57 +0000)]
Remove these files that were not intended to be moved onto the trunk

ticket: 5617

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

16 years agoAdd missing @end quotation
Ken Raeburn [Sat, 4 Aug 2007 08:37:13 +0000 (08:37 +0000)]
Add missing @end quotation

ticket: 5617

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

16 years agokrb5_fcc_generate_new() doesn't work with mkstemp()
Tom Yu [Sat, 4 Aug 2007 00:02:42 +0000 (00:02 +0000)]
krb5_fcc_generate_new() doesn't work with mkstemp()

If mkstemp() is available, the new ccache file gets created but the
subsequent open(O_CREAT|O_EXCL) call fails because the file was
already created by mkstemp().  Apply patch from Apple to keep the file
descriptor open.

ticket: new
tags: pullup
target_version: 1.6.3
component: krb5-libs

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

16 years agoBased on Apple's patch, during the referrals loop, check to see if the
Tom Yu [Fri, 3 Aug 2007 21:16:19 +0000 (21:16 +0000)]
Based on Apple's patch, during the referrals loop, check to see if the
session key enctype of a returned credential for the final service is
among the enctypes explicitly selected by the application, and retry
with old_use_conf_ktypes if it is not.

ticket: 4950
tags: pullup

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

16 years agoNIM: apply does not update saved values of general identities cfg page
Jeffrey Altman [Fri, 3 Aug 2007 13:22:23 +0000 (13:22 +0000)]
NIM: apply does not update saved values of general identities cfg page

The general identities configuration panel failed to update the saved values
of the DefaultMonitor, DefaultAllowAutoRenew, and DefaultSticky options after
the "Apply" button was pressed.  This resulted in the subsequent value changed
states being incorrect.

This patch saves the values.

ticket: new
component: windows

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

16 years agoAdd internal prototype for krb5_preauth_supply_preauth_data(). Clean up
Ezra Peisach [Fri, 3 Aug 2007 02:36:26 +0000 (02:36 +0000)]
Add internal prototype for krb5_preauth_supply_preauth_data(). Clean up
some shadow variable warnings, make depend...

ticket: 5617

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

16 years agoAdd PKINIT support
Kevin Coffman [Wed, 1 Aug 2007 22:09:13 +0000 (22:09 +0000)]
Add PKINIT support

Pull up PKINIT support onto the trunk.

Changes from the version in branch users/coffman/pkinit are:

- Update the preauth plugin interface version to avoid
  conflict with any existing plugins.
- Add a pkcs11.h locally to the pkinit code rather than
  depending on opensc being installed.

ticket: new
Target_Version: 1.6.3

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

16 years agoDefine snprintf along with vsnprintf for Windows
Ken Raeburn [Wed, 1 Aug 2007 00:01:31 +0000 (00:01 +0000)]
Define snprintf along with vsnprintf for Windows

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

16 years agoDon't define vsnprintf for Windows here
Ken Raeburn [Wed, 1 Aug 2007 00:00:25 +0000 (00:00 +0000)]
Don't define vsnprintf for Windows here

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

16 years agoImplemented and tested cc_ccache_wait_for_change()
Alexandra Ellwood [Tue, 31 Jul 2007 20:23:02 +0000 (20:23 +0000)]
Implemented and tested cc_ccache_wait_for_change()

ticket: 4644
status: open

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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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