]> eyrie.org Git - kerberos/krb5-strength.git/blob - portable/kadmin.h
Update default GCC warning flags
[kerberos/krb5-strength.git] / portable / kadmin.h
1 /*
2  * Portability wrapper around kadm5/admin.h.
3  *
4  * This header adjusts for differences between the MIT and Heimdal kadmin
5  * client libraries so that the code can be written to a consistent API
6  * (favoring the Heimdal API as the exposed one).
7  *
8  * The canonical version of this file is maintained in the rra-c-util package,
9  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
10  *
11  * Written by Russ Allbery <eagle@eyrie.org>
12  * Copyright 2015 Russ Allbery <eagle@eyrie.org>
13  * Copyright 2011, 2013
14  *     The Board of Trustees of the Leland Stanford Junior University
15  *
16  * Copying and distribution of this file, with or without modification, are
17  * permitted in any medium without royalty provided the copyright notice and
18  * this notice are preserved.  This file is offered as-is, without any
19  * warranty.
20  *
21  * SPDX-License-Identifier: FSFAP
22  */
23
24 #ifndef PORTABLE_KADMIN_H
25 #define PORTABLE_KADMIN_H 1
26
27 #include <config.h>
28
29 #include <kadm5/admin.h>
30 #ifdef HAVE_KADM5_KADM5_ERR_H
31 #    include <kadm5/kadm5_err.h>
32 #else
33 #    include <kadm5/kadm_err.h>
34 #endif
35
36 /*
37  * MIT as of 1.10 supports version 3.  Heimdal as of 1.5 has a maximum version
38  * of 2.  Define a KADM5_API_VERSION symbol that holds the maximum version.
39  * (Heimdal does this for us, so we only have to do that with MIT, but be
40  * general just in case.)
41  */
42 #ifndef KADM5_API_VERSION
43 #    ifdef KADM5_API_VERSION_3
44 #        define KADM5_API_VERSION KADM5_API_VERSION_3
45 #    else
46 #        define KADM5_API_VERSION KADM5_API_VERSION_2
47 #    endif
48 #endif
49
50 /* Heimdal doesn't define KADM5_PASS_Q_GENERIC. */
51 #ifndef KADM5_PASS_Q_GENERIC
52 #    define KADM5_PASS_Q_GENERIC KADM5_PASS_Q_DICT
53 #endif
54
55 /* Heimdal doesn't define KADM5_MISSING_KRB5_CONF_PARAMS. */
56 #ifndef KADM5_MISSING_KRB5_CONF_PARAMS
57 #    define KADM5_MISSING_KRB5_CONF_PARAMS KADM5_MISSING_CONF_PARAMS
58 #endif
59
60 #endif /* !PORTABLE_KADMIN_H */