summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2002-12-03 19:38:27 +0000
committerJim McDonough <jmcd@samba.org>2002-12-03 19:38:27 +0000
commit9ce440e25de2db3e6170574c548fd0335d0b1190 (patch)
tree294aac32f295c768a9212b1a71178bca8e66eb12
parent4225a857c9f2470c056a2ceee6d873f589b5f117 (diff)
downloadsamba-9ce440e25de2db3e6170574c548fd0335d0b1190.tar.gz
samba-9ce440e25de2db3e6170574c548fd0335d0b1190.tar.bz2
samba-9ce440e25de2db3e6170574c548fd0335d0b1190.zip
Stop using hacks for dns host/domain names.
(This used to be commit e707e2cc7c7483f6bcfbbaf8d3d99614a05a9ecf)
-rw-r--r--source3/nmbd/nmbd_processlogon.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd_processlogon.c b/source3/nmbd/nmbd_processlogon.c
index 6f2517f39f..48fc8eabbf 100644
--- a/source3/nmbd/nmbd_processlogon.c
+++ b/source3/nmbd/nmbd_processlogon.c
@@ -301,10 +301,12 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
else {
GUID domain_guid;
pstring domain;
+ pstring hostname;
char *component, *dc, *q1;
uint8 size;
- safe_strcpy(domain, lp_realm(), sizeof(domain));
+ get_mydomname(domain);
+ get_myname(hostname);
if (SVAL(uniuser, 0) == 0) {
SSVAL(q, 0, SAMLOGON_AD_UNK_R); /* user unknown */
@@ -341,14 +343,14 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
q += 2; /* it must follow the domain name. */
/* Push dns host name */
- size = push_ascii(&q[1], global_myname(), -1, 0);
+ size = push_ascii(&q[1], hostname, -1, 0);
SCVAL(q, 0, size);
q += (size + 1);
SSVAL(q, 0, 0x18c0); /* not sure what this is for, but */
q += 2; /* it must follow the domain name. */
/* Push NETBIOS of domain */
- size = push_ascii(&q[1], domain, -1, STR_UPPER);
+ size = push_ascii(&q[1], lp_workgroup(), -1, STR_UPPER);
SCVAL(q, 0, size);
q += (size + 1);
SCVAL(q, 0, 0); q++; /* is this a null terminator or empty field */