split out the error printing function and try to return better errors

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20075 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-01-31 06:05:19 +00:00
parent 81d996550d
commit 9ceb72abd5
5 changed files with 123 additions and 33 deletions

View File

@@ -38,6 +38,7 @@
#include <err.h>
#include <roken.h>
#include <getarg.h>
#include "test_common.h"
RCSID("$Id$");
@@ -92,7 +93,8 @@ test_libntlm_v1(void)
NULL);
free(data.data);
if (GSS_ERROR(maj_stat))
errx(1, "accept_sec_context");
errx(1, "accept_sec_context v1: %s",
gssapi_err(maj_stat, min_stat, GSS_C_NO_OID));
if (output.length == 0)
errx(1, "output.length == 0");
@@ -139,7 +141,8 @@ test_libntlm_v1(void)
NULL);
free(input.value);
if (maj_stat != GSS_S_COMPLETE)
errx(1, "accept_sec_context 2");
errx(1, "accept_sec_context v1 2 %s",
gssapi_err(maj_stat, min_stat, GSS_C_NO_OID));
return 0;
@@ -193,7 +196,8 @@ test_libntlm_v2(void)
NULL);
free(data.data);
if (GSS_ERROR(maj_stat))
errx(1, "accept_sec_context");
errx(1, "accept_sec_context v2 %s",
gssapi_err(maj_stat, min_stat, GSS_C_NO_OID));
if (output.length == 0)
errx(1, "output.length == 0");
@@ -246,7 +250,8 @@ test_libntlm_v2(void)
NULL);
free(input.value);
if (maj_stat != GSS_S_COMPLETE)
errx(1, "accept_sec_context 2");
errx(1, "accept_sec_context v2 2 %s",
gssapi_err(maj_stat, min_stat, GSS_C_NO_OID));
return 0;