summaryrefslogtreecommitdiffstats
path: root/src/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't build dependencies for v4rcp.c.Ken Raeburn2008-11-046-42/+52
| | | | | | 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
* partial rewrite of the ASN.1 encodersKen Raeburn2008-10-253-15/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of a pile of macros generating code, that have to be threaded together in just the right way to get a valid ASN.1 encoding, we now have a pile of macros for defining data structures describing the objects and the ASN.1 types they should be encoded as, which structures are interpreted by recursive invocations of an encoder engine; there should be somewhat less rope for accidentally creating invalid encodings. The new macros are commented in asn1_k_encode.c. Putting most of the work into the encoder engine also reduces the code size (in one configuration, including LDAP-KDB and PKINIT encoders, code size went from 37K to <16K, though 10K of tables were added, and the PKINIT encoders are still open-coded). Some encoder interfaces have been revised to be more regular -- all now take one pointer to const argument (no two-input encoders, no pointer-to-non-const-pointer-to-const). A few encoders were eliminated or disabled because they were neither used nor exported from the library. The LDAP-KDB encoder has been converted, but the PKINIT encoders have not as there are no regression tests for them currently. There is still plenty of room for improvement; some notes on specific ideas have been added. String encoding primitives have been combined to reduce code size. A primitive for encoding bit strings has been added. Some miscellaneous warnings in the decoders have been cleaned up. A new dejagnu test case is added that ensures that KRB-SAFE messages get exercised. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20923 dc483132-0cff-0310-8789-dd5450dbe970
* More regression tests for ASN.1 encodersKen Raeburn2008-10-255-2/+174
| | | | | | | | | Export encode_krb5_sam_response_2 and encode_krb5_enc_sam_response_enc_2 via accessor. Add encode tests for encode_krb5_sam_key, _enc_sam_response_enc, _predicted_sam_response, _sam_response_2, _enc_sam_response_enc_2. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20922 dc483132-0cff-0310-8789-dd5450dbe970
* Use strlcpy instead of strcpy in many placesGreg Hudson2008-10-242-3/+6
| | | | | | | 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-201-14/+7
| | | | | | | 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-202-8/+4
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20898 dc483132-0cff-0310-8789-dd5450dbe970
* Fix tests/misc/Makefile.in to use KRB5_BASE_LIBS instead of KRB5_LIB,Greg Hudson2008-10-161-2/+2
| | | | | | | making it consistent with other programs we build. KRB5_LIB by itself may not find dependent libraries if they haven't been installed yet. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20879 dc483132-0cff-0310-8789-dd5450dbe970
* handle stash file names with missing keytab type spec and colon in pathKen Raeburn2008-10-151-1/+3
| | | | | | | | | | | | | | | | | | | | Currently the keytab name resolution code will pass off any name with no colon to the default keytab type handler, which is the FILE handler. It will also check for Windows file names consisting of one letter followed by a colon, and treat them as FILE specs also. If a UNIX pathname contains a colon, however, and no type was explicitly specified, the leading part of the pathname gets treated as a type name and fails to match anything. It should instead treat type-less names starting with "/" as FILE specs also. Tweak the test suite to use such a name. Report and patch from Apple. rdar://problem/6179239 ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20872 dc483132-0cff-0310-8789-dd5450dbe970
* makedependKen Raeburn2008-10-151-3/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20870 dc483132-0cff-0310-8789-dd5450dbe970
* Substitute LDAP in makefiles with "yes" or "no" depending on configuration.Ken Raeburn2008-10-0611-11/+190
| | | | | | | | | Split ASN.1 encode and decode tests so that they can be run independently and/or in parallel. Add ASN.1 tests for LDAP key-data sequence type, run only if LDAP enabled. Use krb5int_access to get at the encoder and decoder. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20832 dc483132-0cff-0310-8789-dd5450dbe970
* whitespaceKen Raeburn2008-10-067-3187/+3187
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20825 dc483132-0cff-0310-8789-dd5450dbe970
* Fix some signed/unsigned warningsKen Raeburn2008-10-064-5/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20824 dc483132-0cff-0310-8789-dd5450dbe970
* Set up db_module_dir correctly in krb5.conf for testTom Yu2008-10-041-0/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20823 dc483132-0cff-0310-8789-dd5450dbe970
* makedependKen Raeburn2008-09-185-41/+49
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20731 dc483132-0cff-0310-8789-dd5450dbe970
* a stash file is not a keytabWill Fiveash2008-08-157-6/+74
| | | | | | | | | Note, this is the commit for the associated Krb Consortium project: Projects/Masterkey Keytab Stash ticket: 194 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20661 dc483132-0cff-0310-8789-dd5450dbe970
* Fix possible locking protocol failure in error handling pathKen Raeburn2008-08-062-2/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20607 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
* Don't use 'log' as a global variable nameKen Raeburn2008-06-021-40/+40
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20354 dc483132-0cff-0310-8789-dd5450dbe970
* Explicitly note number as unsigned to shut gcc upKen Raeburn2008-06-021-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20353 dc483132-0cff-0310-8789-dd5450dbe970
* Add some dependenciesKen Raeburn2007-10-311-1/+20
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20158 dc483132-0cff-0310-8789-dd5450dbe970
* Correct the filenames in commentsKen Raeburn2007-10-312-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20157 dc483132-0cff-0310-8789-dd5450dbe970
* Test more installed headers for C++ compatibilityKen Raeburn2007-10-313-1/+21
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20156 dc483132-0cff-0310-8789-dd5450dbe970
* Set CXX_LINK, CXX_LINK_STATIC, and CXX_LINK_SHARED, parallel to CC_ versions.Ken Raeburn2007-10-311-1/+0
| | | | | | | Assumes for now that libpath, rpath, ldflags, pthread flags and such apply to both C and C++ compilers. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20155 dc483132-0cff-0310-8789-dd5450dbe970
* Don't use GNU make featuresKen Raeburn2007-10-301-2/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20152 dc483132-0cff-0310-8789-dd5450dbe970
* Test that C++ code can use our installed headersKen Raeburn2007-10-293-2/+40
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20149 dc483132-0cff-0310-8789-dd5450dbe970
* Before the error-message tests, make sure the host principal exists,Ken Raeburn2007-09-111-3/+5
| | | | | | | so we get consistent errors. Expect the "keytab not found" error, rather than the "principal doesn't exist" error. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19931 dc483132-0cff-0310-8789-dd5450dbe970
* test program build problemKen Raeburn2007-08-293-78/+113
| | | | | | | | | | | | | | | | | Split out the "standalone" test code from trval.c, so we produce trval.o only once, instead of twice with different compilation flags. One case generated the "trval" program directly, but produced and deleted trval.o as an intermediate step in the compiler, which messes things up if make thinks it's already built trval.o for another test program. Make the standalone test into t_trval. Build problem reported by Will Fiveash of Sun, about ten minutes ago. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19893 dc483132-0cff-0310-8789-dd5450dbe970
* Expect keytab error to be reportedKen Raeburn2007-08-251-4/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19878 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2007-08-164-36/+41
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19832 dc483132-0cff-0310-8789-dd5450dbe970
* remap mechanism-specific status codes in mechglue/spnegoKen Raeburn2007-08-161-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Handle 'Credentials cache file <path> not found'Ken Raeburn2007-07-041-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19673 dc483132-0cff-0310-8789-dd5450dbe970
* Use global spawn_idKen Raeburn2007-07-041-0/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19670 dc483132-0cff-0310-8789-dd5450dbe970
* When skipping debugging '-->' data, only take through the end of the lineKen Raeburn2007-07-041-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19662 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2007-03-282-2/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19301 dc483132-0cff-0310-8789-dd5450dbe970
* Build tests subtree makefiles at top levelKen Raeburn2007-03-2513-54/+24
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19274 dc483132-0cff-0310-8789-dd5450dbe970
* Include autoconf.hKen Raeburn2007-03-253-1/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19273 dc483132-0cff-0310-8789-dd5450dbe970
* Remove test pass that exercises AES256 over UDP, since we also haveKen Raeburn2007-03-141-12/+0
| | | | | | one that exercises the same configuration over TCP. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19224 dc483132-0cff-0310-8789-dd5450dbe970
* Remove from unused_passes a configuration also listed in the default passesKen Raeburn2007-03-091-12/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19215 dc483132-0cff-0310-8789-dd5450dbe970
* Do use valgrind on /bin/sh commands, since that's how we launch kadmind ↵Ken Raeburn2007-03-061-1/+2
| | | | | | currently git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19212 dc483132-0cff-0310-8789-dd5450dbe970
* Delete more stuff for 'clean' and 'distclean' targetsKen Raeburn2007-03-021-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19198 dc483132-0cff-0310-8789-dd5450dbe970
* Conditionalize more bits that might not be defined by the OSKen Raeburn2007-02-161-0/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19167 dc483132-0cff-0310-8789-dd5450dbe970
* Don't need to register WRFILE: keytab type, it's already in the compiled-inKen Raeburn2007-02-011-10/+0
| | | | | | list. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19132 dc483132-0cff-0310-8789-dd5450dbe970
* Memory leak in tests/gssapi/t_imp_name.cEzra Peisach2006-12-311-1/+3
| | | | | | | | | Memory leak by not releasing name_oid from gss_display_name(). (conditional on GSSAPI_V2 being defined). ticket:new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19024 dc483132-0cff-0310-8789-dd5450dbe970
* Inovke krb5_rc_close to shutdown cache - and check for memory leaksEzra Peisach2006-12-181-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18960 dc483132-0cff-0310-8789-dd5450dbe970
* Free allocated memory when no longer usedEzra Peisach2006-10-181-0/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18726 dc483132-0cff-0310-8789-dd5450dbe970
* Invoke krb5_free_principal to remove memory leakEzra Peisach2006-10-181-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18725 dc483132-0cff-0310-8789-dd5450dbe970
* Call freeaddrinfo at end - memory leakEzra Peisach2006-10-181-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18724 dc483132-0cff-0310-8789-dd5450dbe970
* Pass VALGRIND in to runtest. When it's set, redefine spawn to use it forKen Raeburn2006-10-152-2/+41
| | | | | | most commands starting with "/" but not "/bin/sh" and certain others. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18710 dc483132-0cff-0310-8789-dd5450dbe970
* Use $(VALGRIND) when running programs using $(KRB5_RUN_ENV) orKen Raeburn2006-10-137-28/+26
| | | | | | | | | | | | | | | | | | $(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
* Add a policy to the database, then after the dump and restore, checkKen Raeburn2006-10-121-0/+31
| | | | | | | | | | that it's still there. ticket: 4355 tags: pullup target_version: 1.5.2 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18691 dc483132-0cff-0310-8789-dd5450dbe970