mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
r19699: - use better names for the site strings
- use the client_site when creating the server object
metze
(This used to be commit b02d0e1be3
)
This commit is contained in:
parent
31f9ec1233
commit
65a50f46c8
@ -59,8 +59,8 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
|
||||
const char *dns_domain;
|
||||
const char *pdc_dns_name;
|
||||
const char *flatname;
|
||||
const char *site_name;
|
||||
const char *site_name2;
|
||||
const char *server_site;
|
||||
const char *client_site;
|
||||
const char *pdc_ip;
|
||||
const struct ldb_dn *partitions_basedn;
|
||||
|
||||
@ -153,8 +153,8 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
|
||||
dns_domain);
|
||||
|
||||
flatname = samdb_result_string(ref_res[0], "nETBIOSName", lp_workgroup());
|
||||
site_name = "Default-First-Site-Name";
|
||||
site_name2 = "Default-First-Site-Name";
|
||||
server_site = "Default-First-Site-Name";
|
||||
client_site = "Default-First-Site-Name";
|
||||
pdc_ip = iface_best_ip(src_address);
|
||||
|
||||
ZERO_STRUCTP(netlogon);
|
||||
@ -198,8 +198,8 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
|
||||
netlogon->logon5.domain = flatname;
|
||||
netlogon->logon5.pdc_name = lp_netbios_name();
|
||||
netlogon->logon5.user_name = user;
|
||||
netlogon->logon5.site_name = site_name;
|
||||
netlogon->logon5.site_name2 = site_name2;
|
||||
netlogon->logon5.server_site = server_site;
|
||||
netlogon->logon5.client_site = client_site;
|
||||
netlogon->logon5.lmnt_token = 0xFFFF;
|
||||
netlogon->logon5.lm20_token = 0xFFFF;
|
||||
break;
|
||||
@ -213,8 +213,8 @@ static NTSTATUS cldapd_netlogon_fill(struct cldapd_server *cldapd,
|
||||
netlogon->logon13.domain = flatname;
|
||||
netlogon->logon13.pdc_name = lp_netbios_name();
|
||||
netlogon->logon13.user_name = user;
|
||||
netlogon->logon13.site_name = site_name;
|
||||
netlogon->logon13.site_name2 = site_name2;
|
||||
netlogon->logon13.server_site = server_site;
|
||||
netlogon->logon13.client_site = client_site;
|
||||
netlogon->logon13.unknown = 10;
|
||||
netlogon->logon13.unknown2 = 2;
|
||||
netlogon->logon13.pdc_ip = pdc_ip;
|
||||
|
@ -69,7 +69,7 @@ NTSTATUS libnet_FindSite(TALLOC_CTX *ctx, struct libnet_JoinSite *r)
|
||||
}
|
||||
} else {
|
||||
site_name_str = talloc_asprintf(tmp_ctx, "%s",
|
||||
search.out.netlogon.logon5.site_name);
|
||||
search.out.netlogon.logon5.client_site);
|
||||
if (!site_name_str) {
|
||||
r->out.error_string = NULL;
|
||||
talloc_free(tmp_ctx);
|
||||
|
@ -406,8 +406,8 @@ interface nbt
|
||||
nbt_string domain;
|
||||
nbt_string pdc_name;
|
||||
nbt_string user_name;
|
||||
nbt_string site_name;
|
||||
nbt_string site_name2;
|
||||
nbt_string server_site;
|
||||
nbt_string client_site;
|
||||
uint8 unknown;
|
||||
uint32 unknown2;
|
||||
[flag(NDR_BIG_ENDIAN)]
|
||||
@ -505,8 +505,8 @@ interface nbt
|
||||
nbt_string domain;
|
||||
nbt_string pdc_name;
|
||||
nbt_string user_name;
|
||||
nbt_string site_name;
|
||||
nbt_string site_name2;
|
||||
nbt_string server_site;
|
||||
nbt_string client_site;
|
||||
[value(5)] uint32 nt_version;
|
||||
uint16 lmnt_token;
|
||||
uint16 lm20_token;
|
||||
@ -522,8 +522,8 @@ interface nbt
|
||||
nbt_string domain;
|
||||
nbt_string pdc_name;
|
||||
nbt_string user_name;
|
||||
nbt_string site_name;
|
||||
nbt_string site_name2;
|
||||
nbt_string server_site;
|
||||
nbt_string client_site;
|
||||
uint8 unknown;
|
||||
uint32 unknown2;
|
||||
[flag(NDR_BIG_ENDIAN)]
|
||||
|
@ -194,8 +194,8 @@ static void nbtd_netlogon_getdc2(struct dgram_mailslot_handler *dgmslot,
|
||||
pdc->pdc_name = lp_netbios_name();
|
||||
pdc->user_name = netlogon->req.pdc2.user_name;
|
||||
/* TODO: we need to make sure these are in our DNS zone */
|
||||
pdc->site_name = "Default-First-Site-Name";
|
||||
pdc->site_name2 = "Default-First-Site-Name";
|
||||
pdc->server_site = "Default-First-Site-Name";
|
||||
pdc->client_site = "Default-First-Site-Name";
|
||||
pdc->unknown = 0x10; /* what is this? */
|
||||
pdc->unknown2 = 2; /* and this ... */
|
||||
pdc->pdc_ip = my_ip;
|
||||
|
@ -284,8 +284,9 @@ static BOOL test_GetInfo(struct DsSyncTest *ctx)
|
||||
ctx->site_name = talloc_asprintf(ctx, "%s", "Default-First-Site-Name");
|
||||
printf("cldap_netlogon() returned %s. Defaulting to Site-Name: %s\n", errstr, ctx->site_name);
|
||||
} else {
|
||||
ctx->site_name = talloc_steal(ctx, search.out.netlogon.logon5.site_name);
|
||||
printf("cldap_netlogon() returned Site-Name: %s.\n",ctx->site_name);
|
||||
ctx->site_name = talloc_steal(ctx, search.out.netlogon.logon5.client_site);
|
||||
printf("cldap_netlogon() returned Client Site-Name: %s.\n",ctx->site_name);
|
||||
printf("cldap_netlogon() returned Server Site-Name: %s.\n",search.out.netlogon.logon5.server_site);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user