aboutsummaryrefslogtreecommitdiff
path: root/tests/tap/kerberos.h
blob: 1c64f70170e37e26c53dd9710d607a29d760ad1e (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
/*
 * Utility functions for tests that use Kerberos.
 *
 * Copyright 2006, 2007, 2009
 *     Board of Trustees, Leland Stanford Jr. University
 *
 * See LICENSE for licensing terms.
 */

#ifndef TAP_KERBEROS_H
#define TAP_KERBEROS_H 1

#include <config.h>
#include <portable/macros.h>

BEGIN_DECLS

/*
 * Set up Kerberos, returning the test principal in newly allocated memory if
 * we were successful.  If there is no principal in tests/data/test.principal
 * or no keytab in tests/data/test.keytab, return NULL.  Otherwise, on
 * failure, calls bail().
 */
char *kerberos_setup(void)
    __attribute__((__malloc__));

/* Clean up at the end of a test. */
void kerberos_cleanup(void);

END_DECLS

#endif /* !TAP_MESSAGES_H */