summaryrefslogtreecommitdiffstats
path: root/src/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* use t_inetd with a ready message and avoid waiting a lot in non-root testsKen Raeburn2009-01-314-24/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change t_inetd to print a ready message when it has started listening on the indicated port number. Look for this message in sample.exp rather than waiting an arbitrary (and usually excessive) 2s each time for the inetd-mode tests. Use run_once to perform the standalone-mode test only once per test suite invocation. Change rsh and rcp tests to start the servers via t_inetd and avoid excessive waiting at startup. In some of my tests, this reduces the tests/dejagnu tests from taking over 6 minutes to taking around 2 minutes. (This does mean the server process will no longer have started up before we launch the client, so it may be slower to respond, but it'll still be faster than the 2s delay we used before even trying to connect.) We can probably eliminate the -D option code from krshd.c now. The tests run as root (rlogin, telnet) still need updating. ticket: 6355 target_version: 1.7 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21855 dc483132-0cff-0310-8789-dd5450dbe970
* disable single-DES by defaultTom Yu2009-01-281-0/+1
| | | | | | | | | | Mark all single-DES enctypes as "weak", and create a new libdefaults variable "allow_weak_crypto", which defaults to "false". ticket: 6353 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21823 dc483132-0cff-0310-8789-dd5450dbe970
* include netinet/in.h to make sure we know what struct in_addr looks likeKen Raeburn2009-01-281-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21820 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
* Start to phase out krb5_xfree macro, which just casts its argument toKen Raeburn2009-01-281-5/+5
| | | | | | | | | | | char* and calls free. Replace most uses, outside of the LDAP KDB plugin, which doesn't build on my test system of the moment because of version dependencies. Add one explicit cast to make the change warning-neutral (under gcc 4.0.1 on Mac OS X 10.5.6). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21812 dc483132-0cff-0310-8789-dd5450dbe970
* Use 16/32-bit big/little-endian store functions in more placesKen Raeburn2009-01-261-5/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21796 dc483132-0cff-0310-8789-dd5450dbe970
* Use a struct in_addr to insure alignment of address - instead ofEzra Peisach2009-01-251-3/+3
| | | | | | | | | | random alignment on the stack. Solaris 2.10 has issues if the address is not aligned. The rest of the code in the tree uses a struct in_addr or mallocs the address - which will be sufficiently aligned. ticket: 6308 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21794 dc483132-0cff-0310-8789-dd5450dbe970
* include dependencies for decoder testKen Raeburn2009-01-162-1/+13
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21758 dc483132-0cff-0310-8789-dd5450dbe970
* Add message hash support to the replay interface, using extensionGreg Hudson2009-01-121-0/+1
| | | | | | | | | | | | | | records (with an empty client string) to retain compatibility with old code. For rd_req, the ciphertext of the authenticator (with no ASN.1 wrapping) is hashed; for other uses of the replay cache, no message hash is used at this time. This commit adds a command-line tool for testing the replay cache but does not add any automated tests. ticket: 1201 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21723 dc483132-0cff-0310-8789-dd5450dbe970
* be a little looser in checking for tail outputKen Raeburn2009-01-061-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21711 dc483132-0cff-0310-8789-dd5450dbe970
* move generated dependencies out of Makefile.inKen Raeburn2009-01-0525-184/+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
* Remove krb524, lib/des425, lib/krb4, and include/kerberosIV.Greg Hudson2008-12-187-988/+2
| | | | | | | | | | 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
* Fix memory leaks in sam and ldap handler testing - there is still a leak w/ ldapEzra Peisach2008-12-164-0/+24
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21479 dc483132-0cff-0310-8789-dd5450dbe970
* Accept digits and = in base64 output to flushKen Raeburn2008-12-121-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21330 dc483132-0cff-0310-8789-dd5450dbe970
* In the dejagnu test suite utilities, use the caller's value ofGreg Hudson2008-12-051-3/+3
| | | | | | spawn_id in check_exit_status, rather than the global value. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21289 dc483132-0cff-0310-8789-dd5450dbe970
* In the rlogin tests, expect to see /bin/sh echoed back after sendingGreg Hudson2008-12-051-0/+2
| | | | | | | | | /bin/sh. If we just look for a shell prompt, we can get out of sync if the login shell decides to clear the line and redisplay the prompt. (I see bash redisplaying the prompt in 30-50% of test runs; I don't know what it's thinking.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21288 dc483132-0cff-0310-8789-dd5450dbe970
* Fix from Marcus Watts for glob-to-regexp conversion bug.Ken Raeburn2008-12-041-1/+3
| | | | | | | | Tweaked test case to exercise the bug. ticket: 5667 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21285 dc483132-0cff-0310-8789-dd5450dbe970
* Convert many uses of sprintf to snprintf or asprintfGreg Hudson2008-12-017-32/+35
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21258 dc483132-0cff-0310-8789-dd5450dbe970
* 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