krb5.git
17 years agofix CVE-2007-5971: double-free in gss_krb5int_make_seal_token_v3()
Tom Yu [Fri, 14 Dec 2007 05:01:07 +0000 (05:01 +0000)]
fix CVE-2007-5971: double-free in gss_krb5int_make_seal_token_v3()

ticket: 5856
target_version: 1.6.4
tags: pullup

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

17 years agofix CVE-2007-5972: double fclose() in krb5_def_store_mkey()
Tom Yu [Fri, 14 Dec 2007 04:38:42 +0000 (04:38 +0000)]
fix CVE-2007-5972: double fclose() in krb5_def_store_mkey()

ticket: 5857
target_version: 1.6.4
tags: pullup

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

17 years agofix CVE-2007-5971: free of non-heap pointer in gss_indicate_mechs()
Tom Yu [Fri, 14 Dec 2007 04:38:28 +0000 (04:38 +0000)]
fix CVE-2007-5971: free of non-heap pointer in gss_indicate_mechs()

ticket: 5856
tags: pullup
target_version: 1.6.4

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

17 years agoRemove Mac-specific bit unused in KfM that causes test failures now
Ken Raeburn [Fri, 14 Dec 2007 02:48:52 +0000 (02:48 +0000)]
Remove Mac-specific bit unused in KfM that causes test failures now
under Darwin UNIXy builds.

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

17 years agoKFW: BUG: KRB5CRED: Set identity data before sending notification
Jeffrey Altman [Wed, 12 Dec 2007 22:32:19 +0000 (22:32 +0000)]
KFW: BUG: KRB5CRED: Set identity data before sending notification

Call tc_set_ident_data() before kcdb_credset_collect().  Make sure the
identity data is set before the credentials change notification is broadcast.

ticket: new
component: windows
tags: pullup

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

17 years agocopy correct key for lucid context acceptor_subkey
Kevin Coffman [Wed, 12 Dec 2007 14:10:33 +0000 (14:10 +0000)]
copy correct key for lucid context acceptor_subkey

Copy the correct key (acceptor_subkey) to lucid context's acceptor_subkey.

ticket: new
component: krb5-libs
Tags: pullup

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

17 years agoKFW BUG: WIX: 64-bit installer attempts to uninstall 32-bit NSIS
Jeffrey Altman [Wed, 12 Dec 2007 03:45:42 +0000 (03:45 +0000)]
KFW BUG: WIX: 64-bit installer attempts to uninstall 32-bit NSIS

The 64-bit MSI must examine Win64 registry keys and not the 32-bit registry
keys which is where the 32-bit NSIS installation will be detected.

ticket: new
component: windows
tags: pullup

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

17 years agoRemove no-longer-needed include of Kerberos.h
Kevin Koch [Mon, 3 Dec 2007 14:52:11 +0000 (14:52 +0000)]
Remove no-longer-needed include of Kerberos.h

TargetVersion: 1.7
Component: krb5-libs
Ticket: 5594

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

17 years agoConditionalize #pragma mark with TARGET_OS_MAC; remove any Windows #pragma disable
Kevin Koch [Wed, 21 Nov 2007 14:05:43 +0000 (14:05 +0000)]
Conditionalize #pragma mark with TARGET_OS_MAC; remove any Windows #pragma disable

TargetVersion: 1.7
Component: krb5-libs
Ticket: 5594

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

17 years agoDisable warnings about #pragma mark
Kevin Koch [Tue, 20 Nov 2007 16:46:22 +0000 (16:46 +0000)]
Disable warnings about #pragma mark

TargetVersion: 1.7
Component: krb5-libs
Ticket: 5594
Subj: Tweaks for 1.7 build on Windows.

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

17 years agoOn Windows, UINT64_MAX isn't defined; define it
Kevin Koch [Thu, 15 Nov 2007 14:14:15 +0000 (14:14 +0000)]
On Windows, UINT64_MAX isn't defined; define it

TargetVersion: 1.7
Component: krb5-libs
Ticket: 5594

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

17 years agoOn Windows, UINT64_MAX isn't defined; get it from k5-platform.h
Kevin Koch [Thu, 15 Nov 2007 14:11:31 +0000 (14:11 +0000)]
On Windows, UINT64_MAX isn't defined; get it from k5-platform.h

TargetVersion: 1.7
Component: krb5-libs
Ticket: 5594

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

17 years agoThe khm_show_main_window() function is no longer called
Jeffrey Altman [Wed, 14 Nov 2007 22:34:53 +0000 (22:34 +0000)]
The khm_show_main_window() function is no longer called
at startup with khm_nCmdShow == SW_SHOWMINIMIZED in order to
hide the main application by calling khm_hide_main_window().
Instead, the main application window is simply never shown.

As a result, khm_show_main_window() needs to respond to
khm_nCmdShow == SW_SHOWMINIMIZED not by hiding the window
but by changing the khm_nCmdShow state to SW_SHOW and then
calling ShowWindow().

This change will address the problem whereby "Show NIM Window"
had to be triggered twice by the user when the process
was started in a minimized state.

ticket: 5842

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

17 years agoInclude k5-platform.h
Ken Raeburn [Sun, 4 Nov 2007 04:37:16 +0000 (04:37 +0000)]
Include k5-platform.h

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

17 years agoUse 0 and 1 instead of relying on TRUE/FALSE being defined everywhere
Ken Raeburn [Thu, 1 Nov 2007 08:18:23 +0000 (08:18 +0000)]
Use 0 and 1 instead of relying on TRUE/FALSE being defined everywhere

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

17 years agoConditionalize "#pragma mark" on TARGET_OS_MAC.
Ken Raeburn [Thu, 1 Nov 2007 08:08:32 +0000 (08:08 +0000)]
Conditionalize "#pragma mark" on TARGET_OS_MAC.
Don't use "#pragma warning" when not on Windows.  (In fact, the just-added uses
shouldn't be needed if the above conditional is done right, so one of them was
deleted.)

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

17 years agoOn Windows, disable a pragma warning; add comment about what a pipe is
Kevin Koch [Wed, 31 Oct 2007 17:16:56 +0000 (17:16 +0000)]
On Windows, disable a pragma warning; add comment about what a pipe is

TargetVersion: 1.7
Component: krb5-libs
Ticket: 5594
Subj: Work on compiling the CCAPI test suite on Windows.

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

17 years agoSet GNU warning options in CFLAGS and CXXFLAGS separately, avoiding options
Ken Raeburn [Wed, 31 Oct 2007 11:37:57 +0000 (11:37 +0000)]
Set GNU warning options in CFLAGS and CXXFLAGS separately, avoiding options
in CXXFLAGS that G++ doesn't support.

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

17 years agoAdd some dependencies
Ken Raeburn [Wed, 31 Oct 2007 07:23:08 +0000 (07:23 +0000)]
Add some dependencies

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

17 years agoCorrect the filenames in comments
Ken Raeburn [Wed, 31 Oct 2007 07:05:40 +0000 (07:05 +0000)]
Correct the filenames in comments

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

17 years agoTest more installed headers for C++ compatibility
Ken Raeburn [Wed, 31 Oct 2007 06:59:11 +0000 (06:59 +0000)]
Test more installed headers for C++ compatibility

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

17 years agoSet CXX_LINK, CXX_LINK_STATIC, and CXX_LINK_SHARED, parallel to CC_ versions.
Ken Raeburn [Wed, 31 Oct 2007 06:07:44 +0000 (06:07 +0000)]
Set CXX_LINK, CXX_LINK_STATIC, and CXX_LINK_SHARED, parallel to CC_ versions.
Assumes for now that libpath, rpath, ldflags, pthread flags and such
apply to both C and C++ compilers.

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

17 years agoUse ac_cv_c_compiler_gnu instead of copying it to krb5_cv_prog_gcc
Ken Raeburn [Wed, 31 Oct 2007 05:40:23 +0000 (05:40 +0000)]
Use ac_cv_c_compiler_gnu instead of copying it to krb5_cv_prog_gcc

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

17 years agoInclude k5-platform.h
Ken Raeburn [Tue, 30 Oct 2007 23:33:46 +0000 (23:33 +0000)]
Include k5-platform.h

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

17 years agoDon't use GNU make features
Ken Raeburn [Tue, 30 Oct 2007 23:27:09 +0000 (23:27 +0000)]
Don't use GNU make features

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

17 years agoDefine htonll, ntohll using k5_ versions if needed. Drop Mac-specific bits
Ken Raeburn [Mon, 29 Oct 2007 23:38:11 +0000 (23:38 +0000)]
Define htonll, ntohll using k5_ versions if needed.  Drop Mac-specific bits

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

17 years agoOn Mac, include TargetConditionals.h and architecture/byte_order.h,
Ken Raeburn [Mon, 29 Oct 2007 23:30:49 +0000 (23:30 +0000)]
On Mac, include TargetConditionals.h and architecture/byte_order.h,
and use OSSwapInt{16,32,64} for SWAP* macros.

Add k5_htonll and k5_ntohll functions.  (Implementation assumes the
swapping is its own reverse on all platforms we support.)

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

17 years agoTest that C++ code can use our installed headers
Ken Raeburn [Mon, 29 Oct 2007 22:00:53 +0000 (22:00 +0000)]
Test that C++ code can use our installed headers

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

17 years agoCredentialsCache.h needs uint32_t and other definitions which aren't in Windows....
Kevin Koch [Mon, 29 Oct 2007 15:44:46 +0000 (15:44 +0000)]
CredentialsCache.h needs uint32_t and other definitions which aren't in Windows.  Get the definitions from win-mac.h

TargetVersion: 1.7
Component: krb5-libs
Ticket: 5594
Subj: Work on compiling the CCAPI test suite on Windows.

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

17 years agoCheckpoint some incomplete UNIX makefiles
Ken Raeburn [Fri, 26 Oct 2007 23:24:04 +0000 (23:24 +0000)]
Checkpoint some incomplete UNIX makefiles

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

17 years agodelete unused configure.in
Tom Yu [Tue, 23 Oct 2007 21:38:49 +0000 (21:38 +0000)]
delete unused configure.in

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

17 years agoInclude time.h for time()
Alexandra Ellwood [Tue, 23 Oct 2007 19:42:05 +0000 (19:42 +0000)]
Include time.h for time()

ticket: new

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

17 years agoSet close-on-exec flag in most places where file descriptors are
Ken Raeburn [Mon, 22 Oct 2007 19:18:53 +0000 (19:18 +0000)]
Set close-on-exec flag in most places where file descriptors are
opened in our libraries (in case another application thread spawns a
new process) and in the KDC programs (in case a plugin library spawns
a new process).

Checked calls to: open fopen THREEPARAMOPEN mkstemp socket accept dup
dup2 pipe.  In: util lib plugins kdc kadmin/server krb524.

The various programs are less critical than the libraries, as any
well-written plugin that spawns a new process should close all file
descriptors it doesn't need to communicate with the new process.

This approach also isn't bulletproof, as the call to set the
close-on-exec flag is necessarily a separate call from creating the
file descriptor, and the fork call could happen in between them.  So
plugins should be careful regardless of this patch; it will only
reduce the window of potential lossage should a plugin be poorly
written.  (AFAIK there are currently no plugins that spawn processes
where this would be a problem.)

Update dependencies.

ticket: 5561

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

17 years agoCheck dependencies for fakeka.c
Ken Raeburn [Mon, 22 Oct 2007 18:26:14 +0000 (18:26 +0000)]
Check dependencies for fakeka.c

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

17 years agoDon't leak fd on fork error
Ken Raeburn [Sat, 20 Oct 2007 00:48:40 +0000 (00:48 +0000)]
Don't leak fd on fork error

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

17 years agoKFW: BUG: WIX: Beta value hard coded
Jeffrey Altman [Thu, 18 Oct 2007 15:22:43 +0000 (15:22 +0000)]
KFW: BUG: WIX: Beta value hard coded

The beta variable value was inadvertantly committed as part of
ticket 5820 (Revision 20117).  The build script needs to
export this value when appropriate.

ticket: new
component: windows
tags: pullup
target: 1.6.3

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

17 years agoReject socket fds > FD_SETSIZE
Ken Raeburn [Thu, 18 Oct 2007 00:14:01 +0000 (00:14 +0000)]
Reject socket fds > FD_SETSIZE

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

17 years agofixed mispelling in kadmin error message
Alexandra Ellwood [Tue, 16 Oct 2007 20:39:06 +0000 (20:39 +0000)]
fixed mispelling in kadmin error message

ticket: new

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

17 years agoThere appears to be a bug either in the WiX engine or the Windows Installer 3.1.
Jeffrey Altman [Fri, 12 Oct 2007 23:08:30 +0000 (23:08 +0000)]
There appears to be a bug either in the WiX engine or the Windows Installer 3.1.
The "File" type on the Registry Search property is supposed to provide the full
path name.  Instead, we are being given just the directory as if it were being
processed with the "Directory" type.

We can avoid this for a REG_SZ value by using the "Raw" type because we are
sure that the string is not going to begin with a '#' character.

Because the full path was not being obtained for the UPGRADENSIS property, the
Uninstall routine was unable to CreateProcess() the uninstall program.

This commit also includes addition debugging in the NSIS Uninstall custom
handler to report the path and the GetLastError() value when the uninstall
fails.  This will be logged in the msiexec log file and displayed in a
MessageBox.

ticket: 5820

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

17 years agoSet the Shortcut string to match the base product name
Jeffrey Altman [Fri, 12 Oct 2007 19:18:04 +0000 (19:18 +0000)]
Set the Shortcut string to match the base product name

ticket: 5820

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

17 years agoKFW: BUG: WIX: Improve Usability of multiple architecture MSI installations, remove...
Jeffrey Altman [Fri, 12 Oct 2007 19:01:38 +0000 (19:01 +0000)]
KFW: BUG: WIX: Improve Usability of multiple architecture MSI installations, remove non-unique GUID component identifiers, and include Beta ID in the package name

The WiX installation package suffered from several problems:

 * The Beta ID was not being included in the package name.
   Fixed this by swapping the priority of "Release" and "Beta".
   "Beta" is an official release that has a beta value.
   A non-release has a datestamp as part of the package name.

 * There were duplicate GUID values being used for registry components.
   This would prevent proper removal of the components on uninstall.

 * 64-bit Installers were being constructed with the 32-bit installer
   schema.  This prevented side-by-side installation of the 64-bit and
   32-bit versions.  This also permitted 64-bit installers to be
   installed on 32-bit systems.

 * The 64-bit and 32-bit installers had the same package name.
   64-bit and 32-bit are now identified in the package name.

 * 64-bit files were being installed to the WOW64 environment.

ticket: new
component: windows
tags: pullup
target_version: 1.6.3

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

17 years agoccs_lock_status_grant_lock granting wrong lock
Alexandra Ellwood [Wed, 10 Oct 2007 21:22:14 +0000 (21:22 +0000)]
ccs_lock_status_grant_lock granting wrong lock

ccs_lock_status_grant_lock sometimes tries to grant the wrong lock
because it is not keeping track of where it got moved to.  Reorganized
code so it is easier to read and doesn't look up the lock twice.

ticket: new

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

17 years agocci_array_move not returning correct new position
Alexandra Ellwood [Wed, 10 Oct 2007 21:20:00 +0000 (21:20 +0000)]
cci_array_move not returning correct new position

cci_array_move should return correct new position when moving
from and to the same spot.

ticket: new

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

17 years agocc_ccache_store_credentials should return ccErrBadCredentialsVersion
Alexandra Ellwood [Wed, 10 Oct 2007 21:17:05 +0000 (21:17 +0000)]
cc_ccache_store_credentials should return ccErrBadCredentialsVersion

cc_ccache_store_credentials should return ccErrBadCredentialsVersion when
the principal for that version is not set on the ccache.

ticket: new

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

17 years agoupdate expected error for cc_initialize with ccapi_version_2 to match new value,...
Justin Anderson [Wed, 10 Oct 2007 20:17:42 +0000 (20:17 +0000)]
update expected error for cc_initialize with ccapi_version_2 to match new value, CC_BAD_API_VERSION (9)

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

17 years agosimple multithreaded locking test for ccapi
Justin Anderson [Wed, 10 Oct 2007 19:02:54 +0000 (19:02 +0000)]
simple multithreaded locking test for ccapi

ticket: 5459

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

17 years agoAdd enhanced error messages to new error return cases, explaining the
Ken Raeburn [Wed, 10 Oct 2007 18:27:37 +0000 (18:27 +0000)]
Add enhanced error messages to new error return cases, explaining the
(fairly generic) errors codes.

ticket: 5777

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

17 years agoRun the script to verify all Windows-exported krb5 functions have the
Ken Raeburn [Wed, 10 Oct 2007 17:54:49 +0000 (17:54 +0000)]
Run the script to verify all Windows-exported krb5 functions have the
right calling convention markers in the header files, on Windows.
Always, for lack of a separate "maintainer mode" like we have on UNIX.

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

17 years agokt_file.c: Support multiple iterators active simultaneously, using a
Ken Raeburn [Tue, 9 Oct 2007 04:03:59 +0000 (04:03 +0000)]
kt_file.c: Support multiple iterators active simultaneously, using a
counter.  In get_entry, if the file was already open, rewind it to
just after the version number, and don't close it when done.  Don't
allow add or remove calls if any iterator is active.

t_keytab.c: Test mixing two iterators with get_entry calls.

ticket: 5777

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

17 years agoLog port number with IPV6_V6ONLY socket option status.
Ken Raeburn [Tue, 9 Oct 2007 00:36:13 +0000 (00:36 +0000)]
Log port number with IPV6_V6ONLY socket option status.
Recognize and ignore Appletalk address type.

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

17 years agoNIM: BUG: APP: New edit controls should be marked ES_AUTOHSCROLL
Jeffrey Altman [Fri, 5 Oct 2007 15:23:53 +0000 (15:23 +0000)]
NIM: BUG: APP: New edit controls should be marked ES_AUTOHSCROLL

The EDIT controls used to accept input from the user must be set to
support automatic horizontal scrolling.  Otherwise, the number of input
characters is arbitrarily restricted based upon the font selected by
the user as part of the active Windows theme.

Horizontal scrolling is enabled with the ES_AUTOHSCROLL flag during
control construction.

ticket: new
component: windows

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

17 years agoKfW Build: add new installer build files to copyfiles.xml
Kevin Koch [Fri, 5 Oct 2007 01:26:34 +0000 (01:26 +0000)]
KfW Build: add new installer build files to copyfiles.xml

Files were added to the installer build area.  They also need to be added to the copylist, so that they are copied to the staging area, where the installer is built.

Ticket: new
Tags: pullup
Target_Version: 1.6.3

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

17 years agoWill Fiveash and Mark Phalan report that kadmin's unlock command calls
Tom Yu [Thu, 4 Oct 2007 22:13:13 +0000 (22:13 +0000)]
Will Fiveash and Mark Phalan report that kadmin's unlock command calls
kadm5_lock() instead of of kadm5_unlock().  Apply the obvious fix.

ticket: 4136
target_version: 1.6.3
tags: pullup

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

17 years agoRemoved NOP line of code from krb5_fcc_next_cred()
Alexandra Ellwood [Wed, 3 Oct 2007 20:13:55 +0000 (20:13 +0000)]
Removed NOP line of code from krb5_fcc_next_cred()

cursor = (krb5_cc_cursor *) fcursor;

does nothing for a function with a prototype

krb5_fcc_next_cred(krb5_context context, krb5_ccache id,
krb5_cc_cursor *cursor, krb5_creds *creds)

The correct line of code would be:

*cursor = (krb5_cc_cursor) fcursor;

Except it isn't necessary because fcursor isn't modified
by krb5_fcc_next_cred().  Looks like code was copied from
krb5_fcc_start_seq_get() and since the line was a NOP
no one noticed it.

ticket: new

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

17 years agoAdd documentation for error codes used for flow control
Alexandra Ellwood [Wed, 3 Oct 2007 16:03:59 +0000 (16:03 +0000)]
Add documentation for error codes used for flow control

ticket: new

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

17 years agoApply patch from Nalin Dahyabhai to correctly handle delegated
Tom Yu [Wed, 3 Oct 2007 00:17:27 +0000 (00:17 +0000)]
Apply patch from Nalin Dahyabhai to correctly handle delegated
credentials if ret_flags is null.

ticket: 5802
target_version: 1.6.3
tags: pullup

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

17 years agocc_initalize(ccapi_version_2) should return CC_BAD_API_VERSION not CC_NOT_SUPP
Alexandra Ellwood [Tue, 2 Oct 2007 18:47:57 +0000 (18:47 +0000)]
cc_initalize(ccapi_version_2) should return CC_BAD_API_VERSION not CC_NOT_SUPP

ticket: new
target_version: 1.7

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

17 years agoInitialize options for _alloc interface to same defaults as for _init
Ken Raeburn [Mon, 1 Oct 2007 23:48:57 +0000 (23:48 +0000)]
Initialize options for _alloc interface to same defaults as for _init

ticket: 5800
tags: pullup

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

17 years agoremove error tables by pointer
Jeffrey Altman [Mon, 1 Oct 2007 20:09:55 +0000 (20:09 +0000)]
remove error tables by pointer

On Windows, it is possible for the same DLL to be loaded
into a process multiple times as separate instances.  Each
time a DLL is loaded it registers its error tables at different
locations in the process address space.  Removing the tables
by base instead of pointer value can result in the error table
list pointing at invalid memory.

ticket: new
tags: pullup
target_version: 1.6.3

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

17 years agodef-check.pl needs to ignore ordinals in .def file
Ken Raeburn [Mon, 1 Oct 2007 19:21:49 +0000 (19:21 +0000)]
def-check.pl needs to ignore ordinals in .def file

Otherwise, the UNIX build blows out now that the Windows export lists
have been updated.  Silly consistency checks....

ticket: new

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

17 years ago- null params are always expected to result in ccErrBadParam.
Justin Anderson [Mon, 1 Oct 2007 18:39:59 +0000 (18:39 +0000)]
- null params are always expected to result in ccErrBadParam.
- clarified some test descriptions

ticket: 5459

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

17 years agoProcess WM_CLOSE for the command-line option dialog
Jeffrey Altman [Mon, 1 Oct 2007 16:15:39 +0000 (16:15 +0000)]
Process WM_CLOSE for the command-line option dialog

ticket: 5798
tags: pullup
target_version: 1.6.3
component: windows

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

17 years agoNIM: BUG: APP: notification icon tooltip wrong string
Jeffrey Altman [Mon, 1 Oct 2007 05:32:26 +0000 (05:32 +0000)]
NIM: BUG: APP: notification icon tooltip wrong string

The Network Identity Manager notification icon can display a tooltip
when the user hovers the mouse cursor over it.  It is currently used
to indicate the default identity (if one is found).  However, when
retrieving the name of the default identity, the size of the buffer
was left unspecified.  This patch specifies the correct buffer size.

The function called with the incorrect buffer size was
kcdb_identity_get_name().  That function does not write more than
KCDB_IDENT_MAXCCH_NAME characters regardless of the size of the buffer
specified, and the buffer that was passed in is allocated to be this
size.  No buffer overrun was present in the existing code, although
the behavior was incorrect.

ticket: new

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

17 years agoWhen Network Identity Manager starts, the credentials display
Jeffrey Altman [Mon, 1 Oct 2007 05:31:02 +0000 (05:31 +0000)]
When Network Identity Manager starts, the credentials display
enumerates known identities and displays them if necessary.  However,
as plug-ins load and the list of known identities, their properties
and credentials change, the order of the displayed list will also
change.

The existing code does not deal well in respect to tracking the
current selection when the list of identities and credentials change.
This results in inconsistent behavior where the identity that was
originally at the top of the list maintains its selection state while
the identity at the top of the list after all the plug-ins have loaded
will receive focus.

This patch fixes this problem by explicitly setting focus and
selection to the identity or credential at the current cursor location
following a change in the credentials list.

ticket: 5782

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

17 years agoThe credentials display in Network Identity Manager colors the
Jeffrey Altman [Mon, 1 Oct 2007 05:29:38 +0000 (05:29 +0000)]
The credentials display in Network Identity Manager colors the
background of identity headings based on the expiration state of the
credentials that belong to the identity.

This patch changes the behavior to color these headings based on the
existence and expiration state of identity credentials.  With this
change, only identities that have valid identity credentials will
appear in green.

The same logic is used when drawing the menu items in the "Set
default" sub-menu in the notification icon.

ticket: 5783

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

17 years agoNIM: BUG: APP: notification icon state
Jeffrey Altman [Mon, 1 Oct 2007 05:27:29 +0000 (05:27 +0000)]
NIM: BUG: APP: notification icon state

Currently, the notification icon that is created by Network Identity
Manager indicates the status of all the known credentials.  If any
credential belonging to any identity is expired or in a critical
state, the icon will change color to indicate this.

This patch changes the behavior to only indicate the status of
credentials belonging to the default identity.  The expiration state
of credentials that do not belong to the default identity no longer
affect the appearance of the notification icon.

ticket: new

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

17 years agoNIM: BUG: APP: identity data corruption
Jeffrey Altman [Mon, 1 Oct 2007 05:25:34 +0000 (05:25 +0000)]
NIM: BUG: APP: identity data corruption

The credentials display in Network Identity Manager uses a cached set
of properties for each identity that has credentials.  The existing
code used the wrong field of the khui_credwnd_identity structure to
store the credentials type name associated with an identity, resulting
in a corrupt data structure.

This patch fixes the code to use the correct field.

ticket: new

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

17 years agoNIM: BUG: APP: View-Select columns
Jeffrey Altman [Mon, 1 Oct 2007 05:20:51 +0000 (05:20 +0000)]
NIM: BUG: APP: View-Select columns

Change "View columns" to "Select columns" in the "View" menu of
Network Identity Manager to be consistent with other Windows
applications.

ticket: new

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

17 years agoNIM: BUG: APP: leaking prompts in obtain new credentials dialog
Jeffrey Altman [Mon, 1 Oct 2007 05:19:05 +0000 (05:19 +0000)]
NIM: BUG: APP: leaking prompts in obtain new credentials dialog

The Kerberos v5 plug-in for Network Identity Manager was not clearing
the list of prompts properly when a user changes the active identity
in the new credentials dialog.  The stale prompts would be visible to
the user if the newly selected identity is invalid or the new identity
cannot be validated.

This patch clears the prompts if there is an identity change.

ticket: new

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

17 years agoadd descriptions of credential flags, identity icons, and push-pins
Jeffrey Altman [Mon, 1 Oct 2007 03:22:07 +0000 (03:22 +0000)]
add descriptions of credential flags, identity icons, and push-pins

update screen shots

add credits to Fermilabs and Stanford University.

other changes for kfw 3.2.2 release.

ticket: 5789

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

17 years agofix the description of the notification icon status colors
Jeffrey Altman [Mon, 1 Oct 2007 03:20:06 +0000 (03:20 +0000)]
fix the description of the notification icon status colors

ticket: 5789

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

17 years agoNIM: BUG: LIB: deadlock in kmq
Jeffrey Altman [Sun, 30 Sep 2007 20:50:45 +0000 (20:50 +0000)]
NIM: BUG: LIB: deadlock in kmq

Do not obtain a critical section that is already being held:
"cs_kmq_types"

Update the docs to indicate the additional restriction.

ticket: new
component: windows

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

17 years agoAdd static ordinals to DLL exports
Jeffrey Altman [Sun, 30 Sep 2007 20:46:02 +0000 (20:46 +0000)]
Add static ordinals to DLL exports

Add static ordinals to DLL exports in krb5_32.def, xpprof32.def
gssapi32.def, and krb524.def.

Not added to k5sprt32.def as all of the functions are
private.

Not added to krb4_32.def as the library is not supported
as part of KFW.

ticket: new

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

17 years agoWhen there is no ImagePath value for a module it indicates
Jeffrey Altman [Sun, 30 Sep 2007 14:42:22 +0000 (14:42 +0000)]
When there is no ImagePath value for a module it indicates
that the module has not been installed.  Do not report an
error to the end user for uninstalled modules.  This will
only annoy the user and there is probably nothing the user
can do about it.  Perhaps the user uninstalled the module
intentionally.  The fact that there is still a HKCU key
remaining is not an indication that the module is in use.

ticket: 5753

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

17 years agoRemove Krb5Cred, Krb5Ident, and Krb4Cred default configuration data from
Jeffrey Altman [Sun, 30 Sep 2007 04:44:31 +0000 (04:44 +0000)]
Remove Krb5Cred, Krb5Ident, and Krb4Cred default configuration data from
the KMM Schema.  Require that modules that are installed be properly
installed.

Add NIM Module Registry values to the NSIS installer.  These values were
already being set by the Wix installer.

By removing the ImagePath default, unable to load module errors will
not be generated when the module has not in fact been installed.

ticket: 5753

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

17 years agofix documentation typo
Jeffrey Altman [Sun, 30 Sep 2007 03:50:37 +0000 (03:50 +0000)]
fix documentation typo

ticket: 5787

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

17 years agoNIM: disable warning
Jeffrey Altman [Sun, 30 Sep 2007 01:45:10 +0000 (01:45 +0000)]
NIM: disable warning

Disable the potentially uninitialized variable warning
for 'ri'.  The variable cannot be used when uninitialized.

ticket: new
component: windows

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

17 years agoNIM: PDF user documentation updates for KFW 3.2.2
Jeffrey Altman [Sun, 30 Sep 2007 01:24:12 +0000 (01:24 +0000)]
NIM: PDF user documentation updates for KFW 3.2.2

updates for NIM 1.3.1 / KFW 3.2.2

ticket: new
component: windows

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

17 years agoNIM: BUG: APP: Provide keyboard accelerator
Jeffrey Altman [Sat, 29 Sep 2007 22:56:57 +0000 (22:56 +0000)]
NIM: BUG: APP: Provide keyboard accelerator

In the Advanced mode of the Obtain New Credentials dialog
the keyboard accelerator was missing.

ticket: new
component: windows

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

17 years agoFix typo
Jeffrey Altman [Sat, 29 Sep 2007 22:53:37 +0000 (22:53 +0000)]
Fix typo

ticket: 5787

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

17 years agoNIM: BUG: APP: Spell Check
Jeffrey Altman [Sat, 29 Sep 2007 21:18:43 +0000 (21:18 +0000)]
NIM: BUG: APP: Spell Check

Correct typos.  Make use of "plug-in" vs "plugin" consistent.

ticket: new
component: windows

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

17 years agocc_ccache_set_principal and cc_ccache_get_principal were also ignoring their
Alexandra Ellwood [Thu, 27 Sep 2007 05:30:20 +0000 (05:30 +0000)]
cc_ccache_set_principal and cc_ccache_get_principal were also ignoring their
credentials version inputs.

ticket: 5771

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

17 years agoNIM: FEATURE: APP: Notification Icon Tooltip
Jeffrey Altman [Thu, 27 Sep 2007 03:46:36 +0000 (03:46 +0000)]
NIM: FEATURE: APP: Notification Icon Tooltip

The Network Identity Manager notification icon can have a tooltip
associated with it.  The tooltip will be displayed to the user if she
hovers the mouse cursor over the notification icon.  Currently, the
tooltip is used to indicate the current status of Network Identity
Manager.  This patch adds the name of the default identity to the
tooltip.

ticket: new
component: windows

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

17 years agoNIM: BUG: LIB: optimize khui_find_action()
Jeffrey Altman [Thu, 27 Sep 2007 03:44:29 +0000 (03:44 +0000)]
NIM: BUG: LIB: optimize khui_find_action()

In Network Identity Manager, when locating the action object
corresponding to an action identifier using khui_find_action(), don't
search through the list of standard actions if we already know that
the object we are searching for is a custom action.

ticket: new
component: windows

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

17 years agoAdd a "Set default" sub menu to the Network Identity Manager
Jeffrey Altman [Thu, 27 Sep 2007 03:42:20 +0000 (03:42 +0000)]
Add a "Set default" sub menu to the Network Identity Manager
notification icon context menu.  The submenu will display a list of
identities that the user can select as the default identity.

Each identity that is displayed in the sub menu will be colored the
same way it is colored in the basic view to provide a hint as to the
state of the credentials belonging to the identity.

ticket: 5724

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

17 years agoAdd a "View all identities" option to the view menu of Network
Jeffrey Altman [Thu, 27 Sep 2007 03:38:54 +0000 (03:38 +0000)]
Add a "View all identities" option to the view menu of Network
Identity Manager.  This option will be toggled when selected.  If
enabled, all the known identities will be displayed in any credentials
view which uses the identity of credentials as the primary group-by
field.

The setting of this option is persistent.

ticket: 5719

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

17 years agoprofile library memory leaks introduced when malloc returns 0
Ezra Peisach [Wed, 26 Sep 2007 15:15:33 +0000 (15:15 +0000)]
profile library memory leaks introduced when malloc returns 0

I have a modified version of valgrind that will allow me to have
malloc fail in a controlled way.  A number of memory leaks in error return
passes exist in the profile library.  They are essentially inconsequental - but
my goal is to eventually create a test harness that tries to cover all code -
including error returns...

prof_parse.c: (profile_parse_file): Free node being created if
      parse_line() fails.

prof_file.c (profile_open_file): free prf_data_t on malloc failure

prof_tree.c (profile_create_node): The magic element must be set
    before calling profile_free_node for it to release memory.

ticket: new

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

17 years agoInclude missing file
Justin Anderson [Tue, 25 Sep 2007 21:35:25 +0000 (21:35 +0000)]
Include missing file

ticket: 5459

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

17 years agoUpdate ccapi tests to work at new location in krb5 tree. Also, test for platform...
Justin Anderson [Tue, 25 Sep 2007 21:34:10 +0000 (21:34 +0000)]
Update ccapi tests to work at new location in krb5 tree. Also, test for platform when compiling so that KfM and KfW can use this

ticket: 5459

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

17 years agoDocument use of KRB5_CCH_CCNAME for ccache name length
Jeffrey Altman [Tue, 25 Sep 2007 04:22:02 +0000 (04:22 +0000)]
Document use of KRB5_CCH_CCNAME for ccache name length

ticket: 5772

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

17 years agochange all MAX_PATH ccname buffer lengths to KRB5_CCH_CCNAME and
Jeffrey Altman [Tue, 25 Sep 2007 04:19:52 +0000 (04:19 +0000)]
change all MAX_PATH ccname buffer lengths to KRB5_CCH_CCNAME and
document the use of KRB5_CCH_CCNAME.

ticket: 5772

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

17 years agoNIM: BUG: KMM: miscellaneous fixes
Jeffrey Altman [Tue, 25 Sep 2007 03:53:53 +0000 (03:53 +0000)]
NIM: BUG: KMM: miscellaneous fixes

kmm_reg.c:
Allocate enough memory to hold the entire PluginList multi-string plus
an extra NUL if the registry value was not properly terminated.

kmm_registrar.c:
Do not record an error loading a module if there was no configuration
for it.

kmmmain.c:
Avoid a race condition by sending the thread quit message instead of
posting it.  Do so outside of the critical section to avoid a deadlock.

ticket: new
component: windows

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

17 years agoNIM: BUG: KRB5: cleanup krb5funcs
Jeffrey Altman [Tue, 25 Sep 2007 03:25:28 +0000 (03:25 +0000)]
NIM: BUG: KRB5: cleanup krb5funcs

(1) remove an extraneous backslash from the generated FILE:
    ccache name.  GetTempPath() always returns paths terminated
    with a backslash.

(2) increase the max ccache name length to KRB5_CCH_CCNAME from
    MAX_PATH.

These changes have dependencies on revisions 19891 and 19897.

ticket: new
component: windows

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

17 years agoMore consolidation of the computation of the default ccache name
Jeffrey Altman [Tue, 25 Sep 2007 03:16:18 +0000 (03:16 +0000)]
More consolidation of the computation of the default ccache name

ticket: 5691

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

17 years agocc_ccache_set_principal always returns error 227
Alexandra Ellwood [Tue, 25 Sep 2007 02:36:48 +0000 (02:36 +0000)]
cc_ccache_set_principal always returns error 227

Was attempting to read the new name from the reply stream.

ticket: new
target_version: 1.7

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

17 years agoSet svn:eol-style on a bunch of text-looking files that didn't have it
Ken Raeburn [Mon, 24 Sep 2007 22:05:56 +0000 (22:05 +0000)]
Set svn:eol-style on a bunch of text-looking files that didn't have it

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

17 years agowe're not using changelog files any more
Ken Raeburn [Mon, 24 Sep 2007 21:44:50 +0000 (21:44 +0000)]
we're not using changelog files any more

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

17 years agoRemove the broken optimization from UnicodeToANSI() that attempted
Jeffrey Altman [Mon, 24 Sep 2007 18:49:58 +0000 (18:49 +0000)]
Remove the broken optimization from UnicodeToANSI() that attempted
in a stupid way to avoid to WideCharToMultiByte() call by testing
to see if the second byte (not wchar) was NUL.  This test works
for Latin1 but not for anything more interesting.  Always call
WideCharToMultiByte().

I commented out the use of WC_NO_BEST_FIT_CHARS in order to
provide compatibility with Windows.  Windows converts the user
name without that option.

With the current code a principal name consisting of a single
component equivalent to the Greek character Sigma and a realm
name will be converted to S@REALM exactly as the "WhoAmI"
command does.  If WC_NO_BEST_FIT_CHARS was specified, this
string would be converted to "?@REALM".

ticket: 5766

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

17 years agoMSLSA krb5_cc module fails to check success of UNICODE string conversions
Jeffrey Altman [Mon, 24 Sep 2007 17:46:26 +0000 (17:46 +0000)]
MSLSA krb5_cc module fails to check success of UNICODE string conversions

The MSLSA krb5_cc module was written with an assumption that probably does not
hold true anymore.  It assumed that all Kerberos strings although stored in
wide character data structures could in fact be represented in the application's
ANSI code page and that such conversions would not fail.

The UnicodeToANSI() function did not check the result of WideCharToMultiByte()
for success.  If the conversion failed, this could result in the caller believing
the contents of the output string buffer were a valid string when instead they
were simply stack garbage.

The UnicodeStringToMITPrinc() and KerbExternalNameToMITPrinc() functions did not
check the return value of krb5_parse_name() for success.  If krb5_parse_name()
was passed a pointer to garbage on the stack instead of an actual principal name,
this could result in the caller believing the output krb5_principal * was valid
when instead it was NULL.

The function CacheInfoEx2ToMITCred() is dependent on the success or failure of
UnicodeStringToMITPrinc() assumed it could not fail and did not return a
success or failure indication to its caller.

If Microsoft a formatted ticket contains a Unicode string that can not be
represented in the application's ANSI code page, this could result in a NULL
pointer dereference during a call to krb5_cc_resolve("MSLSA:") or
krb5_cc_retrieve(), or krb5_cc_get_principal().

With the changes in this commit, tickets containing principal names that cannot
be represented in the application's ANSI code page will be hidden from the
application.

ticket: new

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

17 years agoNIM: BUG: Restore Copyright removed in revision 19855
Jeffrey Altman [Mon, 24 Sep 2007 13:23:25 +0000 (13:23 +0000)]
NIM: BUG: Restore Copyright removed in revision 19855

Restore MIT Copyright removed in revision 19855.

ticket: new
component: windows

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