diff options
author | Russ Allbery <eagle@eyrie.org> | 2014-07-02 19:28:48 -0700 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2014-07-02 19:34:42 -0700 |
commit | fe898a1f80643215481dee7b61bebc4a6a83b222 (patch) | |
tree | 3523383f16ee51ea7c4cfad56442db3d6c4b4905 /client | |
parent | 0f951c15082a0f0bec5593c9edb9a8695fc8584e (diff) |
Fix compilation without Kerberos support
More includes and some code had to be conditional if not built
with Kerberos support, and the non-Kerberos branch of the
localgroup tests needed a cast.
Change-Id: Ie7111b3280de198f18790c9c39bd9c24ed4657ca
Reviewed-on: https://gerrit.stanford.edu/1508
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
Diffstat (limited to 'client')
-rw-r--r-- | client/api.c | 4 | ||||
-rw-r--r-- | client/error.c | 2 | ||||
-rw-r--r-- | client/internal.h | 4 | ||||
-rw-r--r-- | client/open.c | 8 |
4 files changed, 13 insertions, 5 deletions
diff --git a/client/api.c b/client/api.c index e3dfe3d..1e7d9ad 100644 --- a/client/api.c +++ b/client/api.c @@ -19,7 +19,9 @@ #include <config.h> #include <portable/gssapi.h> -#include <portable/krb5.h> +#ifdef HAVE_KRB5 +# include <portable/krb5.h> +#endif #include <portable/socket.h> #include <portable/system.h> #include <portable/uio.h> diff --git a/client/error.c b/client/error.c index 7072456..cc27e3c 100644 --- a/client/error.c +++ b/client/error.c @@ -65,6 +65,7 @@ internal_gssapi_error(struct remctl *r, const char *error, OM_uint32 major, * Internal function to set the remctl error message from a Kerberos error * message. */ +#ifdef HAVE_KRB5 void internal_krb5_error(struct remctl *r, const char *error, krb5_error_code code) { @@ -77,6 +78,7 @@ internal_krb5_error(struct remctl *r, const char *error, krb5_error_code code) internal_set_error(r, "error %s: %s", error, message); krb5_free_error_message(r->krb_ctx, message); } +#endif /* diff --git a/client/internal.h b/client/internal.h index ab77f78..0d72731 100644 --- a/client/internal.h +++ b/client/internal.h @@ -14,7 +14,9 @@ #include <config.h> #include <portable/gssapi.h> -#include <portable/krb5.h> +#ifdef HAVE_KRB5 +# include <portable/krb5.h> +#endif #include <portable/macros.h> #include <portable/socket.h> #include <portable/stdbool.h> diff --git a/client/open.c b/client/open.c index 31edd40..f701466 100644 --- a/client/open.c +++ b/client/open.c @@ -15,8 +15,10 @@ */ #include <config.h> -#include <portable/krb5.h> #include <portable/gssapi.h> +#ifdef HAVE_KRB5 +# include <portable/krb5.h> +#endif #include <portable/socket.h> #include <portable/system.h> @@ -131,7 +133,7 @@ internal_import_name(struct remctl *r, const char *host, * global GSS-API variable with gss_krb5_ccache_name or just use whatever the * default is. The other cases are handled in remctl_set_ccache. */ -#ifdef HAVE_GSS_KRB5_IMPORT_CRED +#if defined(HAVE_GSS_KRB5_IMPORT_CRED) && defined(HAVE_KRB5) static bool internal_set_cred(struct remctl *r, gss_cred_id_t *gss_cred) { @@ -159,7 +161,7 @@ internal_set_cred(struct remctl *r, gss_cred_id_t *gss_cred) } return true; } -#else /* !HAVE_GSS_KRB5_IMPORT_CRED */ +#else /* !HAVE_GSS_KRB5_IMPORT_CRED || !HAVE_KRB5 */ static bool internal_set_cred(struct remctl *r UNUSED, gss_cred_id_t *gss_cred UNUSED) { |