summaryrefslogtreecommitdiffstats
path: root/src/util
Commit message (Collapse)AuthorAgeFilesLines
...
* Ignore __attribute__Ken Raeburn2007-06-291-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19651 dc483132-0cff-0310-8789-dd5450dbe970
* Check for null pointer returns when allocating storage.Ken Raeburn2007-06-283-44/+133
| | | | | | | Clean up some memory leaks in out-of-memory error paths. Use strdup and asprintf when appropriate. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19650 dc483132-0cff-0310-8789-dd5450dbe970
* Update mkstemp and export-list handling for WindowsKen Raeburn2007-06-281-3/+19
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19646 dc483132-0cff-0310-8789-dd5450dbe970
* Implement S_ISDIR from S_IFMT or _S_IFMT if necessary (e.g., on Windows)Ken Raeburn2007-06-281-0/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19645 dc483132-0cff-0310-8789-dd5450dbe970
* update dependenciesKen Raeburn2007-06-201-0/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19601 dc483132-0cff-0310-8789-dd5450dbe970
* Move (BSD-licensed) mkstemp from libdb2 to libkrb5support, and renameKen Raeburn2007-06-203-3/+143
| | | | | | | | | | | | | 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
* provide asprintf functionality for internal useKen Raeburn2007-06-201-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I plan to use asprintf in some gssapi error-message management routines, so let's make sure we have the functionality available, implementing it locally if necessary. This implementation assumes vsnprintf is available, an assumption that the support library is already making at the moment. Since this implementation requires calling vsnprintf potentially multiple times with the same va_list, use va_copy if it's available, or provide a hack version (which should work okay if va_list is a scalar or array type that requires no other special handling, and if va_end does nothing interesting, which is usually the case) if the compiler doesn't provide it. I also changed a couple bits of code to use asprintf, to make sure we exercise our implementation in testing. (C99 requires vsnprintf and va_copy; vasprintf is a GNU/BSD extension, but an oh so useful one....) * configure.in: Check for va_copy, or if va_list objects can be simply assigned. Define HAS_VA_COPY and CAN_COPY_VA_LIST as appropriate. * include/k5-platform.h: Define a va_copy macro if the compiler doesn't provide it. * include/k5-platform.h: If vsnprintf isn't available from the OS, abort compilation. If vasprintf isn't available from the OS, provide k5_{v,}asprintf based on vsnprintf and define {v,}asprintf macros. * lib/krb5/keytab/t_keytab.c (do_test): Use asprintf. * util/support/errors.c (krb5int_vset_error): Use asprintf unconditionally. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19595 dc483132-0cff-0310-8789-dd5450dbe970
* profile stores empty string values without double quotesJeffrey Altman2007-04-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prof_parse.c (need_double_quotes): The profile library will happily read in right hand values that represent the empty string by parsing "". However, when storing the same empty string back to a file, the empty string is written without the double quotes. This means that [section] foo = "" becomes [section] foo = which is invalid input. A subsequent attempt to parse the profile will result in an invalid input error. KFW and KFM's realm editors can inadvertently produce an invalid krb5 profile if one of the ignored sections of the input profile contains a right hand value that is "". This patch was produced by Asanka Herath and it was reviewed by jaltman and lxs. ticket: new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19529 dc483132-0cff-0310-8789-dd5450dbe970
* krb5int_open_plugin_dirs errors out if directory does not existAlexandra Ellwood2007-04-051-10/+2
| | | | | | | | | | | If one of the directories in the list doesn't exist and no filenames are passed in because opendir fails and then the code gets an error. opendir() failing should not be a fatal error. The function should just move on to the next directory. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19400 dc483132-0cff-0310-8789-dd5450dbe970
* All Windows apps were popping MessageBoxes when stderr is redirected. ↵Kevin Koch2007-03-271-3/+11
| | | | | | | | | | | | | Console apps shouldn't and no longer do that. Added isGuiApp, which tests gui resource usage Removed duplicate nested tests for _WIN32. Ticket: 5446 Status: resolved Target_Version: 1.6.1 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19292 dc483132-0cff-0310-8789-dd5450dbe970
* Generate makefiles for two static libs plus the python plugin from the ↵Ken Raeburn2007-03-252-19/+2
| | | | | | top-level configure script git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19270 dc483132-0cff-0310-8789-dd5450dbe970
* Remove KRB5_BUILD_LIBRARY_STATIC; always use KRB5_BUILD_LIBRARYKen Raeburn2007-03-251-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19266 dc483132-0cff-0310-8789-dd5450dbe970
* Never set krb5_force_static. Instead, set the defaults for buildingKen Raeburn2007-03-251-1/+1
| | | | | | | | | | | | | | | | shared libraries, and allow a Makefile.in to include a new makefile fragment for building private (static, not installed) libraries. Created another makefile fragment to be included to indicate the shared library has no dependencies. (Currently this is the case only for the libdb2 library, which we don't install, but do build for testing.) The way we construct the library dependency search path arguments doesn't work for an empty list on some platforms. Updated Makefile.in to use @libpriv_frag@ and @libnodeps_frag@ as necessary. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19265 dc483132-0cff-0310-8789-dd5450dbe970
* Fix PROG_LIBPATH, and use -l instead of an explicit filename to build ↵Ken Raeburn2007-03-251-3/+3
| | | | | | profile_tcl git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19263 dc483132-0cff-0310-8789-dd5450dbe970
* Zero sockaddrs in fai_add_entry() so we can compare them with memcmp()Alexandra Ellwood2007-03-191-0/+2
| | | | | | | | | | | | If we don't zero the struct sockaddrs in fai_add_entry() then any sin_zero fields will be left as random memory and the memcmp() will return that the addresses are different even if they aren't. ticket: new target_version: 1.6.1 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19235 dc483132-0cff-0310-8789-dd5450dbe970
* Back out windows specific makefile changeSam Hartman2007-03-031-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19204 dc483132-0cff-0310-8789-dd5450dbe970
* More existence tests; path updateKevin Koch2007-03-021-1/+1
| | | | | | | | | | | Modify remainder of Makefiles that were sensitive to identity/obj or other cleaned files not being present. Update util/et/Makefile.in to look for com_err.h in src/include, not src/include/src. ticket: 5457 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19203 dc483132-0cff-0310-8789-dd5450dbe970
* Delete more stuff for 'clean' and 'distclean' targetsKen Raeburn2007-03-022-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19198 dc483132-0cff-0310-8789-dd5450dbe970
* Don't use struct in6_addr if we don't have IPv6 supportKen Raeburn2007-02-161-0/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19165 dc483132-0cff-0310-8789-dd5450dbe970
* Remove unused fileKen Raeburn2007-01-201-50/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19089 dc483132-0cff-0310-8789-dd5450dbe970
* Handle function names immediately preceded by "*", like "*strdup"Ken Raeburn2007-01-201-1/+1
| | | | | | in k5-int.h+krb5.h. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19085 dc483132-0cff-0310-8789-dd5450dbe970
* Modifications to support the generation and embedding Jeffrey Altman2006-12-071-1/+3
| | | | | | | | | | | | of library manifests into generated EXEs and DLLs. Manifests are required for Windows XP and above when applications are built with Microsoft Visual Studio 2005 (aka VS8) or above. ticket: 3642 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18930 dc483132-0cff-0310-8789-dd5450dbe970
* * fake-addrinfo.c (krb5int_lock_fac, krb5int_unlock_fac): Define only if ↵Ken Raeburn2006-11-021-0/+4
| | | | | | FAI_CACHE git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18755 dc483132-0cff-0310-8789-dd5450dbe970
* use strdupKen Raeburn2006-10-281-4/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18747 dc483132-0cff-0310-8789-dd5450dbe970
* Add supp-int.h to provide prototypes for declared internal functions.Ezra Peisach2006-10-185-4/+43
| | | | | | | *.x: Include this header Makefile.in: Update dependencies git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18728 dc483132-0cff-0310-8789-dd5450dbe970
* Suppress some uninteresting glibc warnings on RHEL4Ken Raeburn2006-10-151-0/+16
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18709 dc483132-0cff-0310-8789-dd5450dbe970
* Use $(VALGRIND) when running programs using $(KRB5_RUN_ENV) orKen Raeburn2006-10-132-3/+3
| | | | | | | | | | | | | | | | | | $(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
* Use const pointers for error messages.Ken Raeburn2006-10-071-4/+4
| | | | | | Add some debugging hooks in the libkrb5 support. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18661 dc483132-0cff-0310-8789-dd5450dbe970
* Fix AIX version of GET_HOST_BY_NAME to use TMP.ent for the result, notKen Raeburn2006-09-281-1/+1
| | | | | | | | the no-longer-defined my_h_ent. ticket: 4256 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18632 dc483132-0cff-0310-8789-dd5450dbe970
* windows thread support frees thread local storage after TlsSetValueJeffrey Altman2006-09-211-2/+2
| | | | | | | | | | | | | threads.c: The return value of TlsSetValue is non-zero on success. As a result of misinterpreting the return value, the memory set in TLS is then freed. A subsequent call to TlsGetValue returns the invalid pointer. ticket: new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18600 dc483132-0cff-0310-8789-dd5450dbe970
* Make it easier to ignore additional directories, like, oh, say, localKen Raeburn2006-09-151-3/+12
| | | | | | install paths for OpenLDAP. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18587 dc483132-0cff-0310-8789-dd5450dbe970
* clean up mkrel patchlevel.h editing etcTom Yu2006-08-211-2/+3
| | | | | | | | | | | * src/util/mkrel: Be more careful editing KRB5_RELDATE. Delete '$ac_config_fragdir' autoconf droppings. ticket: new tags: pullup target_version: 1.5.1 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18475 dc483132-0cff-0310-8789-dd5450dbe970
* check calling conventions specified for WindowsKen Raeburn2006-06-291-16/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we're making changes on UNIX, sometimes we update the Windows export list but forget to make sure we've annotated the function declaration in the header file with a calling convention specification. This patch checks the krb5 and gssapi public headers against the Windows export lists (which are annotated with calling-convention and other info in comments), and flags any inconsistencies in public interfaces. * util/def-check.pl: Be quiet about normal stuff by default; accept a "-v" option to be verbose. Exit with non-zero status if something wrong is detected. Fix some problems in parsing gssapi header files. Handle DECSCRIPTION and HEAPSIZE directives in .def files, and DATA annotation in comments. * include/Makefile.in (verify-calling-conventions-krb5): New target. (all-unix): Depend on it in maintainer mode. * lib/gssapi/Makefile.in (verify-calling-conventions-gssapi): New target. (all-unix): Depend on it in maintainer mode. (merged-gssapi-header.h): New target; assemble public headers into one input file. (clean-misc-unix): New target; delete merged-gssapi-header.h. (clean-unix): Depend on it. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18258 dc483132-0cff-0310-8789-dd5450dbe970
* autoconf 2.60 compatibilityKen Raeburn2006-06-284-8/+8
| | | | | | | | | | | Change all file substitutions so that @-patterns start at the beginning of their lines, as now required by autoconf 2.60 (released Monday). ticket: new target_version: 1.5 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18249 dc483132-0cff-0310-8789-dd5450dbe970
* fix plugin.c to compile on WindowsJeffrey Altman2006-06-281-3/+3
| | | | | | | | | | plugins.c: Move a brace so that the Windows case falls within the conditional ticket: new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18248 dc483132-0cff-0310-8789-dd5450dbe970
* allow multiple calls to krb5_get_error_message to retrieve messageKen Raeburn2006-06-281-7/+15
| | | | | | | | | | | | | (krb5int_get_error): Don't discard old message if the error codes don't match. Try a little harder not to keep messages in the scratch buffer. Return a copy of the message, or "out of memory" in the scratch buffer. (krb5int_vset_error): Try a little harder not to keep messages in the scratch buffer. ticket: new target_version: 1.5 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18246 dc483132-0cff-0310-8789-dd5450dbe970
* mkrel should only generate doc/CHANGES for checkoutsTom Yu2006-06-271-1/+3
| | | | | | | | | | | * src/util/mkrel: Only write doc/CHANGES if doing a checkout. This makes nightly snapshots saner. ticket: new tags: pullup target_version: 1.5 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18243 dc483132-0cff-0310-8789-dd5450dbe970
* write svn log output when building releaseTom Yu2006-06-271-0/+1
| | | | | | | | | | * src/util/mkrel: Write output of svn log -v to doc/CHANGES. ticket: new target_version: 1.5 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18235 dc483132-0cff-0310-8789-dd5450dbe970
* Fix krb5_get_profile to create a new profile duplicating the list ofKen Raeburn2006-06-242-0/+35
| | | | | | | | | | | | | | | | files from the one in the provided context, instead of constructing and checking the file list from scratch. Uses a new function in the profile library, not put into the public API yet. * util/profile/prof_init.c (profile_copy): New function. * util/profile/prof_int.h (profile_copy): Declare it. * lib/krb5/os/Makefile.in (LOCALINCLUDES): Look in the profile source dir. * lib/krb5/os/init_os_ctx.c (krb5_get_profile): Replace all the previous code with a call to profile_copy. ticket: 3925 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18209 dc483132-0cff-0310-8789-dd5450dbe970
* * src/util/mkrel: Edit patchlevel.h before running reconfTom Yu2006-06-221-16/+16
| | | | | | | ticket: 3922 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18204 dc483132-0cff-0310-8789-dd5450dbe970
* * src/util/support/plugins.c (krb5int_open_plugin): Use RTLD_LOCALTom Yu2006-06-221-1/+6
| | | | | | | | | instead of RTLD_GLOBAL. Use RTLD_GROUP if available. ticket: 3909 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18192 dc483132-0cff-0310-8789-dd5450dbe970
* *sigh*Ken Raeburn2006-06-211-3/+3
| | | | | | | | Stupid typo in last change. ticket: 2759 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18184 dc483132-0cff-0310-8789-dd5450dbe970
* (GET_HOST_BY_NAME, GET_HOST_BY_ADDR) [GETHOSTBYNAME_RETURNS_INT]: TestKen Raeburn2006-06-211-9/+11
| | | | | | | | | | | the output hostent pointer as an additional way of checking for errors. Original patch from Nalin Dahyabhai, needed some tweaking to fit in current sources, especially as updated in ticket 3911. ticket: 2759 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18183 dc483132-0cff-0310-8789-dd5450dbe970
* Revert part of previous changes: Move temporary values that don't needKen Raeburn2006-06-211-18/+23
| | | | | | | | longer storage duration, like error codes, back into GET_*_BY_* macros. ticket: 3911 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18182 dc483132-0cff-0310-8789-dd5450dbe970
* Revert an untested change that wasn't supposed to go into this ticketKen Raeburn2006-06-201-1/+1
| | | | | | ticket: 18180 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18181 dc483132-0cff-0310-8789-dd5450dbe970
* getaddrinfo code uses vars outside of storage durationKen Raeburn2006-06-202-83/+94
| | | | | | | | | | | | | | | The calls to gethostbyname_r and friends were wrapped in macros that declared automatic variables for the auxiliary storage needed, but the pointers returned by the functions would be used outside of that scope, when the storage would no longer be valid. Changed the macro interfaces to define new types for the auxiliary storage, and add a new argument to the macros referring to that storage. Changed call sites accordingly. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18180 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Set and substitute SUPPORTLIB_MAJOR based on operating system.Ken Raeburn2006-06-151-2/+2
| | | | | | | * util/support/Makefile.in (LIBMAJOR): Use it. (LIBMINOR): Bump. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18152 dc483132-0cff-0310-8789-dd5450dbe970
* Allow whitespace in front of comments. Patch from Jeremie KoenigRuss Allbery2006-06-121-3/+3
| | | | | | | Ticket: 1988 Version_Reported: 1.3.6 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18118 dc483132-0cff-0310-8789-dd5450dbe970
* Missed a reference to + sizeof() vs * sizeof(). Pointed out byEzra Peisach2006-06-011-1/+1
| | | | | | | | | william fiveash. ticket: 3825 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18071 dc483132-0cff-0310-8789-dd5450dbe970
* krb5int_get_plugin_dir_data() uses + instead of * in reallocEzra Peisach2006-06-011-1/+1
| | | | | | | | | | | | | | | | In line 570, in reallocating the plugin tree - the memory allocated is (count + 1) + sizeof(*p) instead of (count +1 ) * sizeof(*p) Detected while running the krb5kdc under valgrind with memcheck. ticket: new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18070 dc483132-0cff-0310-8789-dd5450dbe970