summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2009-08-12 17:24:19 +0200
committerKai Blin <kai@samba.org>2009-08-18 19:53:39 +0200
commit0dae6f541f32a09748c69187c8dcfb25281bbab0 (patch)
treef628fa0c5a00dd5b65eb3490e0ebf8e5d32918d8 /nsswitch
parentb6ea2ece0929b875582d1cae184f9cf00abb5742 (diff)
downloadsamba-0dae6f541f32a09748c69187c8dcfb25281bbab0.tar.gz
samba-0dae6f541f32a09748c69187c8dcfb25281bbab0.tar.bz2
samba-0dae6f541f32a09748c69187c8dcfb25281bbab0.zip
s3 wbinfo: Don't use global_myname()
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/wbinfo.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index 3cd5a29e60..2cad3977fb 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -87,6 +87,20 @@ static const char *get_winbind_domain(void)
return details->netbios_domain;
}
+static const char *get_winbind_netbios_name(void)
+{
+ static struct wbcInterfaceDetails *details;
+
+ details = init_interface_details();
+
+ if (!details) {
+ d_fprintf(stderr, "could not obtain winbind netbios name!\n");
+ return 0;
+ }
+
+ return details->netbios_name;
+}
+
/* Copy of parse_domain_user from winbindd_util.c. Parse a string of the
form DOMAIN/user into a domain and a user */
@@ -1389,8 +1403,9 @@ static bool wbinfo_auth_crap(char *username, bool use_ntlmv2, bool use_lanman)
server_chal = data_blob(params.password.response.challenge, 8);
/* Pretend this is a login to 'us', for blob purposes */
- names_blob = NTLMv2_generate_names_blob(NULL, global_myname(),
- get_winbind_domain());
+ names_blob = NTLMv2_generate_names_blob(NULL,
+ get_winbind_netbios_name(),
+ get_winbind_domain());
if (!SMBNTLMv2encrypt(NULL, name_user, name_domain, pass,
&server_chal,