diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-02-06 18:02:11 +1100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-02-17 12:18:51 +0100 |
commit | c35a7e8c478062de0d5d6771b59e0430cd9706c3 (patch) | |
tree | e30526b87c850435d42136b49cafceeb9276d687 | |
parent | f433baa3c8a995cbbeecdcbc75f8ae503a5ae4b6 (diff) | |
download | samba-c35a7e8c478062de0d5d6771b59e0430cd9706c3.tar.gz samba-c35a7e8c478062de0d5d6771b59e0430cd9706c3.tar.bz2 samba-c35a7e8c478062de0d5d6771b59e0430cd9706c3.zip |
auth: Allow the netbios name and domain to be set from winbindd in ntlm_auth3
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Feb 17 12:18:51 CET 2012 on sn-devel-104
-rw-r--r-- | auth/gensec/gensec.h | 2 | ||||
-rw-r--r-- | auth/ntlmssp/gensec_ntlmssp_server.c | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/auth/gensec/gensec.h b/auth/gensec/gensec.h index aba1018a92..f88da2227d 100644 --- a/auth/gensec/gensec.h +++ b/auth/gensec/gensec.h @@ -87,6 +87,8 @@ struct gensec_settings { /* To fill in our own name in the NTLMSSP server */ const char *server_dns_domain; const char *server_dns_name; + const char *server_netbios_domain; + const char *server_netbios_name; }; struct gensec_security_ops { diff --git a/auth/ntlmssp/gensec_ntlmssp_server.c b/auth/ntlmssp/gensec_ntlmssp_server.c index 6ba3976f7e..8f45c2c664 100644 --- a/auth/ntlmssp/gensec_ntlmssp_server.c +++ b/auth/ntlmssp/gensec_ntlmssp_server.c @@ -343,8 +343,17 @@ NTSTATUS gensec_ntlmssp_server_start(struct gensec_security *gensec_security) ntlmssp_state->server.is_standalone = false; } - netbios_name = lpcfg_netbios_name(gensec_security->settings->lp_ctx); - netbios_domain = lpcfg_workgroup(gensec_security->settings->lp_ctx); + if (gensec_security->settings->server_netbios_name) { + netbios_name = gensec_security->settings->server_netbios_name; + } else { + netbios_name = lpcfg_netbios_name(gensec_security->settings->lp_ctx); + } + + if (gensec_security->settings->server_netbios_domain) { + netbios_domain = gensec_security->settings->server_netbios_domain; + } else { + netbios_domain = lpcfg_workgroup(gensec_security->settings->lp_ctx); + } if (gensec_security->settings->server_dns_name) { dns_name = gensec_security->settings->server_dns_name; |