summaryrefslogtreecommitdiffstats
path: root/src/tests/hammer/pp.c
blob: 288d45bb3bb77233ade1e9c7ea951e472fab3541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * $Source$
 * $Author$
 *
 * Copyright 1991 by the Massachusetts Institute of Technology.
 * All Rights Reserved.
 *
 * For copying and distribution information, please see the file
 * <krb5/copyright.h>.
 *
 */

#if !defined(lint) && !defined(SABER)
static char rcsid_pp_c[] =
"$Id$";
#endif	/* !lint & !SABER */
#include <krb5/krb5.h>

void
print_principal(p)
	krb5_principal	p;
{
	char	*buf;
	krb5_error_code	retval;

	if (retval = krb5_unparse_name(p, &buf)) {
		com_err("DEBUG: Print_principal", retval,
			"while unparsing name");
		exit(1);
	}
	printf("%s\n", buf);
	free(buf);
}