summaryrefslogtreecommitdiff
path: root/source4/auth/gensec/spnego.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-05-13 07:59:41 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-05-14 23:25:45 +1000
commitb5dc39496272cbccdd45152f349362c2b779c326 (patch)
treea4792955392e6a1ac3a319eb0f2a486c3ed2f97f /source4/auth/gensec/spnego.c
parent8da50c8da1527bafbb0ff4e86cc12fb54dd2b4b7 (diff)
downloadsamba-b5dc39496272cbccdd45152f349362c2b779c326.tar.gz
samba-b5dc39496272cbccdd45152f349362c2b779c326.tar.bz2
samba-b5dc39496272cbccdd45152f349362c2b779c326.zip
s4:gensec expose gensec_set_target_principal for use outside GENSEC
This allows for the rare case where the caller knows the target principal. The check for lp_client_use_spnego_principal() is moved to the spengo code to make this work. Andrew Bartlett
Diffstat (limited to 'source4/auth/gensec/spnego.c')
-rw-r--r--source4/auth/gensec/spnego.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/auth/gensec/spnego.c b/source4/auth/gensec/spnego.c
index a715085d06..bbcba8dc5f 100644
--- a/source4/auth/gensec/spnego.c
+++ b/source4/auth/gensec/spnego.c
@@ -28,6 +28,7 @@
#include "auth/credentials/credentials.h"
#include "auth/gensec/gensec.h"
#include "auth/gensec/gensec_proto.h"
+#include "param/param.h"
enum spnego_state_position {
SPNEGO_SERVER_START,
@@ -826,7 +827,9 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
if (spnego.negTokenInit.targetPrincipal) {
DEBUG(5, ("Server claims it's principal name is %s\n", spnego.negTokenInit.targetPrincipal));
- gensec_set_target_principal(gensec_security, spnego.negTokenInit.targetPrincipal);
+ if (lp_client_use_spnego_principal(gensec_security->settings->lp_ctx)) {
+ gensec_set_target_principal(gensec_security, spnego.negTokenInit.targetPrincipal);
+ }
}
nt_status = gensec_spnego_parse_negTokenInit(gensec_security,