s4-kdc/db_glue: workaround different CLIENT_NAME_MISMATCH error codes.
authorGünther Deschner <gd@samba.org>
Thu, 8 May 2014 12:42:20 +0000 (14:42 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 27 Mar 2015 00:26:16 +0000 (01:26 +0100)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/kdc/db-glue.c

index d60b602c4156e6120840738a61fa5c322639cd09..14528b2ba3bc38dad4ff7853406c56a6aed4e935 100644 (file)
@@ -1969,7 +1969,11 @@ samba_kdc_check_pkinit_ms_upn_match(krb5_context context,
         * comparison */
        if (!(orig_sid && target_sid && dom_sid_equal(orig_sid, target_sid))) {
                talloc_free(mem_ctx);
+#ifdef KRB5_KDC_ERR_CLIENT_NAME_MISMATCH /* Heimdal */
                return KRB5_KDC_ERR_CLIENT_NAME_MISMATCH;
+#elif defined(KRB5KDC_ERR_CLIENT_NAME_MISMATCH) /* MIT */
+               return KRB5KDC_ERR_CLIENT_NAME_MISMATCH;
+#endif
        }
 
        talloc_free(mem_ctx);