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>
13 * The authors hereby relinquish any claim to any copyright that they may have
14 * in this work, whether granted under contract or by operation of law or
15 * international treaty, and hereby commit to the public, at large, that they
16 * shall not, at any time in the future, seek to enforce any copyright in this
17 * work against any person or entity, or prevent any person or entity from
18 * copying, publishing, distributing or creating derivative works of this
22 #ifndef PORTABLE_KADMIN_H
23 #define PORTABLE_KADMIN_H 1
27 #include <kadm5/admin.h>
28 #ifdef HAVE_KADM5_KADM5_ERR_H
29 # include <kadm5/kadm5_err.h>
31 # include <kadm5/kadm_err.h>
35 * MIT as of 1.10 supports version 3. Heimdal as of 1.5 has a maximum version
36 * of 2. Define a KADM5_API_VERSION symbol that holds the maximum version.
37 * (Heimdal does this for us, so we only have to do that with MIT, but be
38 * general just in case.)
40 #ifndef KADM5_API_VERSION
41 # ifdef KADM5_API_VERSION_3
42 # define KADM5_API_VERSION KADM5_API_VERSION_3
44 # define KADM5_API_VERSION KADM5_API_VERSION_2
48 /* Heimdal doesn't define KADM5_PASS_Q_GENERIC. */
49 #ifndef KADM5_PASS_Q_GENERIC
50 # define KADM5_PASS_Q_GENERIC KADM5_PASS_Q_DICT
53 /* Heimdal doesn't define KADM5_MISSING_KRB5_CONF_PARAMS. */
54 #ifndef KADM5_MISSING_KRB5_CONF_PARAMS
55 # define KADM5_MISSING_KRB5_CONF_PARAMS KADM5_MISSING_CONF_PARAMS
58 #endif /* !PORTABLE_KADMIN_H */