libcli/auth bring ADS_IGNORE_PRINCIPAL in common
authorAndrew Bartlett <abartlet@samba.org>
Sat, 4 Dec 2010 04:23:44 +0000 (15:23 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 8 Dec 2010 07:55:04 +0000 (08:55 +0100)
libcli/auth/spnego.h
source3/include/smb_krb5.h
source4/auth/gensec/spnego.c

index 6aed76549249cd355bc69d4741b151cd792c5670..9a93f2ed522ab8041f83e7cd2152bd005daffbde 100644 (file)
@@ -25,6 +25,8 @@
 #define OID_KERBEROS5_OLD "1.2.840.48018.1.2.2"
 #define OID_KERBEROS5 "1.2.840.113554.1.2.2"
 
+#define ADS_IGNORE_PRINCIPAL "not_defined_in_RFC4178@please_ignore"
+
 #define SPNEGO_DELEG_FLAG    0x01
 #define SPNEGO_MUTUAL_FLAG   0x02
 #define SPNEGO_REPLAY_FLAG   0x04
index 0a6ba79038a18c56b92fe7d63ca57b98cb5a44ad..64c5136acb0d5991b70c2a274292617b0e603663 100644 (file)
@@ -4,8 +4,6 @@
 #define KRB5_PRIVATE    1       /* this file uses PRIVATE interfaces! */
 /* this file uses DEPRECATED interfaces! */
 
-#define ADS_IGNORE_PRINCIPAL "not_defined_in_RFC4178@please_ignore"
-
 #if defined(HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER)
 #define KRB5_DEPRECATED 1
 #else
index 813bf0a730e3e071655509e4fd4ec437e53e9c3b..898dad1e92326b005de36ab645310a3df4a77517 100644 (file)
@@ -827,7 +827,8 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
                        return NT_STATUS_INVALID_PARAMETER;
                }
 
-               if (spnego.negTokenInit.targetPrincipal) {
+               if (spnego.negTokenInit.targetPrincipal
+                   && strcmp(spnego.negTokenInit.targetPrincipal, ADS_IGNORE_PRINCIPAL) != 0) {
                        DEBUG(5, ("Server claims it's principal name is %s\n", spnego.negTokenInit.targetPrincipal));
                        if (lpcfg_client_use_spnego_principal(gensec_security->settings->lp_ctx)) {
                                gensec_set_target_principal(gensec_security, spnego.negTokenInit.targetPrincipal);