aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2008-08-02Use load/store_32_be instead of open-codingKen Raeburn1-8/+2
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20600 dc483132-0cff-0310-8789-dd5450dbe970
2008-08-02Make more uses of load/store_32_be/le, which on x86 at least expandsKen Raeburn7-67/+22
to a single unaligned load/store instruction, instead of open-coding the shifts and masks. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20599 dc483132-0cff-0310-8789-dd5450dbe970
2008-08-02Use GET_HALF_BLOCK to fetch new values instead of open-codingKen Raeburn2-16/+10
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20598 dc483132-0cff-0310-8789-dd5450dbe970
2008-08-02Use krb5int_random_string, load_32_be, load_16_be, store_32_be, andKen Raeburn1-66/+6
store_16_be. Change krb5_krcc_unparse_int32 to call krb5_krc_unparse_ui_4 and reduce duplicated code. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20597 dc483132-0cff-0310-8789-dd5450dbe970
2008-08-02Rename and export random_string from cc_memory.cKen Raeburn2-5/+5
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20596 dc483132-0cff-0310-8789-dd5450dbe970
2008-08-02Reduce code duplication: krb5_fcc_store_int32 vs krb5_fcc_store_ui_4Ken Raeburn1-18/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20595 dc483132-0cff-0310-8789-dd5450dbe970
2008-08-02Two versions of resolver code were almost identical, so unify them and ↵Ken Raeburn1-37/+11
reduce duplication. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20594 dc483132-0cff-0310-8789-dd5450dbe970
2008-08-02Pull out code to compute length of quoted name component and copy withKen Raeburn1-78/+68
quoting into separate functions, to reduce code duplication. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20593 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-31Reuse more k5beta7 code for ipropKen Raeburn1-61/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20591 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-30Additional implementation of the KerberosAgentAlexandra Ellwood19-6244/+3419
ticket: 6055 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20590 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-30Delete decls for nonexistent functions, and an unused typedefKen Raeburn1-15/+0
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20589 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-30Remove unused fileKen Raeburn1-209/+0
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20588 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-25fix possible uninit variable use in error pathKen Raeburn1-0/+1
Clear gss_client and gss_target before any possible branch to 'error', where they can be used. ticket: new target_version: 1.6.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20580 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-24Return extended krb5 error stringsAlexandra Ellwood19-566/+666
Use krb5_get_error_message instead of error_message for detailed krb5 error strings. Also removed a few remaining instances of types ending in _t and fixed up some whitespace issues. Recommend ignoring whitespace diff. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20579 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-23In the gss rpc package, replace the type used for a Jeffrey Altman7-29/+36
socket on Windows with SOCKET (instead of int) and replace all calls to close() that are used to close sockets with closesocket(). src/include/port-sockets.h includes the definitions of SOCKET and closesocket() for non-Windows systems. ticket: 6041 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20578 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-23Fix one missed rename of "exit" label to "done"Tom Yu1-1/+1
ticket: 5442 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20575 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-23replace "exit" label with "done"Jeffrey Altman1-4/+4
ticket: 5442 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20574 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-23The NIM error reporting functions (in src/windows/identity/kherr ) keepJeffrey Altman1-1/+1
track of the the error message with the highest severity level that was reported for a specific error reporting context. However, if another error message of the same severity is reported, the error message being tracked will be updated to be the newly received error. The user will often only be notified of the error message that was tracked for a specific operation. Therefore, tracking the last message with the highest priority has the unfortunate side-effect of not reporting the cause of a failure. This patch changes the condition for updating the tracked error message to be the first message with the highest severity. ticket: 6047 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20573 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-23This patch modifies the NIM Kerberos v5 plug-in to use the Jeffrey Altman4-8/+64
krb5_get_error_message() function to look up the error string if the call to krb5_get_init_creds_password() fails. If the call to krb5_get_error_message() fails, the caller will failover to the previous method of looking up a suitable error message based on the error code. ticket: 5745 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20572 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-23 Jeffrey Altman2-0/+9
The /src/windows/identity/plugins/common/dynimport.{c,h} files are used by the NIM Kerberos v5 plug-ins for run-time dynamic linking. They currently do not declare or import the following functions: krb5_get_error_message() krb5_free_error_message() krb5_clear_error_message() This patch adds declarations and definitions required for locating these functions. Relies on the addition of these functions to the prototype list in the Pismere loadfuncs-krb5.h. See ticket 6045. ticket: 6046 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20571 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-23cw_handle_header_msg():Jeffrey Altman1-6/+2
The behavior of the HDN_ENDTRACK notification has changed slightly on Vista. HDM_GETITEMRECT, when used while handling HDN_ENDTRACK, returns the item extents that were there prior to the user starting the resizing operation. Earlier it would return the extents that resulted from the resizing operation. This resulted in a visual update problem on Windows Vista/2008 in the NIM Advanced View. ticket: 5605 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20570 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-22Catch a few more cases of unchecked k5_mutex_lock callsKen Raeburn4-12/+23
ticket: 5962 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20567 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-22A step towards ensuring we check mutex lock attempt results..Ken Raeburn1-15/+12
Always use inline function k5_mutex_lock_1 instead of gcc statement expression, even under gcc. Under gcc 4, declane k5_mutex_lock_1 and krb5int_mutex_lock with attribute warn_unused_result. In k5_mutex_destroy macro, only store destroy code source+line if we succeed in temporarily locking the mutex. ticket: 5962 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20566 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-21Another check for null return from krb5_cc_default_nameKen Raeburn1-11/+19
ticket: 5980 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20561 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-21Check for null name to krb5_cc_resolve, and return an errorKen Raeburn1-1/+3
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20560 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-21This patch addresses the issues raised in this ticket and ticket 5936Jeffrey Altman1-18/+19
(a) In the case where 'cred_handle' != 'verifier_cred_handle'[1] krb5_gss_accept_sec_context() leaks the 'cred_handle' in the success case and the failure cases that result in returning from the function prior to reaching the end of the function. (b) The meaningful 'minor_status' return value is destroyed during the cleanup operations. The approach taken is to add a new 'exit:' label prior to the end of the function through which all function returns after reaching the 'fail:' label will goto. After 'exit:', the 'cred_handle' will be released and if there is a krb5_context 'context' to be freed, the error info will be saved and krb5_free_context() will be called. In the success case, the krb5_context is saved in the gss context and we now set 'context' to NULL to prevent it from being freed. In order to preserve the minor_status return code, a 'tmp_minor_status' variable is added that is used after the 'fail:' label in calls to krb5_gss_delete_sec_context() and krb5_gss_release_cred(). [1] If 'verifier_cred_handle' is non-NULL, then 'cred_handle' is set to the value of 'verifier_cred_handle'. ticket: 5442 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20559 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-21kadm5_decrypt_key(). This patch prevents the returned keyblock's Jeffrey Altman1-1/+2
enctype from being coerced to the requested 'ktype' if the requested 'ktype' == -1. A ktype of -1 is documented as meaning "to be ignored". ticket: 5840 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20558 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-21krb5_string_to_keysalts()Jeffrey Altman1-1/+1
Fix an infinite loop in the parsing of 'kp' ticket: 5839 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20557 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-21There are two mutex locking issues that Roland Dowdeswell noticed in Jeffrey Altman1-0/+13
the memory ccache. The first one is in cc_memory.c:krb5_mcc_initialize(). When it is free(3)ing the existing credentials it does not lock the data structures and hence two separate threads can run into issues. The same problem exists in cc_memory.c:krb5_mcc_destroy(). ticket: 5895 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20555 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-21An implementation of opendir() and friends for _WIN32Jeffrey Altman1-6/+145
plus an implementation of the plugin support that makes use of them. ticket: 3737 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20554 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-21Assign fixed ordinals to comerr32.dll exportsJeffrey Altman1-7/+7
All of the other libraries on Windows have fixed assignments of ordinals to the exported functions. Assign the ordinals that were in use in the last public release, kfw 3.2.2, so that they will remain constant into the future in case additional exports are added to the library. ticket: new component: krb5-libs tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20553 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-21When reading from the routing socket, only provide enough space forKen Raeburn1-30/+22
the header and ignore the rest of the message. Don't complain about message size as long as we got the bits of the header we care about. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20552 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-21ccdefault.c:Jeffrey Altman1-2/+4
krb5_cc_default_name() is permitted to return a NULL pointer as a valid output. Passing a NULL pointer to strcmp() will result in an exception as NULL is not a valid input parameter to strcmp(). Save the output of krb5_cc_default_name() to a variable and modify the conditional to set the new default ccache name in the case where there is no existing default ccache name. ticket: 5080 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20551 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-20Don't set LOCAL_SUBDIRS in many places and SUBDIRS in a few andKen Raeburn25-25/+24
default SUBDIRS to LOCAL_SUBDIRS via pre.in. Instead, just set SUBDIRS in each directory, and don't do anything in pre.in. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20546 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-20Drop $(SUBDIRS_@srcdir@) hack, it's not being used any more, andKen Raeburn1-3/+1
confuses some versions of make. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20545 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-18Use mkstemp(), and fstat() the file to make sure that the mkstemp()Tom Yu1-19/+60
implementation is setting sane file modes. ticket: 6002 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20543 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-18Set non-blocking mode on incoming TCP connections.Ken Raeburn1-3/+12
Don't log EINTR error in select loop. Log when shutdown signal has been received and acted on. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20541 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-18On systems with struct rt_msghdr, open a routing socket and wait forKen Raeburn2-4/+174
messages; when they come in, if the types suggest a possibility of network interface reconfiguration, shut down the KDC's networking and bring it back up again, rescanning the interfaces in the process. Leaving the ticket open because it should be improved: * It should only close down sockets on addresses we no longer have, and bring up sockets only on new addresses. * If we have IPV6_PKTINFO support, it should only listen for IPv4 routing changes. * If we also have IP_PKTINFO support, it shouldn't be used at all. * If we build a KDC on a system with neither struct rt_msghdr nor IP_PKTINFO (do we have any such?), we'll need another solution. Thanks to Nico Williams for the routing socket suggestion, and Apple for the initial (signal-driven) reconfiguration code. ticket: 6019 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20540 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-18Rewrite krb5_db_open flag handling to avoid confusing emacs c-modeKen Raeburn1-6/+6
indentation support. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20539 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-18Revert due to potential file modes race conditionTom Yu1-18/+14
ticket: 6002 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20538 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-18Make krb5_rc_io_creat() use mkstempTom Yu1-14/+18
ticket: 6002 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20537 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-17In krb5_rc_io_creat(), unlink any existing rcache file before tryingTom Yu1-1/+2
to create a new rcache. This allows better recovery from corrupt rcache files. ticket: 6018 target_version: 1.6.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20536 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-17CCAPI side of the patchAlexandra Ellwood1-23/+30
ticket: 6035 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20535 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-17Removed _t suffix from KIM typesAlexandra Ellwood9-762/+762
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20534 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-17Removed _t suffix from all type namesAlexandra Ellwood28-1067/+1067
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20533 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-17Apply patch from Mark Phalan to correctly use progname instead ofTom Yu10-165/+152
argv[0]. ticket: 6030 tags: pullup target_version: 1.6.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20532 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-16Apply patch from Mark Phalan to initialize progname before useTom Yu2-6/+11
ticket: 6028 target_version: 1.6.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20531 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-16Fix indirection on assignment to minor statusTom Yu1-4/+4
ticket: 5962 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20530 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-16Check return value from k5_mutex_lock() to partially mitigate someTom Yu3-11/+25
assertion failures when mutexes get destroyed out from under us. ticket: 5962 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20529 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-15 r1926@ken-wireless: raeburn | 2008-07-15 16:49:17 -0400Ken Raeburn2-0/+72
ticket: 5947 status: open Add a test script for the walk_rtree code, and run some test cases that exercise the problem reported in RT ticket 5947. r1927@ken-wireless: raeburn | 2008-07-15 19:55:10 -0400 Some more test cases. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20528 dc483132-0cff-0310-8789-dd5450dbe970