use this test as part of the regression suite.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20363 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-04-17 13:28:56 +00:00
parent d81bd24f21
commit 9614f8af97

View File

@@ -57,6 +57,8 @@ print_time(OM_uint32 time_rec)
} }
} }
#if 0
static void static void
test_add(gss_cred_id_t cred_handle) test_add(gss_cred_id_t cred_handle)
{ {
@@ -116,6 +118,7 @@ copy_cred(void)
if (GSS_ERROR(major_status)) if (GSS_ERROR(major_status))
errx(1, "release_cred failed"); errx(1, "release_cred failed");
} }
#endif
static void static void
acquire_cred_service(const char *service) acquire_cred_service(const char *service)
@@ -145,30 +148,20 @@ acquire_cred_service(const char *service)
&cred_handle, &cred_handle,
NULL, NULL,
&time_rec); &time_rec);
if (GSS_ERROR(major_status)) if (GSS_ERROR(major_status)) {
errx(1, "acquire_cred failed"); warnx("acquire_cred failed");
} else {
print_time(time_rec); print_time(time_rec);
gss_release_cred(&minor_status, &cred_handle);
major_status = gss_release_cred(&minor_status, }
&cred_handle);
if (GSS_ERROR(major_status))
errx(1, "release_cred failed");
major_status = gss_release_name(&minor_status,
&name);
if (GSS_ERROR(major_status))
errx(1, "release_name failed");
gss_release_name(&minor_status, &name);
} }
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
copy_cred(); acquire_cred_service(argv[1]);
acquire_cred_service("host@xen2-heimdal-linux.lab.it.su.se");
return 0; return 0;
} }