diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-12-04 13:48:37 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-12-10 16:08:30 +1100 |
commit | bb7806283e71f3b8029aae0eed326b5847a36d83 (patch) | |
tree | 75ae29746351bd1aaf09d54c4779b5584f1eb98a /source3/libsmb | |
parent | 10441ed83d701d6db64c3a933cf09957355e1db2 (diff) | |
download | samba-bb7806283e71f3b8029aae0eed326b5847a36d83.tar.gz samba-bb7806283e71f3b8029aae0eed326b5847a36d83.tar.bz2 samba-bb7806283e71f3b8029aae0eed326b5847a36d83.zip |
s3-libads Default to NOT using the server-supplied principal from SPNEGO
This principal is not supplied by later versions of windows, and using
it opens up some oportunities for man in the middle attacks. (Becuase
it isn't the name being contacted that is verified with the KDC).
This adds the option 'client use spnego principal' to the smb.conf (as
used in Samba4) to control this behaivour. As in Samba4, this
defaults to false.
Against 2008 servers, this will not change behaviour. Against earlier
servers, it may cause a downgrade to NTLMSSP more often, in
environments where server names are not registered with the KDC as
servicePrincipalName values.
Andrew Bartlett
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 1e11e158f7..c66314891d 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -1279,10 +1279,9 @@ ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user, } } - /* If we get a bad principal, try to guess it if - we have a valid host NetBIOS name. + /* We may not be allowed to use the server-supplied SPNEGO principal, or it may not have been supplied to us */ - if (strequal(principal, ADS_IGNORE_PRINCIPAL)) { + if (!lp_client_use_spnego_principal() || strequal(principal, ADS_IGNORE_PRINCIPAL)) { TALLOC_FREE(principal); } |