summaryrefslogtreecommitdiffstats
path: root/src/util
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Make Lite Client lib link againZhanna Tsitkov2009-03-111-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22077 dc483132-0cff-0310-8789-dd5450dbe970
* Make it link againZhanna Tsitkov2009-03-111-2/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22076 dc483132-0cff-0310-8789-dd5450dbe970
* Don't pass negative numbers to strerrorKen Raeburn2009-02-121-0/+14
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21988 dc483132-0cff-0310-8789-dd5450dbe970
* build strlcpy.c, printf.c, ipc_stream.c on windowsKen Raeburn2009-02-111-1/+17
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21957 dc483132-0cff-0310-8789-dd5450dbe970
* Update t_k5buf.c for the renamed buffer type constantsGreg Hudson2009-02-101-10/+14
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21939 dc483132-0cff-0310-8789-dd5450dbe970
* Rename functions from k5_ipc_stream_* to krb5int_ipc_stream_*, because some ↵Ken Raeburn2009-02-093-64/+64
| | | | | | of them will have to be exported git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21938 dc483132-0cff-0310-8789-dd5450dbe970
* Add variables for optionally building ipc_stream.c; currently emptyKen Raeburn2009-02-091-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21937 dc483132-0cff-0310-8789-dd5450dbe970
* Adjust names to not conflict with Windows headersKen Raeburn2009-02-092-23/+23
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21936 dc483132-0cff-0310-8789-dd5450dbe970
* Include assert.hKen Raeburn2009-02-091-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21935 dc483132-0cff-0310-8789-dd5450dbe970
* Use winsock2.h on Windows. Make initializer value staticKen Raeburn2009-02-091-1/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21934 dc483132-0cff-0310-8789-dd5450dbe970
* More C++ compatibility: Don't use "typedef struct tag *tag"; renameKen Raeburn2009-02-091-3/+3
| | | | | | the tag and keep the same typedefname. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21918 dc483132-0cff-0310-8789-dd5450dbe970
* Unsigned/signed warnings cleanupEzra Peisach2009-02-061-3/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21905 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5int_utf8s_to_ucs2les, free the correct value on error, insteadGreg Hudson2009-02-041-1/+1
| | | | | | | | | | of the caller-supplied result pointer. ticket: 6360 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21881 dc483132-0cff-0310-8789-dd5450dbe970
* Get rid of casts of free() argument to char*, except where it'sKen Raeburn2009-02-021-2/+2
| | | | | | | | casting away const (so as to make this change warning-neutral), and in unicode source (which we may want to keep in sync with another source), and krb5_xfree macro (to be handled separately). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21870 dc483132-0cff-0310-8789-dd5450dbe970
* remove some remnants of krb4-related config file optionsKen Raeburn2009-01-281-2/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21818 dc483132-0cff-0310-8789-dd5450dbe970
* Helper script for processing valgrind logs that don't indicate any errors, ↵Ken Raeburn2009-01-271-0/+71
| | | | | | or are for system programs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21810 dc483132-0cff-0310-8789-dd5450dbe970
* fix trailing whitespaceTom Yu2009-01-223-7/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21779 dc483132-0cff-0310-8789-dd5450dbe970
* whitespaceTom Yu2009-01-223-9/+9
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21778 dc483132-0cff-0310-8789-dd5450dbe970
* Define SWAP16 if not already definedKen Raeburn2009-01-051-0/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21703 dc483132-0cff-0310-8789-dd5450dbe970
* move generated dependencies out of Makefile.inKen Raeburn2009-01-0513-182/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* ifdef out unused functions that are also missing prototypes.Ezra Peisach2009-01-051-0/+2
| | | | | | krb5int_utf8_islower and krb5int_utf8_isupper. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21697 dc483132-0cff-0310-8789-dd5450dbe970
* Merge mskrb-integ onto trunkSam Hartman2009-01-035-1/+1013
| | | | | | | | | | | | | | | | | | | | | | | | The mskrb-integ branch includes support for the following projects: Projects/Aliases * Projects/PAC and principal APIs * Projects/AEAD encryption API * Projects/GSSAPI DCE * Projects/RFC 3244 In addition, it includes support for enctype negotiation, and a variety of GSS-API extensions. In the KDC it includes support for protocol transition, constrained delegation and a new authorization data interface. The old authorization data interface is also supported. This commit merges the mskrb-integ branch on to the trunk. Additional review and testing is required. Merge commit 'mskrb-integ' into trunk ticket: new status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21690 dc483132-0cff-0310-8789-dd5450dbe970
* Remove some unused variablesKen Raeburn2009-01-031-8/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21681 dc483132-0cff-0310-8789-dd5450dbe970
* Revert r21589, and export krb5_get_fallback_host_realm insteadGreg Hudson2008-12-291-0/+1
| | | | | | | | | | | | | | Rationale: Zephyr and AFS both use the Kerberos realm name as the name of the service realm (AFS realm or Zephyr galaxy). AFS can grab the Kerberos realm from the ticket being aklogged, but Zephyr is not necessarily getting credentials at all (you could be sending an unauthenticated message), and currently finds its answer by looking up the realm of the server host. Although we can't currently provide an accurate result for this lookup in the presence of referrals, we do need to provide enough tools to get as good of an answer as libzephyr could have gotten before referrals went in. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21631 dc483132-0cff-0310-8789-dd5450dbe970
* Clean up krb5_get_fallback_host_realm in two respects:Greg Hudson2008-12-241-1/+0
| | | | | | | | | | | | 1. It isn't exported from libkrb5 (and no one seems to complain about that). So give it a krb5int_ name and move its declaration to k5-int.h. Also stop exporting it from the collected client lib. 2. It returned a list of realms, but its only caller assumes that the list contains exactly one realm. So just make it return a single realm. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21589 dc483132-0cff-0310-8789-dd5450dbe970
* Remove krb524, lib/des425, lib/krb4, and include/kerberosIV.Greg Hudson2008-12-182-5/+1
| | | | | | | | | | Remove krb4 build system references and conditionals. Move des425 header stuff referenced by des_int.h into des_int.h. Remove krb4 test cases. ticket: 6303 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21544 dc483132-0cff-0310-8789-dd5450dbe970
* Remove some lingering Saber C cruftGreg Hudson2008-12-051-16/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21293 dc483132-0cff-0310-8789-dd5450dbe970
* Ticket: 6286Zhanna Tsitkov2008-12-051-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21290 dc483132-0cff-0310-8789-dd5450dbe970
* Remove unneeded LEAN_CLIENT #define'sZhanna Tsitkov2008-12-021-2/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21261 dc483132-0cff-0310-8789-dd5450dbe970
* Convert many uses of sprintf to snprintf or asprintfGreg Hudson2008-12-014-20/+25
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21258 dc483132-0cff-0310-8789-dd5450dbe970
* Rename krb5int_buf_cstr to krb5int_buf_data, since k5bufs can be usedGreg Hudson2008-11-053-18/+18
| | | | | | | | | | | for binary data as well as C string data. The buffer will always have a null byte at krb5int_buf_len bytes regardless of whether it contains C string data. ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21003 dc483132-0cff-0310-8789-dd5450dbe970
* Convert many uses of strcpy/strcat (and sometimes sprintf) to acceptedGreg Hudson2008-11-051-1/+1
| | | | | | | | | string-handling functions. ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21001 dc483132-0cff-0310-8789-dd5450dbe970
* Don't build dependencies for v4rcp.c.Ken Raeburn2008-11-041-3/+3
| | | | | | Rebuild dependencies for k5-buf.h, and without krb4 support. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20964 dc483132-0cff-0310-8789-dd5450dbe970
* Maybe include printf.o in t_k5buf buildKen Raeburn2008-11-031-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20959 dc483132-0cff-0310-8789-dd5450dbe970
* Add a few safeties to the k5buf code, to make static analysis tools happierGreg Hudson2008-10-311-1/+5
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20943 dc483132-0cff-0310-8789-dd5450dbe970