s3-libads: Move to using only the HAVE_KRB5 define
authorAndrew Bartlett <abartlet@samba.org>
Mon, 13 Feb 2012 00:23:15 +0000 (11:23 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 13 Feb 2012 03:41:05 +0000 (04:41 +0100)
HAVE_KRB5 already implies that GSSAPI is present as well.

Andrew Bartlett

lib/addns/dns.h
source3/libads/ads_status.c
source3/libads/sasl.c

index a4b033d7122aef1292a427e629d7f7f352ffb117..d0999918c14217e83dd0e29e35102a55cc4a32cd 100644 (file)
@@ -468,7 +468,7 @@ const char *dns_errstr(DNS_ERROR err);
 
 /* from dnsgss.c */
 
-#ifdef HAVE_GSSAPI_SUPPORT
+#ifdef HAVE_KRB5
 
 void display_status( const char *msg, OM_uint32 maj_stat, OM_uint32 min_stat ); 
 DNS_ERROR dns_negotiate_sec_ctx( const char *target_realm,
@@ -482,6 +482,6 @@ DNS_ERROR dns_sign_update(struct dns_update_request *req,
                          const char *algorithmname,
                          time_t time_signed, uint16 fudge);
 
-#endif /* HAVE_GSSAPI_SUPPORT */
+#endif /* HAVE_KRB5 */
 
 #endif /* _DNS_H */
index a9e59edaddba9a4d680b79375fd9afc5ba3f6ded..919e5d34dcd1a476f0359fb77f3580227291dade 100644 (file)
@@ -112,8 +112,6 @@ const char *ads_errstr(ADS_STATUS status)
 #ifdef HAVE_KRB5
        case ENUM_ADS_ERROR_KRB5: 
                return error_message(status.err.rc);
-#endif
-#ifdef HAVE_GSSAPI
        case ENUM_ADS_ERROR_GSS:
        {
                char *ret;
@@ -144,7 +142,7 @@ const char *ads_errstr(ADS_STATUS status)
        }
 }
 
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
 NTSTATUS gss_err_to_ntstatus(uint32 maj, uint32 min)
 {
         ADS_STATUS adss = ADS_ERROR_GSS(maj, min);
index 4186841ad4c2618c4f34bdd02894ff02829ddb5d..02fd7545e5ee08be8291d8a0d0c1ee0004fc4aa9 100644 (file)
@@ -268,7 +268,7 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
        return ADS_ERROR(rc);
 }
 
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
 static ADS_STATUS ads_sasl_gssapi_wrap(ADS_STRUCT *ads, uint8 *buf, uint32 len)
 {
        gss_ctx_id_t context_handle = (gss_ctx_id_t)ads->ldap.wrap_private_data;
@@ -609,12 +609,12 @@ failed:
        return status;
 }
 
-#endif /* HAVE_GSSAPI */
+#endif /* HAVE_KRB5 */
 
 #ifdef HAVE_KRB5
 struct ads_service_principal {
         char *string;
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
         gss_name_t name;
 #endif
 };
@@ -623,7 +623,7 @@ static void ads_free_service_principal(struct ads_service_principal *p)
 {
        SAFE_FREE(p->string);
 
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
        if (p->name) {
                uint32 minor_status;
                gss_release_name(&minor_status, &p->name);
@@ -706,7 +706,7 @@ static ADS_STATUS ads_generate_service_principal(ADS_STRUCT *ads,
                                                 struct ads_service_principal *p)
 {
        ADS_STATUS status;
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
        gss_buffer_desc input_name;
        /* GSS_KRB5_NT_PRINCIPAL_NAME */
        gss_OID_desc nt_principal =
@@ -740,7 +740,7 @@ static ADS_STATUS ads_generate_service_principal(ADS_STRUCT *ads,
                }
        }
 
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
        input_name.value = p->string;
        input_name.length = strlen(p->string);
 
@@ -793,7 +793,7 @@ static ADS_STATUS ads_sasl_spnego_rawkrb5_bind(ADS_STRUCT *ads, const char *prin
 static ADS_STATUS ads_sasl_spnego_krb5_bind(ADS_STRUCT *ads,
                                            struct ads_service_principal *p)
 {
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
        /*
         * we only use the gsskrb5 based implementation
         * when sasl sign or seal is requested.
@@ -919,7 +919,7 @@ failed:
        return status;
 }
 
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
 #define MAX_GSS_PASSES 3
 
 /* this performs a SASL/gssapi bind
@@ -1155,7 +1155,7 @@ static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
        return status;
 }
 
-#endif /* HAVE_GSSAPI */
+#endif /* HAVE_KRB5 */
 
 /* mapping between SASL mechanisms and functions */
 static struct {
@@ -1163,7 +1163,7 @@ static struct {
        ADS_STATUS (*fn)(ADS_STRUCT *);
 } sasl_mechanisms[] = {
        {"GSS-SPNEGO", ads_sasl_spnego_bind},
-#ifdef HAVE_GSSAPI
+#ifdef HAVE_KRB5
        {"GSSAPI", ads_sasl_gssapi_bind}, /* doesn't work with .NET RC1. No idea why */
 #endif
        {NULL, NULL}