global spawn_id
-start_client expire 1 testuser notathena 20m 100
-set client1_id $spawn_id
-flush_server
+proc expired {} {
+ global spawn_id server_id
-start_client expire 2 testuser notathena 40m 300
-set client2_id $spawn_id
-flush_server
+ start_client expired expired testuser notathena -1m 100
+ eof_client expired expired $spawn_id 2
+
+ expect {
+ -i $server_id
+ -re "rpc_test server: Authen.*failed: .* referenced credentials have expired" { pass "expired" }
+ timeout { fail "expired: timeout waiting for expired creds error" }
+ }
+
+ flush_server
+}
+expired
+
+proc overlap {} {
+ global spawn_id
+
+ start_client expire 1 testuser notathena 20m 100
+ set client1_id $spawn_id
+ flush_server
+
+ start_client expire 2 testuser notathena 40m 300
+ set client2_id $spawn_id
+ flush_server
+
+ start_client expire 3 testuser notathena 60m 500
+ set client3_id $spawn_id
+ flush_server
+
+ eof_client expire 1 $client1_id 0
+ eof_client expire 2 $client2_id 0
+ eof_client expire 3 $client3_id 0
+}
+overlap
-start_client expire 3 testuser notathena 60m 500
-set client3_id $spawn_id
-flush_server
-eof_client expire 1 $client1_id 0
-eof_client expire 2 $client2_id 0
-eof_client expire 3 $client3_id 0
*
* $Id$
* $Source$
- *
- * $Log$
- * Revision 1.16 1996/10/15 20:15:06 bjaspan
- * * initial changes to make rpc unit tests work with new build/test
- * system
- *
- * Revision 1.15 1996/07/22 20:41:44 marc
- * this commit includes all the changes on the OV_9510_INTEGRATION and
- * OV_MERGE branches. This includes, but is not limited to, the new openvision
- * admin system, and major changes to gssapi to add functionality, and bring
- * the implementation in line with rfc1964. before committing, the
- * code was built and tested for netbsd and solaris.
- *
- * Revision 1.14.4.1 1996/07/18 04:20:06 marc
- * merged in changes from OV_9510_BP to OV_9510_FINAL1
- *
- * Revision 1.14.2.1 1996/06/20 23:42:16 marc
- * File added to the repository on a branch
- *
- * Revision 1.14 1996/05/12 06:59:06 marc
- * change SERVICE_NAME to "host" instead of "server"
- *
- * remove KRB5KTNAME support, since the library supports it internally now.
- *
- * Revision 1.13 1995/12/07 17:36:58 jik
- * Use "rpc_test" instead of "rpc-test", to avoid problems with rpcgen on
- * some systems. See PR 3553.
- *
- * Revision 1.12 1995/11/07 23:20:44 grier
- * Add stdlib.h
- * Add string.h
- *
- * Revision 1.11 1995/03/24 19:55:28 jik
- * Cast a const gss_OID to (gss_OID) to prevent a compiler warning.
- *
- * Revision 1.10 1995/02/22 15:54:17 jik
- * I was a moron in revision 1.8. This is the server function, not the
- * client function, so it gets a struct svc_req *, not a CLIENT *.
- *
- * Revision 1.9 1995/02/22 15:21:51 jik
- * Linux's rpcgen names the server function differently from the client
- * function ("_svc" is appended to the end of it).
- *
- * Revision 1.8 1995/02/22 14:35:05 jik
- * RPC server functions have CLIENT * passed into them, so I added it as
- * an argument to rpc_test_echo_1.
- *
- * Revision 1.7 1994/09/21 18:35:57 bjaspan
- * [gssapi/438: gss_nt_service_name should default to local host]
- * [secure-releng/2513: audit gssapi/438: gss_nt_service_name should default to local host]
- *
- * Sandbox:
- *
- * Don't need to get local host name and put it in the service name,
- * since the gssapi library does that now. See PR 438.
- *
- * Revision 1.8 1994/09/01 17:21:59 jik
- * Don't need to get local host name and put it in the service name,
- * since the gssapi library does that now. See PR 438.
- *
- * Revision 1.7 1994/04/08 17:22:11 bjaspan
- * add KRB5KTNAME hack so unit tests continue to work
- *
- * Revision 1.6 1994/04/05 20:50:26 bjaspan
- * print "running" when ready to tests can proceed
- *
- * Revision 1.5 1994/04/05 19:49:54 jik
- * Use host name instead of localhost.
- *
- * Revision 1.4 1994/03/08 00:14:58 shanzer
- * changed call to inet_ntoa
- *
- * Revision 1.3 1993/12/13 01:37:54 bjaspan
- * update for new test system
- * ,.
- *
- * Revision 1.2 1993/12/08 21:45:16 bjaspan
- * display badauth errors, improve arg handling
- *
- * Revision 1.1 1993/11/03 23:53:58 bjaspan
- * Initial revision
- *
*/
#if !defined(lint) && !defined(__CODECENTER__)
void rpc_test_badauth(OM_uint32 major, OM_uint32 minor,
struct sockaddr_in *addr, void *data);
+void log_miscerr(struct svc_req *rqst, struct rpc_msg *msg, char
+ *error, char *data);
void log_badauth_display_status(OM_uint32 major, OM_uint32 minor);
void log_badauth_display_status_1(OM_uint32 code, int type, int rec);
static void rpc_test_badverf(gss_name_t client, gss_name_t server,
_svcauth_gssapi_set_log_badauth_func(rpc_test_badauth, NULL);
_svcauth_gssapi_set_log_badverf_func(rpc_test_badverf, NULL);
+ _svcauth_gssapi_set_log_miscerr_func(log_miscerr, NULL);
printf("running\n");
printf("\n");
}
+void log_miscerr(struct svc_req *rqst, struct rpc_msg *msg,
+ char *error, char *data)
+{
+ char *a;
+
+ a = inet_ntoa(rqst->rq_xprt->xp_raddr.sin_addr);
+ printf("Miscellaneous RPC error: %s, %s\n", a, error);
+}
+
void log_badauth_display_status(OM_uint32 major, OM_uint32 minor)
{
log_badauth_display_status_1(major, GSS_C_GSS_CODE, 0);