aboutsummaryrefslogtreecommitdiff
path: root/src/tests
AgeCommit message (Collapse)AuthorFilesLines
2008-08-15a stash file is not a keytabWill Fiveash7-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
2008-08-06Fix possible locking protocol failure in error handling pathKen Raeburn2-2/+4
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20607 dc483132-0cff-0310-8789-dd5450dbe970
2008-07-20Don't set LOCAL_SUBDIRS in many places and SUBDIRS in a few andKen Raeburn1-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
2008-06-02Don't use 'log' as a global variable nameKen Raeburn1-40/+40
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20354 dc483132-0cff-0310-8789-dd5450dbe970
2008-06-02Explicitly note number as unsigned to shut gcc upKen Raeburn1-1/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20353 dc483132-0cff-0310-8789-dd5450dbe970
2007-10-31Add some dependenciesKen Raeburn1-1/+20
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20158 dc483132-0cff-0310-8789-dd5450dbe970
2007-10-31Correct the filenames in commentsKen Raeburn2-2/+2
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20157 dc483132-0cff-0310-8789-dd5450dbe970
2007-10-31Test more installed headers for C++ compatibilityKen Raeburn3-1/+21
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20156 dc483132-0cff-0310-8789-dd5450dbe970
2007-10-31Set CXX_LINK, CXX_LINK_STATIC, and CXX_LINK_SHARED, parallel to CC_ versions.Ken Raeburn1-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
2007-10-30Don't use GNU make featuresKen Raeburn1-2/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20152 dc483132-0cff-0310-8789-dd5450dbe970
2007-10-29Test that C++ code can use our installed headersKen Raeburn3-2/+40
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20149 dc483132-0cff-0310-8789-dd5450dbe970
2007-09-11Before the error-message tests, make sure the host principal exists,Ken Raeburn1-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
2007-08-29test program build problemKen Raeburn3-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
2007-08-25Expect keytab error to be reportedKen Raeburn1-4/+4
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19878 dc483132-0cff-0310-8789-dd5450dbe970
2007-08-16make dependKen Raeburn4-36/+41
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19832 dc483132-0cff-0310-8789-dd5450dbe970
2007-08-16remap mechanism-specific status codes in mechglue/spnegoKen Raeburn1-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
2007-07-04Handle 'Credentials cache file <path> not found'Ken Raeburn1-0/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19673 dc483132-0cff-0310-8789-dd5450dbe970
2007-07-04Use global spawn_idKen Raeburn1-0/+2
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19670 dc483132-0cff-0310-8789-dd5450dbe970
2007-07-04When skipping debugging '-->' data, only take through the end of the lineKen Raeburn1-1/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19662 dc483132-0cff-0310-8789-dd5450dbe970
2007-03-28make dependKen Raeburn2-2/+4
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19301 dc483132-0cff-0310-8789-dd5450dbe970
2007-03-25Build tests subtree makefiles at top levelKen Raeburn13-54/+24
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19274 dc483132-0cff-0310-8789-dd5450dbe970
2007-03-25Include autoconf.hKen Raeburn3-1/+3
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19273 dc483132-0cff-0310-8789-dd5450dbe970
2007-03-14Remove test pass that exercises AES256 over UDP, since we also haveKen Raeburn1-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
2007-03-09Remove from unused_passes a configuration also listed in the default passesKen Raeburn1-12/+0
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19215 dc483132-0cff-0310-8789-dd5450dbe970
2007-03-06Do use valgrind on /bin/sh commands, since that's how we launch kadmind ↵Ken Raeburn1-1/+2
currently git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19212 dc483132-0cff-0310-8789-dd5450dbe970
2007-03-02Delete more stuff for 'clean' and 'distclean' targetsKen Raeburn1-2/+2
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19198 dc483132-0cff-0310-8789-dd5450dbe970
2007-02-16Conditionalize more bits that might not be defined by the OSKen Raeburn1-0/+10
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19167 dc483132-0cff-0310-8789-dd5450dbe970
2007-02-01Don't need to register WRFILE: keytab type, it's already in the compiled-inKen Raeburn1-10/+0
list. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19132 dc483132-0cff-0310-8789-dd5450dbe970
2006-12-31Memory leak in tests/gssapi/t_imp_name.cEzra Peisach1-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
2006-12-18Inovke krb5_rc_close to shutdown cache - and check for memory leaksEzra Peisach1-0/+5
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18960 dc483132-0cff-0310-8789-dd5450dbe970
2006-10-18Free allocated memory when no longer usedEzra Peisach1-0/+3
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18726 dc483132-0cff-0310-8789-dd5450dbe970
2006-10-18Invoke krb5_free_principal to remove memory leakEzra Peisach1-0/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18725 dc483132-0cff-0310-8789-dd5450dbe970
2006-10-18Call freeaddrinfo at end - memory leakEzra Peisach1-0/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18724 dc483132-0cff-0310-8789-dd5450dbe970
2006-10-15Pass VALGRIND in to runtest. When it's set, redefine spawn to use it forKen Raeburn2-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
2006-10-13Use $(VALGRIND) when running programs using $(KRB5_RUN_ENV) orKen Raeburn7-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
2006-10-12Add a policy to the database, then after the dump and restore, checkKen Raeburn1-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
2006-10-11skip over verbose (protocol trace) debugging outputKen Raeburn1-0/+4
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18678 dc483132-0cff-0310-8789-dd5450dbe970
2006-10-06make dependTom Yu4-17/+19
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18652 dc483132-0cff-0310-8789-dd5450dbe970
2006-07-01work around failure to load into nonexistent dbTom Yu1-0/+5
* src/tests/Makefile.in (kdb_check): Run kdb5_util create after destroying to work around a behavior change from DAL integration. ticket: new target_version: 1.5 tags: pullup version_reported: 1.5 component: test git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18313 dc483132-0cff-0310-8789-dd5450dbe970
2006-06-30test kdb5_util dump/load functionality in dejagnuKen Raeburn1-0/+58
This new test just dumps and reloads the database. It doesn't examine the resulting database, but kinit and other tests are run after it, using the reloaded database. * standalone.exp (dump_and_reload): New proc. (doit): Invoke it. ticket: new target_version: 1.5 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18308 dc483132-0cff-0310-8789-dd5450dbe970
2006-06-26* kdc/network.c (make_toolong_error): New function.Ken Raeburn1-0/+32
(process_tcp_connection): If the specified length exceeds the internal limit, stop reading and send back a FIELD_TOOLONG error. * tests/dejagnu/krb-standalone/standalone.exp (doit): When testing TCP mode, connect to the KDC and send a length of -1, and check that it sends back a non-empty message. ticket: 3923 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18233 dc483132-0cff-0310-8789-dd5450dbe970
2006-06-21Spawn ftp client with "-d" and "-v" for better debuggingKen Raeburn1-1/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18186 dc483132-0cff-0310-8789-dd5450dbe970
2006-06-16Change a bunch of calls to ctype macros (those cited by Jeff, and aKen Raeburn1-2/+2
few others) to cast the character values to unsigned char. ticket: 3445 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18156 dc483132-0cff-0310-8789-dd5450dbe970
2006-06-14Merge from branches/mechglue. Initial integration of Sun-donatedTom Yu1-1/+1
mechglue and SPNEGO implementations. Additional changes outside of src/lib/gssapi: * src/configure.in: Add lib/gssapi/mechglue and lib/gssapi/spnego to list of directories to output Makefile in. * src/lib/rpc/unit-test/rpc_test.0/expire.exp (expired): Update regexp for mechglue. * src/tests/dejagnu/krb-standalone/v4gssftp.exp (v4ftp_test): Update "Miscellaneous failure" regexp for mechglue. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18131 dc483132-0cff-0310-8789-dd5450dbe970
2006-05-24Rename locate.h to locate_plugin.h. Change references, update dependenciesKen Raeburn4-7/+7
ticket: 3784 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18037 dc483132-0cff-0310-8789-dd5450dbe970
2006-05-23install headers into include/krb5Ken Raeburn5-40/+43
Create include/krb5 directory, and put krb5.h and (k5-)locate.h there in the build tree. Stub krb5.h in main include directory just includes krb5/krb5.h. Update dependencies, and add dependencies in a couple Makefiles that didn't have them. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18030 dc483132-0cff-0310-8789-dd5450dbe970
2006-05-11* tests/dejagnu/config/default.exp (setup_krb5_conf): Don't add suffix toKen Raeburn1-1/+1
library name in generated config file. * kadmin/testing/proto/krb5.conf.proto: Drop suffix from library name. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17999 dc483132-0cff-0310-8789-dd5450dbe970
2006-04-25Change kdb plugin code to use the new plugin support instead ofKen Raeburn1-1/+1
directly calling dlopen and friends. Change the test config files to refer to "db2.so" instead of "db2". git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17961 dc483132-0cff-0310-8789-dd5450dbe970
2006-04-25Set myfulldirKen Raeburn1-0/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17953 dc483132-0cff-0310-8789-dd5450dbe970
2006-04-13Partial merge from Novell LDAP integration branch, not including theKen Raeburn2-2/+2
actual LDAP bits: * include/kdb.h (krb5_db_entry_new): Add MASK field indicating what's changed. (KRB5_KDB_SRV_TYPE_*): New macros indicating which type of service is accessing the database. * lib/kadm5/srv/svr_principal.c: Set mask field. * lib/kadm5/srv/server_misc.c, server_init.c: Pass service type to krb5_db_open. * kadmin/dbutil/kdb5_stash.c (kdb5_stash): Pass service type to krb5_db_open. * kadmin/dbutil/kdb5_util.c (open_db_and_mkey): Pass service type to krb5_db_open. * kdc/main.c (init_realm): Pass service type to krb5_db_open. * lib/kadm5/srv/svr_principal.c: Set mask field. * kadmin/dbutil/dump.c (load_db): Pass service type to krb5_db_open. * lib/kdb/kdb5.h (KRB5_KDB_SRV_TYPE_*): New macros. * lib/kdb/err_handle.{c,h}: Deleted. * lib/kadm5/clnt/err_handle.{c,h}: Deleted. (krb5_db_clr_error): Declaration deleted. * lib/kdb/Makefile.in, lib/kadm5/clnt/Makefile.in: Don't build them. * lib/kdb/kdb5.c, lib/kadm5/clnt, lib/kadm5/srv: Use new error-message API. * kdc/do_tgs_req.c (process_tgs_req): Use new error-message API. * kdc/kdc_preauth.c (check_padata) * kdc/do_as_req.c (process_as_req): * kdc/main.c (init_realm): * kadmin/server/ovsec_kadmd.c (main, do_schpw): * schpw.c (process_chpw_request): * kadmin/server/server_stubs.c: * kadmin/cli/kadmin.c (extended_com_err_fn): New function. (kadmin_startup): Tell com_err library to use it, for kadmin.local. * lib/kdb/libkdb5.exports: Don't export krb5_db_clr_error. * lib/kdb/Makefile.in: (SRCS, STLIBOBJS): Don't build err_handle.c. * lib/kdb/kdb5.c (kdb_load_library): Don't pass argument to init_library. (krb5_db_clr_error): Function deleted. * lib/kdb/kdb5.h (struct _kdb_vftabl): Remove argument from init_library field. * lib/kadm5/logger.c (krb5_klog_init): Save the krb5_context pointer. (klog_com_err_proc): Use it, and call new error-message API. * lib/kadm5/srv/svr_principal.c: Use new error-message API. * kadmin/dbutil/kdb5_util.c (extended_com_err_fn): New function. (main): Tell com_err library to use it. * plugins/kdb/db2: Use new error-message APIs and updated DAL interface. * lib/kadm5/kadm_rpc.h: Delete err_str fields. * lib/kadm5/kadm_rpc_xdr.c: Don't process them. * kadmin/server/server_stubs.c: Don't use ret.err_str field. * include/k5-thread.h (k5_key_t): Deleted unused values. * lib/kdb/kdb5.h (KDB_MODULE_SECTION): Change db_modules to dbmodules. (KDB_MODULE_DEF_SECTION): New macro. * tests/Makefile.in (krb5.conf): Rename db_modules to dbmodules. * tests/dejagnu/config/default.exp (setup_krb5_conf): Likewise. * kadmin/testing/proto/krb5.conf.proto: Likewise. * lib/kdb/libkdb5.exports: Do export krb5_def_store_mkey. * lib/kadm5/admin.h (KADM5_CPW_FUNCTION, KADM5_RANDKEY_USED): New macros. (struct _kadm5_config_params): New field kpasswd_server. * lib/krb5/error_tables/kdb5_err.et (KRB5_KDB_SERVER_INTERNAL_ERR): New error code. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17899 dc483132-0cff-0310-8789-dd5450dbe970