From 964a7c6cba4f85d257c625cdeccaada9b8dc66b8 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Wed, 4 Aug 1999 06:13:58 +0000 Subject: [PATCH] use gss_err instead of abort git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6693 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/test/gssapi_client.c | 9 +++++---- appl/test/gssapi_server.c | 8 ++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/appl/test/gssapi_client.c b/appl/test/gssapi_client.c index a745fbed7..70392e056 100644 --- a/appl/test/gssapi_client.c +++ b/appl/test/gssapi_client.c @@ -63,7 +63,8 @@ proto (int sock, const char *hostname, const char *service) GSS_C_NT_HOSTBASED_SERVICE, &server); if (GSS_ERROR(maj_stat)) - abort (); + gss_err (1, min_stat, + "Error importing name `%s@%s':\n", service, hostname); addrlen = sizeof(local); if (getsockname (sock, (struct sockaddr *)&local, &addrlen) < 0 @@ -97,7 +98,7 @@ proto (int sock, const char *hostname, const char *service) NULL, NULL); if (GSS_ERROR(maj_stat)) - abort (); + gss_err (1, min_stat, "gss_init_sec_context"); if (output_token->length != 0) write_token (sock, output_token); if (GSS_ERROR(maj_stat)) { @@ -126,7 +127,7 @@ proto (int sock, const char *hostname, const char *service) input_token, output_token); if (GSS_ERROR(maj_stat)) - abort (); + gss_err (1, min_stat, "gss_get_mic"); write_token (sock, input_token); write_token (sock, output_token); @@ -145,7 +146,7 @@ proto (int sock, const char *hostname, const char *service) NULL, output_token); if (GSS_ERROR(maj_stat)) - abort (); + gss_err (1, min_stat, "gss_wrap"); write_token (sock, output_token); diff --git a/appl/test/gssapi_server.c b/appl/test/gssapi_server.c index 14c9ae302..5ec7c7e10 100644 --- a/appl/test/gssapi_server.c +++ b/appl/test/gssapi_server.c @@ -81,7 +81,7 @@ proto (int sock, const char *service) NULL, NULL); if(GSS_ERROR(maj_stat)) - abort (); + gss_err (1, min_stat, "gss_accept_sec_context"); if (output_token->length != 0) write_token (sock, output_token); if (GSS_ERROR(maj_stat)) { @@ -98,7 +98,7 @@ proto (int sock, const char *service) &name_token, NULL); if (GSS_ERROR(maj_stat)) - abort (); + gss_err (1, min_stat, "gss_display_name"); printf ("User is `%.*s'\n", (int)name_token.length, (char *)name_token.value); @@ -114,7 +114,7 @@ proto (int sock, const char *service) output_token, NULL); if (GSS_ERROR(maj_stat)) - abort (); + gss_err (1, min_stat, "gss_verify_mic"); printf ("gss_verify_mic: %.*s\n", (int)input_token->length, (char *)input_token->value); @@ -130,7 +130,7 @@ proto (int sock, const char *service) NULL, NULL); if(GSS_ERROR(maj_stat)) - abort (); + gss_err (1, min_stat, "gss_unwrap"); printf ("gss_unwrap: %.*s\n", (int)output_token->length, (char *)output_token->value);