summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-06-09 15:31:03 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-06-09 12:40:09 +0200
commit74eed8f3ed5c333728350df1d23a4318e9104909 (patch)
treec0e4d64d876400e711bf252b73f4bdb43f0e55c1 /source3/auth
parent0e95311c235929e07fdcfd7153b91ae795a979b9 (diff)
downloadsamba-74eed8f3ed5c333728350df1d23a4318e9104909.tar.gz
samba-74eed8f3ed5c333728350df1d23a4318e9104909.tar.bz2
samba-74eed8f3ed5c333728350df1d23a4318e9104909.zip
s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the loadparm system, now that we have lp_set_cmdline() to handle overrides correctly. Andrew Bartlett
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_domain.c8
-rw-r--r--source3/auth/auth_netlogond.c8
-rw-r--r--source3/auth/auth_ntlmssp.c2
-rw-r--r--source3/auth/auth_server.c4
-rw-r--r--source3/auth/auth_util.c4
-rw-r--r--source3/auth/server_info_sam.c4
6 files changed, 15 insertions, 15 deletions
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index 2afff6fc7b..c18a81ab57 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -69,7 +69,7 @@ void attempt_machine_password_change(void)
DEBUG(0,("attempt_machine_password_change: unable to lock "
"the machine account password for machine %s in "
"domain %s.\n",
- global_myname(), lp_workgroup() ));
+ lp_netbios_name(), lp_workgroup() ));
return;
}
@@ -77,7 +77,7 @@ void attempt_machine_password_change(void)
trust_passwd_hash, &lct, NULL)) {
DEBUG(0,("attempt_machine_password_change: unable to read the "
"machine account password for %s in domain %s.\n",
- global_myname(), lp_workgroup()));
+ lp_netbios_name(), lp_workgroup()));
TALLOC_FREE(lock);
return;
}
@@ -146,7 +146,7 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli,
}
/* Attempt connection */
- result = cli_full_connection(cli, global_myname(), dc_name, dc_ss, 0,
+ result = cli_full_connection(cli, lp_netbios_name(), dc_name, dc_ss, 0,
"IPC$", "IPC", "", "", "", 0, Undefined);
if (!NT_STATUS_IS_OK(result)) {
@@ -219,7 +219,7 @@ machine %s. Error was : %s.\n", dc_name, nt_errstr(result)));
result = rpccli_netlogon_setup_creds(netlogon_pipe,
dc_name, /* server name */
domain, /* domain */
- global_myname(), /* client name */
+ lp_netbios_name(), /* client name */
account_name, /* machine account name */
machine_pwd,
sec_chan_type,
diff --git a/source3/auth/auth_netlogond.c b/source3/auth/auth_netlogond.c
index e9a74b6d12..7fb037457e 100644
--- a/source3/auth/auth_netlogond.c
+++ b/source3/auth/auth_netlogond.c
@@ -133,7 +133,7 @@ static NTSTATUS netlogond_validate(TALLOC_CTX *mem_ctx,
p, p,
user_info->logon_parameters, /* flags such as 'allow
* workstation logon' */
- global_myname(), /* server name */
+ lp_netbios_name(), /* server name */
user_info->client.account_name, /* user name logging on. */
user_info->client.domain_name, /* domain name */
user_info->workstation_name, /* workstation name */
@@ -234,7 +234,7 @@ static NTSTATUS mymachinepw(uint8_t pwd[16])
DEBUG(10, ("default_nc = %s\n", default_nc));
myname = talloc_asprintf_strupper_m(talloc_tos(), "%s$",
- global_myname());
+ lp_netbios_name());
if (myname == NULL) {
DEBUG(10, ("talloc failed\n"));
status = NT_STATUS_NO_MEMORY;
@@ -375,8 +375,8 @@ static NTSTATUS check_netlogond_security(const struct auth_context *auth_context
dump_data(10, machine_password, 16);
status = rpccli_netlogon_setup_creds(
- p, global_myname(), lp_workgroup(), global_myname(),
- global_myname(), machine_password, SEC_CHAN_BDC, &neg_flags);
+ p, lp_netbios_name(), lp_workgroup(), lp_netbios_name(),
+ lp_netbios_name(), machine_password, SEC_CHAN_BDC, &neg_flags);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(10, ("rpccli_netlogon_setup_creds failed: %s\n",
diff --git a/source3/auth/auth_ntlmssp.c b/source3/auth/auth_ntlmssp.c
index 4151ebaf9d..1fecc0988e 100644
--- a/source3/auth/auth_ntlmssp.c
+++ b/source3/auth/auth_ntlmssp.c
@@ -190,7 +190,7 @@ NTSTATUS auth_ntlmssp_start(struct auth_ntlmssp_state **auth_ntlmssp_state)
is_standalone = false;
}
- netbios_name = global_myname();
+ netbios_name = lp_netbios_name();
netbios_domain = lp_workgroup();
/* This should be a 'netbios domain -> DNS domain' mapping */
dns_domain = get_mydnsdomname(talloc_tos());
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index 33c658dd8f..da380db01a 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -85,7 +85,7 @@ static struct cli_state *server_cryptkey(TALLOC_CTX *mem_ctx)
}
status = cli_connect_nb(desthost, &dest_ss, 0, 0x20,
- global_myname(), Undefined, &cli);
+ lp_netbios_name(), Undefined, &cli);
if (NT_STATUS_IS_OK(status)) {
DEBUG(3,("connected to password server %s\n",desthost));
connected_ok = True;
@@ -332,7 +332,7 @@ static NTSTATUS check_smbserver_security(const struct auth_context *auth_context
baduser = talloc_asprintf(mem_ctx,
"%s%s",
INVALID_USER_PREFIX,
- global_myname());
+ lp_netbios_name());
if (!baduser) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index b401409f6c..1b986a0640 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -668,7 +668,7 @@ NTSTATUS make_server_info_pw(struct auth_serversupplied_info **server_info,
return NT_STATUS_NO_MEMORY;
}
- status = samu_to_SamInfo3(result, sampass, global_myname(),
+ status = samu_to_SamInfo3(result, sampass, lp_netbios_name(),
&result->info3, &result->extra);
TALLOC_FREE(sampass);
if (!NT_STATUS_IS_OK(status)) {
@@ -758,7 +758,7 @@ static NTSTATUS make_new_server_info_guest(struct auth_serversupplied_info **ses
struct auth_serversupplied_info *server_info;
static const char zeros[16] = {0};
const char *guest_account = lp_guestaccount();
- const char *domain = global_myname();
+ const char *domain = lp_netbios_name();
struct netr_SamInfo3 info3;
TALLOC_CTX *tmp_ctx;
NTSTATUS status;
diff --git a/source3/auth/server_info_sam.c b/source3/auth/server_info_sam.c
index 31fd9f9926..261e3de8f2 100644
--- a/source3/auth/server_info_sam.c
+++ b/source3/auth/server_info_sam.c
@@ -49,7 +49,7 @@ static bool is_our_machine_account(const char *username)
return false;
}
truncname[ulen-1] = '\0';
- ret = strequal(truncname, global_myname());
+ ret = strequal(truncname, lp_netbios_name());
SAFE_FREE(truncname);
return ret;
}
@@ -77,7 +77,7 @@ NTSTATUS make_server_info_sam(struct auth_serversupplied_info **server_info,
return NT_STATUS_NO_SUCH_USER;
}
- status = samu_to_SamInfo3(result, sampass, global_myname(),
+ status = samu_to_SamInfo3(result, sampass, lp_netbios_name(),
&result->info3, &result->extra);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(result);