2 * Portability wrapper around kadm5/admin.h.
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).
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/>.
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
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
21 * SPDX-License-Identifier: FSFAP
24 #ifndef PORTABLE_KADMIN_H
25 #define PORTABLE_KADMIN_H 1
29 #include <kadm5/admin.h>
30 #ifdef HAVE_KADM5_KADM5_ERR_H
31 # include <kadm5/kadm5_err.h>
33 # include <kadm5/kadm_err.h>
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.)
42 #ifndef KADM5_API_VERSION
43 # ifdef KADM5_API_VERSION_3
44 # define KADM5_API_VERSION KADM5_API_VERSION_3
46 # define KADM5_API_VERSION KADM5_API_VERSION_2
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
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
60 #endif /* !PORTABLE_KADMIN_H */