summaryrefslogtreecommitdiffstats
path: root/src/gss_names.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-08-10 16:44:58 -0400
committerSimo Sorce <simo@redhat.com>2014-08-10 17:00:53 -0400
commit29c539c25ae8071e0b401916ce8cd333c6ec2cd3 (patch)
treec3292472d1741f08a002e04ca9c71899adb6e5bd /src/gss_names.c
parent669a5782ff62b012f4220dc5859ea8595d17532d (diff)
downloadgss-ntlmssp-29c539c25ae8071e0b401916ce8cd333c6ec2cd3.tar.gz
gss-ntlmssp-29c539c25ae8071e0b401916ce8cd333c6ec2cd3.tar.xz
gss-ntlmssp-29c539c25ae8071e0b401916ce8cd333c6ec2cd3.zip
Always send NetBIOS Domain Name
Apparently Windows (2012 at least) refuses to authenticate if the target_info field in the challenge message lacks the NetBIOS Domain name. So Always set the fake the nb_domain_name if not available, but do not mark the server as a domain member in that case.
Diffstat (limited to 'src/gss_names.c')
-rw-r--r--src/gss_names.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gss_names.c b/src/gss_names.c
index 09618a4..e76a3e8 100644
--- a/src/gss_names.c
+++ b/src/gss_names.c
@@ -607,6 +607,14 @@ uint32_t netbios_get_names(char *computer_name,
}
}
+ if (!nb_domain_name) {
+ nb_domain_name = strdup(DEF_NB_DOMAIN);
+ if (!nb_domain_name) {
+ ret = ENOMEM;
+ goto done;
+ }
+ }
+
ret = 0;
done: