summaryrefslogtreecommitdiffstats
path: root/src/util/et
Commit message (Collapse)AuthorAgeFilesLines
* Avoid assertion failure in error_messageGreg Hudson2014-01-171-2/+3
| | | | | | | | | | | | r17942 added a call to get_thread_buffer in the first part of error_message, prior to the call to com_err_initialize. This can cause an assertion failure from k5_getspecific if error_message is called on a system error before any other com_err functions are called. Move the initialization call earlier to prevent this. ticket: 7822 (new) target_version: 1.12.2 tags: pullup
* Reduce boilerplate in makefilesGreg Hudson2013-05-161-8/+0
| | | | | | | | | Provide default values in pre.in for PROG_LIBPATH, PROG_RPATH, SHLIB_DIRS, SHLIB_RDIRS, and STOBJLISTS so that they don't have to be specified in the common case. Rename KRB5_RUN_ENV and KRB5_RUN_VARS to RUN_SETUP (already the most commonly used name) and RUN_VARS. Make sure to use DEFINES for local defines (not DEFS). Remove some other unnecessary makefile content.
* Assume mutex locking cannot failGreg Hudson2013-05-142-27/+13
| | | | | | | | | | | | Locking and unlocking a non-recursive mutex is a simple memory operation and should not fail on any reasonable platform with correct usage. A pthread mutex can return EDEADLK on lock or EPERM on unlock, or EINVAL if the mutex is uninitialized, but all of these conditions would reflect serious bugs in the calling code. Change the k5_mutex_lock and k5_mutex_unlock wrappers to return void and adjust all call sites. Propagate this change through k5_cc_mutex_lock and k5_cc_mutex_unlock as well.
* make dependGreg Hudson2013-01-101-1/+1
| | | | | Mostly this gets rid of the trailing space on line 2 after bb76891f5386526bdf91bc790c614fc9296cb5fa.
* Remove some dead Makefile codeBen Kaduk2012-09-251-10/+0
| | | | | FILES is unused in util/{ss,et}/Makefile.in; some other unused variables were nearby.
* Avoid side effects in assert expressionsGreg Hudson2012-03-091-4/+8
| | | | | | | | | | | | asserts may be compiled out with -DNDEBUG, so it's wrong to use an assert expression with an important side effect. (We also have scores of side-effecting asserts in test programs, but those are less important and can be dealt with separately.) ticket: 7105 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25760 dc483132-0cff-0310-8789-dd5450dbe970
* Add localization support to com_errGreg Hudson2011-06-104-13/+62
| | | | | | | | | | | | | | | | * Add compile_et arguments --textdomain and --localedir. * Store text domain and localedir at the end of error tables. * error_message() calls dgettext if the table has a text domain. * add_error_table() calls bindtextdomain if the table has a localedir. * Define N_() as no-op in generated source and mark up error messages. * When using system compile_et, test for --textdomain support. * Use --textdomain option when available. * Run xgettext over generated sources in compile_et rule. * Translate com_err results in krb5int_get_error() if com_err won't. ticket: 6918 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24960 dc483132-0cff-0310-8789-dd5450dbe970
* Remove static error table list in built-in com_errGreg Hudson2011-06-052-69/+32
| | | | | | | | | | _et_list has been private to error_message.c since March 2004, and since nothing in that file ever added entries to it, it is always NULL. As it's not doing any good, get rid of it, and rename the dynamic error table list to "et_list", along with its type. Also remove some old lclint annotations. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24947 dc483132-0cff-0310-8789-dd5450dbe970
* Adjust most C source files to match the new standards for copyrightGreg Hudson2011-03-092-9/+7
| | | | | | and license comments. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24695 dc483132-0cff-0310-8789-dd5450dbe970
* Use for loops for recursion in the Windows build, cutting down on theGreg Hudson2010-11-281-1/+1
| | | | | | | | | verbiage in Makefile.in files. For correctness of output, every Makefile.in mydir= definition is changed to use $(S) instead of /. ticket: 6826 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24536 dc483132-0cff-0310-8789-dd5450dbe970
* Mark and reindent util, with some exceptionsTom Yu2009-12-0711-513/+524
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23455 dc483132-0cff-0310-8789-dd5450dbe970
* Consolidate Makefile variables now that we have only a single globalGreg Hudson2009-11-222-6/+5
| | | | | | | | | | | | | configure script: $(SRCTOP) --> $(top_srcdir) $(srcdir)/$(thisconfigdir) --> $(top_srcdir) $(thisconfigdir) --> $(BUILDTOP) $(myfulldir) --> $(mydir) ticket: 6583 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23308 dc483132-0cff-0310-8789-dd5450dbe970
* Clean up a bunch of signed/unsigned comparison warningsGreg Hudson2009-11-021-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23120 dc483132-0cff-0310-8789-dd5450dbe970
* make mark-cstyleTom Yu2009-10-316-12/+11
| | | | | | make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
* Re-run make depend without autoconf.h in the source treeGreg Hudson2009-09-161-5/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22775 dc483132-0cff-0310-8789-dd5450dbe970
* Crypto modularity proj.: Move prf and random-to-key ops from backend to krbZhanna Tsitkov2009-09-161-5/+5
| | | | | | bigredbutton: whitespace git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22769 dc483132-0cff-0310-8789-dd5450dbe970
* Get "make depend" to work in an unbuilt source tree, since bad depsGreg Hudson2009-08-031-1/+1
| | | | | | | | files can make it difficult to build the tree. To do this, make the depends target depend on generated header files and on header file copies or links into the main include directory. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22486 dc483132-0cff-0310-8789-dd5450dbe970
* move generated dependencies out of Makefile.inKen Raeburn2009-01-052-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move automatically-generated dependencies into separate files in the source tree, and take the data out of Makefile.in. Keep the "make depend" rules for stripping out the dependencies from Makefile.in, in case some optional directories were missed, but everything that builds on my UNIX build has been converted. (Converting a directory just requires creating an empty "deps" file so that config.status can build the makefile, and then later running "make depend" in that directory to get the correct content for it.) Change configure scripts to incorporate the "deps" file when building each Makefile. This change requires the existence of a file "deps" in each source directory where we build a makefile, even if there are no sources for which to compute dependencies; a switch to GNU make would let us conditionalize that, but we can assess that later. Update dependencies for the generate Makefile itself to list the deps file. This will also require some minor tweaking of the Windows build, to make it incorporate the new deps file. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21701 dc483132-0cff-0310-8789-dd5450dbe970
* Convert many uses of sprintf to snprintf or asprintfGreg Hudson2008-12-011-2/+2
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21258 dc483132-0cff-0310-8789-dd5450dbe970
* Use strlcpy instead of strcpy in many placesGreg Hudson2008-10-241-1/+1
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20919 dc483132-0cff-0310-8789-dd5450dbe970
* Use asprintf instead of malloc/strcpy/strcat in many placesGreg Hudson2008-10-202-4/+3
| | | | | | | 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-201-4/+1
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20898 dc483132-0cff-0310-8789-dd5450dbe970
* r820@NOME-KING: raeburn | 2008-08-26 18:37:41 -0400Ken Raeburn2008-08-271-6/+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
* 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
* After malloc/realloc/calloc failures, return ENOMEM explicitly insteadKen Raeburn2008-04-302-4/+4
| | | | | | | 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
* 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
* 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
* Attach format attributes to declarations of various message-formattingKen Raeburn2007-06-291-2/+10
| | | | | | | | | | | | | 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
* 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
* 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
* Remove unused fileKen Raeburn2007-01-201-50/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19089 dc483132-0cff-0310-8789-dd5450dbe970
* Use $(VALGRIND) when running programs using $(KRB5_RUN_ENV) orKen Raeburn2006-10-131-2/+2
| | | | | | | | | | | | | | | | | | $(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
* autoconf 2.60 compatibilityKen Raeburn2006-06-281-2/+2
| | | | | | | | | | | 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
* * configure.in: Set and substitute KSU_LIBS, SETENVOBJ, DO_TCL. GenerateKen Raeburn2006-05-182-29/+2
| | | | | | | | | makefiles for util/et, util/profile, lib/kdb, clients and those clients subdirectories built on UNIX, rather than running configure there. Deleted configure.in scripts for those directories, and changed Makefile.in definitions of thisconfigdir and mydir. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18018 dc483132-0cff-0310-8789-dd5450dbe970
* * error_table.h (ET_EBUFSIZ): Increase to 1k.Ken Raeburn2006-04-182-42/+39
| | | | | | | | | | | | * error_message.c (get_thread_buffer): New function, split out from error_message. (error_message): Call it. Also try strerror_r with the per-thread buffer, if both are available, before trying strerror. ticket: 3620 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17942 dc483132-0cff-0310-8789-dd5450dbe970
* Remove ChangeLog files from the source tree. From now on, theSam Hartman2006-04-111-984/+0
| | | | | | | subversion commit log entry needs to include information that would have been in the changelog. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17893 dc483132-0cff-0310-8789-dd5450dbe970
* Remove .Sanitize and .rconf files, no longer usedKen Raeburn2006-04-111-60/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17888 dc483132-0cff-0310-8789-dd5450dbe970
* set DEFS empty in more placesKen Raeburn2006-04-042-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17838 dc483132-0cff-0310-8789-dd5450dbe970
* include autoconf.h in a few more placesKen Raeburn2006-04-032-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17835 dc483132-0cff-0310-8789-dd5450dbe970
* make depend, now with dependency sortingKen Raeburn2006-03-311-8/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17811 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Supply all three arguments when calling AC_DEFINEKen Raeburn2006-03-282-1/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17788 dc483132-0cff-0310-8789-dd5450dbe970
* build and export set/reset_com_err_hook on windowsKen Raeburn2006-03-272-2/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17781 dc483132-0cff-0310-8789-dd5450dbe970
* Instead of arbitrary division of headers into include and include/krb5, withKen Raeburn2006-03-111-5/+4
| | | | | | | | | | | | include directives sometimes using krb5/foo.h and sometimes using foo.h, and -I options always given for both directories in both source and build trees, push include/krb5/* up a level and drop the krb5 directory (except, for the moment, the change log). Updated #include directives, -I options, and dependencies accordingly, and deleted one or two bits of old, unused code that was noticed in the process. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17730 dc483132-0cff-0310-8789-dd5450dbe970
* Add a new recursive target "generated-files-mac", for producing theKen Raeburn2006-03-112-0/+6
| | | | | | | generated files that lxs wants to feed into the Mac build system. (First approximation, may want some fine tuning later.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17728 dc483132-0cff-0310-8789-dd5450dbe970
* make dependTom Yu2005-11-291-2/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17505 dc483132-0cff-0310-8789-dd5450dbe970
* fix more executable permissionsTom Yu2005-08-252-0/+0
| | | | | | | | | | Fix some more executable permissions missing from import. ticket: new tags: pullup target_version: 1.4.3 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17357 dc483132-0cff-0310-8789-dd5450dbe970
* Delete .cvsignore files; contents have already been Sam Hartman2005-08-241-13/+0
| | | | | | set on svn:ignore properties. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17353 dc483132-0cff-0310-8789-dd5450dbe970
* All configure.in scripts: Use K5_AC_INIT instead of AC_INITKen Raeburn2005-08-202-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17342 dc483132-0cff-0310-8789-dd5450dbe970
* Update dependenciesKen Raeburn2005-06-211-1/+2
| | | | | | | | | N.B.: The version of gcc used this time ("gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)") seems to emit some duplicate dependencies -- some header files get listed twice. This is annoying but shouldn't cause any harm.... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17256 dc483132-0cff-0310-8789-dd5450dbe970