summaryrefslogtreecommitdiffstats
path: root/src/util
Commit message (Collapse)AuthorAgeFilesLines
...
* Cleanup memory leaks in test program for dynamically allocated buffers..Ezra Peisach2008-10-281-0/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20934 dc483132-0cff-0310-8789-dd5450dbe970
* Update the exports file for krb5int_buf_add_fmtGreg Hudson2008-10-281-0/+1
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20933 dc483132-0cff-0310-8789-dd5450dbe970
* In the k5buf module, add a function to append formatted data to aGreg Hudson2008-10-282-3/+114
| | | | | | | | | buffer. ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20932 dc483132-0cff-0310-8789-dd5450dbe970
* The last change to plugins.c erroneously passes a size_t as a fieldGreg Hudson2008-10-281-1/+1
| | | | | | | width to asprintf. Address the signed/unsigned warning cleanup using a cast instead. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20931 dc483132-0cff-0310-8789-dd5450dbe970
* Add the k5buf string module to libkrb5supportGreg Hudson2008-10-285-1/+465
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20929 dc483132-0cff-0310-8789-dd5450dbe970
* Unsigned/signed warnings cleanupEzra Peisach2008-10-282-8/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20928 dc483132-0cff-0310-8789-dd5450dbe970
* localize format strings, not final error stringAlexandra Ellwood2008-10-271-76/+34
| | | | | | | | | | | | | | | errors.c should localize the incoming format string, not the string produced by vasprintf. The format string is constant and thus can be added to a localization table, whereas the output string is not. Note that this change depends on error_message also localizing error table strings (which it does for KfM already). ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20927 dc483132-0cff-0310-8789-dd5450dbe970
* signed vs. unsigned warnings cleanupEzra Peisach2008-10-271-7/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20925 dc483132-0cff-0310-8789-dd5450dbe970
* Use strlcpy instead of strcpy in many placesGreg Hudson2008-10-242-2/+3
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20919 dc483132-0cff-0310-8789-dd5450dbe970
* Add build system support for strlcpy and strlcat on platforms which doGreg Hudson2008-10-242-0/+97
| | | | | | | | | not provide it natively. ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20916 dc483132-0cff-0310-8789-dd5450dbe970
* Add support for localizing krb5 errors on Mac OS X.Alexandra Ellwood2008-10-241-2/+67
| | | | | | | | | Split into a separate function to make it easier to add support for other localization techniques. ticket: 6245 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20913 dc483132-0cff-0310-8789-dd5450dbe970
* Free global mach ports on library unloadAlexandra Ellwood2008-10-231-2/+19
| | | | | | ticket: 6248 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20911 dc483132-0cff-0310-8789-dd5450dbe970
* Use asprintf instead of malloc/strcpy/strcat in many placesGreg Hudson2008-10-204-46/+15
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20901 dc483132-0cff-0310-8789-dd5450dbe970
* Use strdup in place of malloc/strcpy in many placesGreg Hudson2008-10-204-14/+6
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20898 dc483132-0cff-0310-8789-dd5450dbe970
* Merge KerberosIPC into k5_mig supportAlexandra Ellwood2008-10-154-111/+481
| | | | | | | | | Now that there are no servers using only kipc_* calls, merge them into the k5_mig_* calls. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20873 dc483132-0cff-0310-8789-dd5450dbe970
* Now that we have support for conditionally exporting symbols from the supportKen Raeburn2008-10-152-0/+110
| | | | | | library, use that for the [v]asprintf replacement functions when needed. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20871 dc483132-0cff-0310-8789-dd5450dbe970
* CCAPI should use common ipc and stream codeAlexandra Ellwood2008-09-301-43/+1
| | | | | | | | | KIM and CCAPI should share the same IPC and stream object types. Modified CCAPI to use code in src/util (stream) and src/util/mac (ipc) ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20787 dc483132-0cff-0310-8789-dd5450dbe970
* krb5 library-side changes for com_err based error stringsAlexandra Ellwood2008-09-302-4/+6
| | | | | | ticket: 6138 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20786 dc483132-0cff-0310-8789-dd5450dbe970
* Removed useless init and cleanup functions. Alexandra Ellwood2008-09-293-45/+14
| | | | | | | | Fixed request port list handling. ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20778 dc483132-0cff-0310-8789-dd5450dbe970
* Place structure in thread specific data to store client connectionAlexandra Ellwood2008-09-282-11/+49
| | | | | | | | port so that multiple services can be supported simultaneously. ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20773 dc483132-0cff-0310-8789-dd5450dbe970
* Create common stream and ipc layer for CCAPI and KIM. Alexandra Ellwood2008-09-289-0/+1350
| | | | | | | | | Will switch CCAPI to this new code later though, so as not to destabilize KfM and the Windows builds. ticket: 6055 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20769 dc483132-0cff-0310-8789-dd5450dbe970
* makedependKen Raeburn2008-09-181-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20731 dc483132-0cff-0310-8789-dd5450dbe970
* Based on patch from lxs, with some changes:Ken Raeburn2008-08-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add several new gcc warning flags, used in the KfM build process. Put declarations before code. Fix a bunch of signed/unsigned type mixes, mostly by changing variable types to unsigned int. Fix constness in handling name of default ccache name. Make sure functions get declared with prototypes: krb5int_pthread_loaded krb5int_gmt_mktime krb5int_aes_encrypt krb5int_aes_decrypt gssint_mecherrmap_init gssint_mecherramp_get. Don't shadow global names: stat accept index open encrypt. Fix variable shadowing in LDAP ASN.1 support. Don't define unused krb5int_local_addresses. Don't export internal krb5_change_set_password. Fix error return indications from gssint_oid_to_mech. Create and use k5-gmt_mktime.h to provide one global declaration of krb5int_gmt_mktime, needed before we've generated krb5.h on some platforms. Not incorporated from initial patch: const changes in function signatures. ticket: 6096 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20697 dc483132-0cff-0310-8789-dd5450dbe970
* r820@NOME-KING: raeburn | 2008-08-26 18:37:41 -0400Ken Raeburn2008-08-273-141/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | x r821@NOME-KING: raeburn | 2008-08-26 18:51:10 -0400 Remove disabled statistics gathering support. r822@NOME-KING: raeburn | 2008-08-26 18:57:20 -0400 Remove source location tracking. r823@NOME-KING: raeburn | 2008-08-26 19:05:35 -0400 Delete DEBUG_THREADS code. r824@NOME-KING: raeburn | 2008-08-26 19:18:59 -0400 Remove now-no-op assertion checks. r825@NOME-KING: raeburn | 2008-08-26 19:29:49 -0400 Simplify some wrappers. r826@NOME-KING: raeburn | 2008-08-26 19:38:23 -0400 Remove redundant comment. r827@NOME-KING: raeburn | 2008-08-26 19:49:20 -0400 When pthreads must be checked for at run time, don't include the no-op _nothread_mutex stuff too. r828@NOME-KING: raeburn | 2008-08-26 19:54:05 -0400 Remove remaining DEBUG_THREADS bits. r829@NOME-KING: raeburn | 2008-08-26 20:00:22 -0400 fix up initializer r830@NOME-KING: raeburn | 2008-08-26 20:10:37 -0400 Flatten a couple of structs wrapping single elements. r831@NOME-KING: raeburn | 2008-08-26 20:14:01 -0400 Remove k5_pthread_mutex_*lock macros. r832@NOME-KING: raeburn | 2008-08-26 20:19:14 -0400 Update comments a bit for lack of debug support. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20696 dc483132-0cff-0310-8789-dd5450dbe970
* lean client changesZhanna Tsitkov2008-08-202-8/+3
| | | | | | | | | All changes are under LEAN_CLIENT macro. Application server functionality is disabled. Ticket:new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20680 dc483132-0cff-0310-8789-dd5450dbe970
* profile write code should only quote empty stringsAlexandra Ellwood2008-08-191-1/+1
| | | | | | | | | Assigned to Ken for review. ticket: new owner: raeburn git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20674 dc483132-0cff-0310-8789-dd5450dbe970
* Shorter export list, dumping a bunch of stuff most clients probably would't needKen Raeburn2008-08-121-278/+149
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20647 dc483132-0cff-0310-8789-dd5450dbe970
* Add a new directory, configured but not built by default, and neverKen Raeburn2008-08-122-0/+506
| | | | | | | | installed, where we can build the main client libraries all together into one library, and experiment with configuration changes for a client-only library. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20646 dc483132-0cff-0310-8789-dd5450dbe970
* Disable caching on Mac for nowKen Raeburn2008-08-121-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20644 dc483132-0cff-0310-8789-dd5450dbe970
* Always define krb5int_pthread_loaded, for consistencyKen Raeburn2008-08-121-0/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20643 dc483132-0cff-0310-8789-dd5450dbe970
* If CONFIG_SMALL is defined, always use function calls for k5_mutex_lockKen Raeburn2008-08-061-0/+1
| | | | | | | | | and _unlock. On ppc darwin builds with debug info, this makes lib*.dylib a total of about 46K (~3%) smaller; "size" reports a reduction in text and/or "other" sizes for libgssapi_krb5, libkdb5, libkdb_ldap, and libkrb5. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20623 dc483132-0cff-0310-8789-dd5450dbe970
* Fix bug in array size calculationKen Raeburn2008-08-061-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20610 dc483132-0cff-0310-8789-dd5450dbe970
* Always use unsigned for one-bit fieldsKen Raeburn2008-08-061-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20609 dc483132-0cff-0310-8789-dd5450dbe970
* Use load/store_32_be instead of open-codingKen Raeburn2008-08-021-8/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20600 dc483132-0cff-0310-8789-dd5450dbe970
* Catch a few more cases of unchecked k5_mutex_lock callsKen Raeburn2008-07-221-4/+7
| | | | | | ticket: 5962 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20567 dc483132-0cff-0310-8789-dd5450dbe970
* An implementation of opendir() and friends for _WIN32Jeffrey Altman2008-07-211-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
* Don't set LOCAL_SUBDIRS in many places and SUBDIRS in a few andKen Raeburn2008-07-201-1/+1
| | | | | | | 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
* Check return value from k5_mutex_lock() to partially mitigate someTom Yu2008-07-161-1/+2
| | | | | | | | 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
* Apply patch from Apple to handle missing krb5.conf for zeroconfTom Yu2008-07-101-2/+5
| | | | | | | | situations. ticket: 5632 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20509 dc483132-0cff-0310-8789-dd5450dbe970
* Suppress some glibc issues found on x86_64Ken Raeburn2008-06-201-0/+69
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20445 dc483132-0cff-0310-8789-dd5450dbe970
* We're not using this makedepend implementation any moreKen Raeburn2008-06-0410-3026/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20362 dc483132-0cff-0310-8789-dd5450dbe970
* Profile library should not call rw_access earlier than neededAlexandra Ellwood2008-05-273-9/+20
| | | | | | | | | | Call rw_access lazily so we only call access just before we need to write to the file to avoid calling access as often. Deprecated bit in profile structures to track writability. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20341 dc483132-0cff-0310-8789-dd5450dbe970
* (more) After malloc/realloc/calloc/strdup/asprintf failures, useKen Raeburn2008-04-301-12/+12
| | | | | | | | ENOMEM explicitly instead 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@20313 dc483132-0cff-0310-8789-dd5450dbe970
* After malloc/realloc/calloc failures, return ENOMEM explicitly insteadKen Raeburn2008-04-307-17/+17
| | | | | | | 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
* Generate a large enough array to hold all the base/extension pairs.Alexandra Ellwood2008-04-251-11/+17
| | | | | | | | Store pairs without overlapping. ticket: 5948 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20308 dc483132-0cff-0310-8789-dd5450dbe970
* Protect CFBundle calls with mutexesAlexandra Ellwood2008-03-211-81/+84
| | | | | | | | | | | | | | | | | CFBundles are refcounted and the recounts are not threadsafe. Protect CFBundles used for loading bundled plugins with a mutex to prevent crashes when multiple threads are loading and unloading the same plugin. As part of this we use thread-safe dlopen/dlsym/dlclose for the actual loading and unloading and just use CFBundle to get the path to the actual executable. This reduces the number of places we need to wrap CFBundles with mutexes and the amount of Mac-specific code in the plugin code. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20285 dc483132-0cff-0310-8789-dd5450dbe970
* tools for svn:eol-style fixupsKen Raeburn2008-02-052-0/+21
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20219 dc483132-0cff-0310-8789-dd5450dbe970
* Remove Mac-specific bit unused in KfM that causes test failures nowKen Raeburn2007-12-141-8/+0
| | | | | | under Darwin UNIXy builds. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20177 dc483132-0cff-0310-8789-dd5450dbe970
* Set close-on-exec flag in most places where file descriptors areKen Raeburn2007-10-224-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Don't leak fd on fork errorKen Raeburn2007-10-201-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20136 dc483132-0cff-0310-8789-dd5450dbe970