* Copyright 1993 OpenVision Technologies, Inc., All Rights Reserved.
*
* $Id$
- * $Source$
- *
- * $Log$
- * Revision 1.18 2001/06/05 16:27:38 epeisach
- * * client.c (main): Missing arguments to printf fixed.
- *
- * Revision 1.17 2001/04/24 17:05:34 epeisach
- * * client.c (main): Ensure that end of string is NULL terminated
- * instead of assuming buffer initialized to 0. Include <string.h>
- * for memset prototype.
- *
- * Revision 1.16 1998/02/14 02:29:42 tlyu
- * * client.c: Update header locations. Rename of xdr_free.
- *
- * * rpc_test.h: Update header locations.
- *
- * * server.c: Update header locations.
- *
- * Revision 1.15 1998/02/12 21:40:16 tlyu
- * * client.c (main): Tweak the kludge variable
- * krb5_gss_dbg_clietn_expcreds so we can send expired creds to the
- * server.
- *
- * Revision 1.14 1996/11/12 21:29:54 bjaspan
- * * lib/helpers.exp, client.c, server.c, config/unix.exp,
- * Makefile.in: test GSS-RPC with both TCP and UDP transport layers
- * [krb5-libs/180]
- *
- * Revision 1.13 1996/07/22 20:41:40 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.12.4.1 1996/07/18 04:20:03 marc
- * merged in changes from OV_9510_BP to OV_9510_FINAL1
- *
- * Revision 1.12.2.1 1996/06/20 23:41:56 marc
- * File added to the repository on a branch
- *
- * Revision 1.12 1996/05/12 06:58:10 marc
- * type renamings for compatibility with beta6
- *
- * Revision 1.11 1996/02/12 15:58:42 grier
- * [secure/3570]
- * long conversion
- *
- * Revision 1.10 1995/12/07 17:37:03 jik
- * Use "rpc_test" instead of "rpc-test", to avoid problems with rpcgen on
- * some systems. See PR 3553.
- *
- * Revision 1.9 1994/09/21 18:38:56 bjaspan
- * [secure-rpc/2536: unit test client.c: memory initialization and out-of-bounds reference bugs]
- * [secure-releng/2537: audit secure-rpc/2536: minor memory problems in unit-test client]
- *
- * Sandbox:
- *
- * 1. Don't allow the count specifie on the command line to be bigger
- * than the size of the buffer use for testing.
- * 2. When initializing the buffer for the lengths test, initialize it to
- * count bytes.
- *
- * Revision 1.9 1994/09/19 01:28:04 root
- * 1. Don't allow the count specifie on the command line to be bigger
- * than the size of the buffer use for testing.
- * 2. When initializing the buffer for the lengths test, initialize it to
- * count bytes.
- *
- * Revision 1.8 1994/04/06 22:13:01 jik
- * Change -auth_once to -o, add -a, -m and -s arguments to set
- * auth_debug_gssapi, svc_debug_gssapi and misc_debug_gssapi variables.
- *
- * Revision 1.7 1994/04/05 20:50:09 bjaspan
- * fix typo that causes coredump when server blocks/fails
- *
- * Revision 1.6 1993/12/08 21:44:45 bjaspan
- * test fix for secure-rpc/586, improve arg handlng
- *
- * Revision 1.5 1993/12/06 21:23:30 bjaspan
- * accept count arg for RPC_TEST_LENGTHS
- *
- * Revision 1.4 1993/12/01 23:41:45 bjaspan
- * don't free echo_resp if call fails
- *
- * Revision 1.3 1993/11/15 19:53:09 bjaspan
- * test auto-syncrhonization
- *
- * Revision 1.2 1993/11/12 02:33:43 bjaspan
- * use clnt_pcreateerror for auth failures
- *
- * Revision 1.1 1993/11/03 23:53:58 bjaspan
- * Initial revision
*
*/
#include <stdio.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#include <gssrpc/rpc.h>
#include <gssapi/gssapi.h>
#include <gssrpc/rpc.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#include <string.h>
#include <signal.h>
#include <gssrpc/rpc.h>
extern int svc_debug_gssapi, misc_debug_gssapi;
void rpc_test_badauth(OM_uint32 major, OM_uint32 minor,
- struct sockaddr_in *addr, void *data);
+ struct sockaddr_in *addr, caddr_t 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);
exit(1);
}
+#ifdef POSIX_SIGNALS
+void handlesig(int dummy)
+#else
void handlesig(void)
+#endif
{
exit(0);
}
+int
main(int argc, char **argv)
{
int c, prot;
* Logs the GSS-API error to stdout.
*/
void rpc_test_badauth(OM_uint32 major, OM_uint32 minor,
- struct sockaddr_in *addr, void *data)
+ struct sockaddr_in *addr, caddr_t data)
{
char *a;