summaryrefslogtreecommitdiffstats
path: root/src/util
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* remove error tables by pointer Jeffrey Altman2007-10-011-3/+3
| | | | | | | | | | | | | | | 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
* def-check.pl needs to ignore ordinals in .def fileKen Raeburn2007-10-011-0/+1
| | | | | | | | | 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
* profile library memory leaks introduced when malloc returns 0Ezra Peisach2007-09-263-2/+7
| | | | | | | | | | | | | | | | | | | | 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
* stdint.h should only be accessed if HAVE_STDINT_H definedJeffrey Altman2007-09-221-1/+3
| | | | | | | | | stdint.h does not exist on Windows. Conditionally include it based upon HAVE_STDINT_H ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19965 dc483132-0cff-0310-8789-dd5450dbe970
* Ignore dependency lines beginning with '#' to deal with gccTom Yu2007-09-191-0/+1
| | | | | | | | | | -fworking-directory output during make depend. ticket: 5752 target_version: 1.6.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19961 dc483132-0cff-0310-8789-dd5450dbe970
* Bidirectional map template codeKen Raeburn2007-09-041-0/+194
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19918 dc483132-0cff-0310-8789-dd5450dbe970
* Fix bug in clearing of new storageKen Raeburn2007-09-041-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19917 dc483132-0cff-0310-8789-dd5450dbe970
* Ignore KRB5_ATTR_DEPRECATEDKen Raeburn2007-08-271-0/+1
| | | | | | | ticket: 2836 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19886 dc483132-0cff-0310-8789-dd5450dbe970
* remap mechanism-specific status codes in mechglue/spnegoKen Raeburn2007-08-165-0/+547
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch creates a mapping in the mechglue/spnego code to modify mechanism status codes when passing them back to the application, so that mechglue's display_status dispatcher can determine the correct mechanism to dispatch to. This is part of the "get enhanced error messages from gssapi applications" project; ticket 5590 has updates to the Kerberos 5 mechanism to extract enhanced error messages (when there are any) from the Kerberos library. util/gen.pl, util/t_*.pm: New code generation script and templates. lib/gssapi/generic: Add a new, global mapping that enumerates the {mechOID,status} pairs as they're seen, allowing a magic mechOID value to indicate com_err error codes from mechglue and spnego, and reserving status code 0 for unknown errors. Preload the Kerberos "wrong principal" error code once for each mechanism OID used for Kerberos, so the entries get fixed positions (1-3) in the table. lib/gssapi/gss_libinit.c: Call the initializer and destructor functions. lib/gssapi/mechglue, lib/gssapi/spnego: Enter all mechanism-generated or locally-generated status codes into the mapping table, and return the table index to the application. Do the reverse in display_status, to get the messages from the mechanism.. lib/rpc: Define new function gssrpcint_printf to use for debugging instead of printf, to redirect output away from dejagnu; add a couple more debugging calls. Check for minor status codes 1-3 now instead of KRB5KRB_AP_WRONG_PRINC. tests/dejagnu/krb-standalone/gssftp.exp: Test getting more detailed error messages back, by having the ftp client attempt to authenticate to a non-existent service, and examining the error message for the service principal name. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19831 dc483132-0cff-0310-8789-dd5450dbe970
* Don't define vsnprintf for Windows hereKen Raeburn2007-08-011-6/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19741 dc483132-0cff-0310-8789-dd5450dbe970
* Avoid unchecked sprintf in some more support codeKen Raeburn2007-07-121-2/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19704 dc483132-0cff-0310-8789-dd5450dbe970
* Avoid use of unchecked sprintf in libraries. Use asprintf if theKen Raeburn2007-07-123-29/+22
| | | | | | | 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
* make dependKen Raeburn2007-07-101-23/+37
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19688 dc483132-0cff-0310-8789-dd5450dbe970
* Add a note at the start of the output reminding the reader that it's a ↵Ken Raeburn2007-07-041-0/+7
| | | | | | generated file git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19674 dc483132-0cff-0310-8789-dd5450dbe970
* Perl code for generating "map" routines from a common template withKen Raeburn2007-07-042-0/+178
| | | | | | | | | | supplied type info. * ktemplate.pm: Code for parsing a command line and writing out a supplied template with substitutions. * gen-map.pl: Parameter info and template for "map" type. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19669 dc483132-0cff-0310-8789-dd5450dbe970
* Include k5-platform.hKen Raeburn2007-07-021-0/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19658 dc483132-0cff-0310-8789-dd5450dbe970
* Attach format attributes to declarations of various message-formattingKen Raeburn2007-06-292-3/+15
| | | | | | | | | | | | | routines under gcc. In a couple of routines, hard-code the preference for using the vsnprintf paths instead of list-of-int-arguments hacks now that we're assuming vsnprintf is available in other places. Installed headers affected: com_err.h (com_err, com_err_va) ss.h (ss_error) krb5.h (krb5_set_error_message, krb5_vset_error_message) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19653 dc483132-0cff-0310-8789-dd5450dbe970