1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

Stop using hacks for dns host/domain names.

(This used to be commit 1d0086aadb)
This commit is contained in:
Jim McDonough 2002-12-03 19:37:42 +00:00
parent ce397dbf04
commit fc67cd8bf3

View File

@ -301,10 +301,12 @@ reporting %s domain %s 0x%x ntversion=%x lm_nt token=%x lm_20 token=%x\n",
else { else {
GUID domain_guid; GUID domain_guid;
pstring domain; pstring domain;
pstring hostname;
char *component, *dc, *q1; char *component, *dc, *q1;
uint8 size; uint8 size;
safe_strcpy(domain, lp_realm(), sizeof(domain)); get_mydomname(domain);
get_myname(hostname);
if (SVAL(uniuser, 0) == 0) { if (SVAL(uniuser, 0) == 0) {
SSVAL(q, 0, SAMLOGON_AD_UNK_R); /* user unknown */ 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. */ q += 2; /* it must follow the domain name. */
/* Push dns host 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); SCVAL(q, 0, size);
q += (size + 1); q += (size + 1);
SSVAL(q, 0, 0x18c0); /* not sure what this is for, but */ SSVAL(q, 0, 0x18c0); /* not sure what this is for, but */
q += 2; /* it must follow the domain name. */ q += 2; /* it must follow the domain name. */
/* Push NETBIOS of domain */ /* 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); SCVAL(q, 0, size);
q += (size + 1); q += (size + 1);
SCVAL(q, 0, 0); q++; /* is this a null terminator or empty field */ SCVAL(q, 0, 0); q++; /* is this a null terminator or empty field */