summaryrefslogtreecommitdiffstats
path: root/src/util
Commit message (Collapse)AuthorAgeFilesLines
* In testrealm.py, add ksu and kvno to the list of build directoriesGreg Hudson2010-04-041-1/+3
| | | | | | containing programs. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23858 dc483132-0cff-0310-8789-dd5450dbe970
* Add a "make testrealm" target using the Python test framework. AsGreg Hudson2010-03-082-12/+88
| | | | | | | part of this, expose the environments in K5Realm as attributes so that test scripts can modify them. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23794 dc483132-0cff-0310-8789-dd5450dbe970
* Make python test start_in_inetd functionEzra Peisach2010-03-071-1/+1
| | | | | | | | | util/k5test.py: Fix incorrect variable used tests/dejagnu/t_inetd.c: Flush stdout after outputting "Ready!" tests/dejagnu/Makefile.in: Always compile t_inetd - even in runtest is not present git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23773 dc483132-0cff-0310-8789-dd5450dbe970
* Add a message parameter to k5test's success(), to briefly indicate theGreg Hudson2010-03-051-6/+9
| | | | | | scope of test scripts. Only displayed when verbose is set. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23768 dc483132-0cff-0310-8789-dd5450dbe970
* Clean up a help string in k5testGreg Hudson2010-03-041-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23764 dc483132-0cff-0310-8789-dd5450dbe970
* Python test frameworkGreg Hudson2010-03-041-0/+1042
| | | | | | | | | | | | Add a framework for writing tests in Python. Documentation is in the initial docstring of util/k5test.py. Inaugurate the framework with two test scripts, t_general.py and t_anonypkinit.py, which together test the same operations as standalone.exp from the dejagnu test suite. ticket: 6672 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23763 dc483132-0cff-0310-8789-dd5450dbe970
* Update dependenciesKen Raeburn2010-02-201-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23740 dc483132-0cff-0310-8789-dd5450dbe970
* validator.py is a tool to validate kerb configuration files. Zhanna Tsitkov2010-02-175-0/+378
| | | | | | | | | First, the configuration file is parsed (confparser.py) and validated against formating errors (such as mismatching brackets) Then the list of the allowed configuration attributes is compiled from k5-int.h and rules.yml Finally, the kerb configuration file is validated against the list of the allowed strings. If the error, or something that validator does not understand, is found the warning is issued in the tree-like form indicating the layer where the problem has occurred. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23732 dc483132-0cff-0310-8789-dd5450dbe970
* update mkrel to deal with changed source layoutTom Yu2010-02-161-2/+8
| | | | | | | | | | | Update mkrel so it deals somewhat better with removed src/lib/des425, NOTICES, etc. ticket: 6663 target_version: 1.8 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23726 dc483132-0cff-0310-8789-dd5450dbe970
* Get rid of kdb_ext.h and allow out-of-tree KDB pluginsGreg Hudson2010-01-271-1/+1
| | | | | | | | | | | | | Move the contents of kdb_ext.h into kdb.h, since there is no meaningful "extensions" category of DB interfaces now that this stuff is in our tree. Allows out-of-tree KDB plugins to be built since we install kdb.h. ticket: 6649 target_version: 1.8 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23674 dc483132-0cff-0310-8789-dd5450dbe970
* The "comment" field of prf_data_t was never actually set nor used, soKen Raeburn2009-12-282-8/+0
| | | | | | delete it and all references. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23524 dc483132-0cff-0310-8789-dd5450dbe970
* Mark and reindent util, with some exceptionsTom Yu2009-12-0752-3410/+3462
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23455 dc483132-0cff-0310-8789-dd5450dbe970
* update dependenciesKen Raeburn2009-12-021-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23433 dc483132-0cff-0310-8789-dd5450dbe970
* Mark and reindent util/supportTom Yu2009-11-3018-1247/+1269
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23392 dc483132-0cff-0310-8789-dd5450dbe970
* Fix boilerplate in zap.cGreg Hudson2009-11-241-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23340 dc483132-0cff-0310-8789-dd5450dbe970
* Punt the volatile cast in the non-gcc, non-Windows version of zap.Greg Hudson2009-11-244-1/+46
| | | | | | | Use a function call into libkrb5support instead, since that's hard to inline. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23339 dc483132-0cff-0310-8789-dd5450dbe970
* Simplify depfix.pl by assuming that all files outside of the sourceGreg Hudson2009-11-231-24/+4
| | | | | | | and build directory (after substitutions) are external headers which should not be tracked. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23314 dc483132-0cff-0310-8789-dd5450dbe970
* Consolidate Makefile variables now that we have only a single globalGreg Hudson2009-11-2212-105/+97
| | | | | | | | | | | | | 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
* Delete obsolete krb5-mark-cstyle.el. (replaced by a python script)Tom Yu2009-11-041-28/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23127 dc483132-0cff-0310-8789-dd5450dbe970
* Correct regexps for matching emacs and cc-mode versions. In reindentTom Yu2009-11-042-2/+49
| | | | | | | | | | targets, chdir to SRCTOP to avoid excessive references to $(SRCTOP) in the find script. Define new variables to avoid errors when creating exception lists for find scripts. Use a python script instead of elisp to mark files. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23125 dc483132-0cff-0310-8789-dd5450dbe970
* Monkey patch for the cc-mode that comes with emacs-23.x; that versionTom Yu2009-11-032-0/+52
| | | | | | | | of cc-mode has a bug that causes incorrect indentation of case labels containing character constants. Already fixed upstream in unreleased cc-mode sources. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23122 dc483132-0cff-0310-8789-dd5450dbe970
* Emacs 21 doesn't have custom-variable-p. Also, adjust to use theTom Yu2009-11-021-5/+5
| | | | | | | correct controlling variables for older incarnations of whitespace-mode. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23121 dc483132-0cff-0310-8789-dd5450dbe970
* Clean up a bunch of signed/unsigned comparison warningsGreg Hudson2009-11-022-6/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23120 dc483132-0cff-0310-8789-dd5450dbe970
* Simplify krb5int_get_error (and fix a cast-qual warning) by notGreg Hudson2009-11-011-24/+7
| | | | | | worrying so much about system errors longer than 1K. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23118 dc483132-0cff-0310-8789-dd5450dbe970
* Be a little more const-correct in krb5int_vset_error_flGreg Hudson2009-11-011-13/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23117 dc483132-0cff-0310-8789-dd5450dbe970
* Rework in an attempt to deal with variant Emacs versionsTom Yu2009-11-011-16/+32
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23113 dc483132-0cff-0310-8789-dd5450dbe970
* make mark-cstyleTom Yu2009-10-3145-760/+751
| | | | | | make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
* Fixes for Emacs 22 compatibilityKen Raeburn2009-10-301-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23099 dc483132-0cff-0310-8789-dd5450dbe970
* Tweak batch reindent some more. Limit the initial bulk reindent, andTom Yu2009-10-301-11/+30
| | | | | | refine the exception list somewhat. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23096 dc483132-0cff-0310-8789-dd5450dbe970
* New elisp file to mark C styles in files. New top-level MakefileTom Yu2009-10-281-0/+28
| | | | | | | target "make mark-cstyle". The exception list is not final; it's just a starting point for discussion. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23082 dc483132-0cff-0310-8789-dd5450dbe970
* Update to use heuristics for setting "krb5" style based on file localTom Yu2009-10-282-8/+25
| | | | | | variable settings. Improve friendliness of variant loading orders. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23078 dc483132-0cff-0310-8789-dd5450dbe970
* Add "reindent" target to top-level Makefile.in. AddTom Yu2009-10-271-0/+33
| | | | | | | | | | krb5-batch-indent.el. These perform a batch reindent based upon the Emacs file-local variable settings, taking care to distinguish between files that are supposed to conform to the coding style versus those that are marked as being exceptions. A later commit will explicitly mark the files that we expect to conform to our coding standards. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23061 dc483132-0cff-0310-8789-dd5450dbe970
* Fix missing emacs file variable markers. Add krb5-c-style.el: theTom Yu2009-10-261-0/+30
| | | | | | emacs lisp settings for the standard coding style. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23049 dc483132-0cff-0310-8789-dd5450dbe970
* Changed the crypto make system to add build flexibility. The update cancels ↵Zhanna Tsitkov2009-10-231-8/+8
| | | | | | the requirement for the dir structures to be identical in all crypto implementation and supports impl. dependent tests. Also, minor libk5crypto.exports list reduction ( from f_tables) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22995 dc483132-0cff-0310-8789-dd5450dbe970
* Move destest to builtin/des, because it depends on overriding someTom Yu2009-10-101-1/+1
| | | | | | | | internals. Make depend. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22877 dc483132-0cff-0310-8789-dd5450dbe970
* Re-run make depend without autoconf.h in the source treeGreg Hudson2009-09-164-76/+72
| | | | 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-164-73/+77
| | | | | | bigredbutton: whitespace git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22769 dc483132-0cff-0310-8789-dd5450dbe970
* Add t_unal.c to SRCS and generate dependencies..Ezra Peisach2009-09-152-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22765 dc483132-0cff-0310-8789-dd5450dbe970
* Test byte ordering determination and unaligned accessKen Raeburn2009-09-152-2/+52
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22762 dc483132-0cff-0310-8789-dd5450dbe970
* Crypto modularity proj: OpemSSL crypto feed for ↵Zhanna Tsitkov2009-09-031-1/+1
| | | | | | | | hmac/md5/md4/sha1/rc4/des/des3(w/o iov) bigredbutton: whitespace git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22709 dc483132-0cff-0310-8789-dd5450dbe970
* Disable the COPY_FIRST_CANONNAME workaround on Linux glibc 2.4 andGreg Hudson2009-08-281-5/+16
| | | | | | | | | | later, since it leaks memory on fixed glibc versions. We will still leak memory on glibc 2.3.4 through 2.3.6 (e.g. RHEL 4) but that's harder to detect. ticket: 6534 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22643 dc483132-0cff-0310-8789-dd5450dbe970
* Rename db2 header files db.h and db-config.h in the source tree, soKen Raeburn2009-08-211-1/+3
| | | | | | | | | | | | | | | | | that there will always be only one version of each name in the include path (namely, the copy made in the build tree, or the generated db.h if not using the in-tree one). This should fix some minor problems with different dependency lists generated on different systems. Sort and uniquify dependency header names before doing substitutions, as well as after. Look for the db2 headers listed in sorted order. Don't copy db-ndbm.h into the build tree; let libdb2 find it from the source tree only. Update dependencies. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22572 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
* Crypto modularity proj: Separate files under crypto directory based on their ↵Zhanna Tsitkov2009-08-031-14/+16
| | | | | | | | functionality. Move Kerberos specific files into krb subdir and MIT specific - into builtin subdir. Place all tests into crypto_tests subfolder. bigredbutton: whitespace git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22477 dc483132-0cff-0310-8789-dd5450dbe970
* reduce some mutex performance problems in profile libraryKen Raeburn2009-06-183-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In profile_node_iterator we unlock a mutex in order to call profile_update_file_data, which wants to lock that mutex itself, and then when it returns we re-lock the mutex. (We don't use recursive mutexes, and I would continue to argue that we shouldn't.) On the Mac, when running multiple threads, it appears that this results in very poor peformance, and much system and user CPU time is spent working with the locks. (Linux doesn't seem to suffer as much.) So: Split profile_update_file_data into a locking wrapper, and an inner routine that does the real work but requires that the lock be held on entry. Call the latter from profile_node_iterator *without* unlocking first, and only unlock if there's an error. This doesn't move any significant amount of work into the locking region; it pretty much just joins locking regions that were disjoint for no good reason. On my tests on an 8-core Mac, in a test program running gss_init_sec_context in a loop in 6 threads, this brought CPU usage per call down by 40%, and improved wall-clock time even more. Single-threaded performance improved very slightly, probably in the noise. Linux showed modest improvement (5% or less) in CPU usage in a 3-thread test on a 4-core system. Similar tests with gss_accept_sec_context showed similar contention around the profile-library mutexes, but I haven't analyzed the performance changes there from this patch. More work is needed, but this will help. ticket: 6515 tags: pullup target_version: 1.7.1 version_reported: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22418 dc483132-0cff-0310-8789-dd5450dbe970
* UCS2 support doesn't handle upper half of BMPGreg Hudson2009-05-141-29/+37
| | | | | | | | | | | | Make krb5_ucs2 an unsigned type. Eliminate the need for distinguished values for ucs2 and ucs4 characters by changing the API of the single- character conversion routines. ticket: 6489 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22350 dc483132-0cff-0310-8789-dd5450dbe970
* In util/support/utf8_conv.c, the SWAP16 macro is invoked with anTom Yu2009-05-131-6/+4
| | | | | | | | | | | | | | | | argument that has side effects. On platforms where SWAP16 can evaluate its argument twice (including platforms where utf8_conv.c creates a fallback definition for the SWAP16 macro), this can cause a read overrun by a factor of two. Rearrange the data flow to avoid calling SWAP16 with an argument that has side effects. ticket: 6486 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22348 dc483132-0cff-0310-8789-dd5450dbe970
* Add DEBUG_ERROR_LOCATIONS supportGreg Hudson2009-04-292-2/+34
| | | | | | | | | | | | If DEBUG_ERROR_LOCATIONS is defined, replace uses of krb5_set_error_message and krb5int_set_error with calls to the new _fl variants of those functions, and include filename and line number information in the calls. Requires C99-style variadic macros if defined. ticket: 6479 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22291 dc483132-0cff-0310-8789-dd5450dbe970
* Subject k5_utf8s_to_ucs2s could deref NULL pointer..Ezra Peisach2009-04-071-3/+5
| | | | | | | | | | | Based on usage of this static function, this will never happen as results are always malloced (and checked) by caller. However, the function is already coded to handle the first argument being null - so be consistent throughout. ticket: git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22177 dc483132-0cff-0310-8789-dd5450dbe970
* Null pointer defref in adding infoEzra Peisach2009-04-071-1/+1
| | | | | | | | | | | Clearly the code is broken - and we either never use it - or callers never pass NULL... Detected by clang static checker. ticket: 6442 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22172 dc483132-0cff-0310-8789-dd5450dbe970