| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
of reading it from errno. This may make static analysis tools less
confused about when we return zero vs nonzero values.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20312 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
ticket: 5897
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20254 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
AMD64 builds must load leashw64.dll not leashw32.dll
ticket:new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19929 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
File locking was non-existant in this code and fccs chained list was
not used at all. This resulted in an assertion failure when closing the
cache. Code has been reorganized to parallel the code in krb5_fcc_resolve
for easier maintenence.
Commented out test in t_cc.c has been updated to actually test this code.
ticket:new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19920 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
t_cc test case to pass and allows non-tickets to be stored (for now).
ticket: 5697
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19910 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
| |
names if they differ between the creds structure and the encoded
ticket and by looking up the server principal using the client's realm
if not found and server's realm was initially the referral (empty)
realm.
ticket: 5697
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19898 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
The 64-bit CCAPI DLL name is krbcc64.dll not krbcc32.dll.
Conditionalize it on _WIN64.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19892 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19832 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19664 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19663 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
ticket: new
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19564 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19554 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
structures, instead
of open-coding checks of multiple fields everywhere.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19544 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The MSLSA: ccache type when used on Windows Vista can take advantage of an ability to write tickets to the LSA credential cache for the current logon session. This is possible due to the addition of the KERB_SUBMIT_TICKET interface.
Also new to Vista is the CACHE_INFO_EX2 interface which permits a much more efficient method of enumerating the contents of the LSA credential cache.
The code to take advantage of these features has been present for more than a year. However, due to the lack of a public SDK that included the necessary data structures the functionality has been disabled. As of this commit, the functionality will be enabled if the version of NTSecAPI.h includes TRUST_ATTRIBUTE_TRUST_USES_AES_KEYS. This is a preprocessor symbol that is new to the Vista SDK.
In order to build with the new Vista functionality when using the XP SP2 SDK, the NTSecAPI.h file from the Vista SDK must be used in place of the version from the XP SP2 SDK.
This commit also addresses the issues associated with the inability to read session keys from a UAC limited process. When UAC limitation is detected by examining the process token elevation level all access to the MSLSA contents is disabled. At some point in the future we can implement an elevated COM service in order to obtain access to the session keys.
ticket: new
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19237 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19199 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19133 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19108 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
| |
krb5_cc_dfl_ops - as k5-int.h defines.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19107 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
| |
sense - when krb5_Xcc_ops currently defined as such - and assignment of value
assumes same.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19106 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19102 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19076 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19075 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
later. v5 is the first version of the CCAPI to support the kdc timesyncing
API.
ticket: 5403
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19071 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19064 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19018 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19016 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implemented a working krb5_cc_remove for the CCAPI cache type. Added a
private support function krb5_creds_compare() which checks if two krb5_creds
are identical. This function should be needed by implementations of
krb5_cc_remove for other ccache types.
ticket: new
owner: tlyu
target_version: 1.6
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18923 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
| |
Dowdeswell to avoid possible double-free conditions on certain
errors.
ticket: 4788
tags: pullup
target_version: 1.6
component: krb5-libs
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18897 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/lib/krb5/ccache/ccbase.c: Added CCAPI v3 entry to list of type cursors
* src/lib/krb5/ccache/ccapi/stdcc.h:
* src/lib/krb5/ccache/ccapi/stdcc.c: Implemented CCAPI v3 cursor functionality.
ticket: 4739
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18877 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function to fetch ops vector given ccache prefix string.
(krb5_cc_new_unique): New function to generate a new unique
ccache of a given type.
* src/include/krb5/krb5.hin: Prototype for krb5_cc_new_unique().
* src/lib/krb5/libkrb5.exports:
* src/lib/krb5_32.def: Add krb5_cc_new_unique().
ticket: 3091
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18857 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
| |
Fixed krb5_stdccv3_generate_new so it no longer returns a NULL ccache.
ticket: new
target_version: 1.6
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18820 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed definition of "struct krb5_cccol_cursor" in krb5.h to be C++ safe.
In C++ the struct name is also a type so there can't be a typedef of the same
name, in this case "typedef struct krb5_cccol_cursor *krb5_cccol_cursor;".
ticket: new
status: open
target_version: 1.6
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18765 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18723 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$(RUN_SETUP). Replaces old hack with MAYBE_VALGRIND added to RUN_ENV
in a way that would break in some of the tests.
Set VALGRIND in site.exp in tests/dejagnu. (Not used yet.)
Runs some shell scripts under valgrind, rather than changing them to
run only the executables under valgrind; this is mostly okay, just
creates lots of extra log data, and requires --trace-children=yes.
This should work for any instrumentation program invocation that gets
followed immediately by the name and argument list for the program
being instrumented. For example, VALGRIND="env LD_PRELOAD=..." should
work, though I haven't tested it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18699 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
memory leaks.
ticket: 4389
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18654 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
| |
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18652 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some ccache back ends need per-type cursors implemented.
* src/include/k5-int.h: Declare krb5_cc_ptcursor. Update
krb5_cc_ops vector to include functions for ptcursor and some
not-yet-implemented functionality.
* src/include/krb5/krb5.hin: Prototype krb5_cccol_cursor_new,
krb5_cccol_cursor_next, krb5_cccol_cursor_free.
* src/lib/krb5/ccache/Makefile.in: Compile cccursor.c. Build
t_cccursor.
* src/lib/krb5/ccache/cccursor.c: Implementation of cursor for
iterating over ccaches.
* src/lib/krb5/ccache/ccbase.c: Add typecursor functionality for
iteration over registered ccache types.
* src/lib/krb5/ccache/cc_memory.c: Implmement per-type ccache
cursor functionality.
* src/lib/krb5/ccache/cc_mslsa.c:
* src/lib/krb5/ccache/cc_file.c:
* src/lib/krb5/ccache/ccapi/stdcc.c: Add place-holder ops vector
entries.
* src/lib/krb5/ccache/t_cccursor.c: New test of ccache cursor
functionality.
* src/lib/krb5/os/ccdefname.c (krb5int_cc_os_default_name): New
function to return the OS-specific default ccache name.
ticket: new
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18651 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
- adds a function to get ccache keycount
- uses it in two places
- fixes free problem if next_cred fails
- simplifies the clearcache function by using keyctl_clear
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18649 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
| |
buffer overflow for end of list.
Detected with a hacked up version of valgrind to handle keyring syscalls.
krb5_krcc_next_cred: Move initial test if pointing past end of key
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18643 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
| |
regardless of whether the type is registered or not in the library.
Test to see if KEYRING: is registered - and if so - run the tests on it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18642 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aclocal.m4: Enable keyring ccache if the header and library are available; no
configure-time option. No error if it's not found.
ccdefname.c: Keep old default of FILE: cache, at least for now.
libkrb5.exports: Don't export krb5_krcc_ops.
ccbase.c: Only initialize krb5int_krcc_mutex if USE_KEYRING_CCACHE; destroy it
in finalization. Define INITIAL_TYPEHEAD macro (for file vs keyring), and use
it for initialization and in krb5int_cc_finalize. Re-enable freeing of
additional registered-type structures.
cc_keyring.c: Avoid calls to com_err from within library.
cc_file.c: Punt change; generate_new is badly broken, and we expect to replace
it with a new API anyways.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18638 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
| |
krb5_mcc_generate_new() Error in loop caused first item in the list to not
get checked the second time through scanning for duplicates.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18594 dc483132-0cff-0310-8789-dd5450dbe970
|
|
|
|
|
|
|
|
|
|
|
| |
ktbase.c, ccbase.c: When a file path is specified without
the prefix we must infer the use of the "FILE" prefix.
However, we were setting the prefix including the colon
separator when the separator should have been ignored.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18561 dc483132-0cff-0310-8789-dd5450dbe970
|