From b3c2df5e0d0ba1c17c3248bf9d238de3c54613ef Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 4 Dec 2010 14:11:57 +1100 Subject: s3-smbd Don't send SPNEGO principal (rfc4178 hint) by default This patch, based on the suggestion by Goldberg, Neil R. turns off the sending of the principal in the negprot by default, matching Windows 2008 behaviour. This slowly works us back from this hack, which from an RFC perspective was never the right thing to do in the first place, but we traditionally follow windows behaviour. It also discourages client implmentations from relying on it, as if they do they are more open to man-in-the-middle attacks. Andrew Bartlett --- source3/smbd/negprot.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/smbd/negprot.c') diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index a0c1d2594f..443fac4b4b 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -213,6 +213,9 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn) /* Code for standalone WXP client */ blob = spnego_gen_negTokenInit(ctx, OIDs_ntlm, NULL, "NONE"); #endif + } else if (!lp_send_spnego_principal()) { + /* By default, Windows 2008 and later sends not_defined_in_RFC4178@please_ignore */ + blob = spnego_gen_negTokenInit(ctx, OIDs_krb5, NULL, ADS_IGNORE_PRINCIPAL); } else { fstring myname; char *host_princ_s = NULL; -- cgit