summaryrefslogtreecommitdiffstats
path: root/src/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Test with varying numbers of principal name components, of varying lengths.Ken Raeburn2008-11-241-2/+19
| | | | | | Test principal modifications, not just additions. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21181 dc483132-0cff-0310-8789-dd5450dbe970
* Set krb4 and priocntl flags via site.exp instead of command lineKen Raeburn2008-11-174-70/+324
| | | | | | | | | | | | | | | | | | Update set of files to clean out at test suite startup, or when deleting the database. Improve support for setting up slave test environment. Don't set KRB5_KDC_PROFILE except in KDC master and slave environments. Create distinct env.sh and env.csh files for different configurations. Move kpropd setup proc into common initialization. Add incremental propagation test: Create new kiprop/$host principal, update kproplog test for the new data. "Propagate" the master database to the slave, add a new principal, start up kpropd, watch for the "OK" message, and check to see if the new principal exists on the slave. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21134 dc483132-0cff-0310-8789-dd5450dbe970
* Fix test bug: kpropd -S exits after successKen Raeburn2008-11-121-7/+12
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21079 dc483132-0cff-0310-8789-dd5450dbe970
* Add basic kprop test, and a little more debugging supportKen Raeburn2008-11-122-3/+179
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21078 dc483132-0cff-0310-8789-dd5450dbe970
* Generate separate master-KDC and slave-KDC config files, withKen Raeburn2008-11-109-291/+385
| | | | | | | | | | | | | different names for the database files. (Slave config files unused as yet.) Ensure that the master-KDC environment is used when running kadmin.local or kdb5_util. Define and use a new proc for deleting all KDC database and keytab files. Set KPASSWD in default.exp. Run kadmin, pwchange, pwhist, gssftp, telnet, v4gssftp tests only once each. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21067 dc483132-0cff-0310-8789-dd5450dbe970
* Delete the pass (one of twelve) that does all KDC exchanges with TCP;Ken Raeburn2008-11-104-56/+162
| | | | | | | | | | | | | | add a test case that sets that up and runs kinit. Add a new support proc that allows running a test only once despite multiple passes; use it for the tcp and iprop tests. According to one totally unscientific measurement, this reduces the tests/dejagnu tests run from ~4200 to ~3800, and cuts over 8% off the run time of those tests, without IMNSHO reducing the effectiveness of the testing. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21064 dc483132-0cff-0310-8789-dd5450dbe970
* Re-add repaired iprop (really, update-log creation) test caseKen Raeburn2008-11-071-0/+124
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21044 dc483132-0cff-0310-8789-dd5450dbe970
* Back out iprop test; it's not working right after allKen Raeburn2008-11-071-112/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21043 dc483132-0cff-0310-8789-dd5450dbe970
* Test that an iprop update log gets properly created and updatedKen Raeburn2008-11-072-0/+131
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21042 dc483132-0cff-0310-8789-dd5450dbe970
* fix typo in 'file delete' changeKen Raeburn2008-11-071-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21041 dc483132-0cff-0310-8789-dd5450dbe970
* Use 'file delete' instead of spawning an 'rm' processKen Raeburn2008-11-071-19/+17
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21026 dc483132-0cff-0310-8789-dd5450dbe970
* Recognize 'ticket expired' when trying to get a root shellKen Raeburn2008-11-061-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21025 dc483132-0cff-0310-8789-dd5450dbe970
* Convert many uses of strcpy/strcat (and sometimes sprintf) to acceptedGreg Hudson2008-11-051-24/+23
| | | | | | | | | string-handling functions. ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21001 dc483132-0cff-0310-8789-dd5450dbe970
* Check in Nalin's patch, and a test case for changing passwords via kinitKen Raeburn2008-11-041-0/+141
| | | | | | | | when +needchange is set. Update dependencies. ticket: 5867 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20966 dc483132-0cff-0310-8789-dd5450dbe970
* 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