summaryrefslogtreecommitdiff
path: root/source3/libsmb
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/libsmb
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/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c2
-rw-r--r--source3/libsmb/clidgram.c6
-rw-r--r--source3/libsmb/clifsinfo.c2
-rw-r--r--source3/libsmb/clikrb5.c2
-rw-r--r--source3/libsmb/libsmb_context.c4
-rw-r--r--source3/libsmb/libsmb_server.c2
-rw-r--r--source3/libsmb/smbsock_connect.c2
-rw-r--r--source3/libsmb/trusts_util.c4
8 files changed, 12 insertions, 12 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 2b269378dc..a9a1847f1c 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1590,7 +1590,7 @@ static struct tevent_req *cli_session_setup_ntlmssp_send(
cli_temp_set_signing(cli);
status = ntlmssp_client_start(state,
- global_myname(),
+ lp_netbios_name(),
lp_workgroup(),
lp_client_ntlmv2_auth(),
&state->ntlmssp_state);
diff --git a/source3/libsmb/clidgram.c b/source3/libsmb/clidgram.c
index c0eb724fbf..90f06fd535 100644
--- a/source3/libsmb/clidgram.c
+++ b/source3/libsmb/clidgram.c
@@ -140,7 +140,7 @@ static bool prep_getdc_request(const struct sockaddr_storage *dc_ss,
my_sid = *sid;
}
- my_acct_name = talloc_asprintf(talloc_tos(), "%s$", global_myname());
+ my_acct_name = talloc_asprintf(talloc_tos(), "%s$", lp_netbios_name());
if (my_acct_name == NULL) {
goto fail;
}
@@ -149,7 +149,7 @@ static bool prep_getdc_request(const struct sockaddr_storage *dc_ss,
s = &packet.req.logon;
s->request_count = 0;
- s->computer_name = global_myname();
+ s->computer_name = lp_netbios_name();
s->user_name = my_acct_name;
s->mailslot_name = my_mailslot;
s->acct_control = ACB_WSTRUST;
@@ -170,7 +170,7 @@ static bool prep_getdc_request(const struct sockaddr_storage *dc_ss,
ret = cli_prep_mailslot(false, NBT_MAILSLOT_NTLOGON, 0,
(char *)blob.data, blob.length,
- global_myname(), 0, domain_name, 0x1c,
+ lp_netbios_name(), 0, domain_name, 0x1c,
dc_ss, dgm_id, p);
fail:
TALLOC_FREE(frame);
diff --git a/source3/libsmb/clifsinfo.c b/source3/libsmb/clifsinfo.c
index db4199d327..78024c8f98 100644
--- a/source3/libsmb/clifsinfo.c
+++ b/source3/libsmb/clifsinfo.c
@@ -592,7 +592,7 @@ NTSTATUS cli_raw_ntlm_smb_encryption_start(struct cli_state *cli,
return NT_STATUS_NO_MEMORY;
}
status = ntlmssp_client_start(NULL,
- global_myname(),
+ lp_netbios_name(),
lp_workgroup(),
lp_client_ntlmv2_auth(),
&es->s.ntlmssp_state);
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index 73a37b3115..b11aed8c7b 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -1273,7 +1273,7 @@ done:
return ENOMEM;
}
- put_name(buf, global_myname(), ' ', 0x20);
+ put_name(buf, lp_netbios_name(), ' ', 0x20);
#if defined(HAVE_MAGIC_IN_KRB5_ADDRESS) && defined(HAVE_ADDRTYPE_IN_KRB5_ADDRESS) /* MIT */
{
diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c
index 9d473d19b2..dbf70e02c8 100644
--- a/source3/libsmb/libsmb_context.c
+++ b/source3/libsmb/libsmb_context.c
@@ -599,8 +599,8 @@ smbc_init_context(SMBCCTX *context)
* our hostname etc
*/
char *netbios_name;
- if (global_myname()) {
- netbios_name = SMB_STRDUP(global_myname());
+ if (lp_netbios_name()) {
+ netbios_name = SMB_STRDUP(lp_netbios_name());
} else {
/*
* Hmmm, I want to get hostname as well, but I am too
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index 80faaed1af..4dbc2652d2 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -713,7 +713,7 @@ SMBC_attr_server(TALLOC_CTX *ctx,
zero_sockaddr(&ss);
nt_status = cli_full_connection(&ipc_cli,
- global_myname(), server,
+ lp_netbios_name(), server,
&ss, 0, "IPC$", "?????",
*pp_username,
*pp_workgroup,
diff --git a/source3/libsmb/smbsock_connect.c b/source3/libsmb/smbsock_connect.c
index 8cf403c5ac..3a228b1b9e 100644
--- a/source3/libsmb/smbsock_connect.c
+++ b/source3/libsmb/smbsock_connect.c
@@ -216,7 +216,7 @@ struct tevent_req *smbsock_connect_send(TALLOC_CTX *mem_ctx,
state->called_type =
(called_type != -1) ? called_type : 0x20;
state->calling_name =
- (calling_name != NULL) ? calling_name : global_myname();
+ (calling_name != NULL) ? calling_name : lp_netbios_name();
state->calling_type =
(calling_type != -1) ? calling_type : 0x00;
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c
index eb79b2ba93..dc2cf03a04 100644
--- a/source3/libsmb/trusts_util.c
+++ b/source3/libsmb/trusts_util.c
@@ -169,7 +169,7 @@ bool enumerate_domain_trusts( TALLOC_CTX *mem_ctx, const char *domain,
/* setup the anonymous connection */
- status = cli_full_connection( &cli, global_myname(), dc_name, &dc_ss, 0, "IPC$", "IPC",
+ status = cli_full_connection( &cli, lp_netbios_name(), dc_name, &dc_ss, 0, "IPC$", "IPC",
"", "", "", 0, Undefined);
if ( !NT_STATUS_IS_OK(status) )
goto done;
@@ -264,7 +264,7 @@ NTSTATUS change_trust_account_password( const char *domain, const char *remote_m
/* if this next call fails, then give up. We can't do
password changes on BDC's --jerry */
- if (!NT_STATUS_IS_OK(cli_full_connection(&cli, global_myname(), dc_name,
+ if (!NT_STATUS_IS_OK(cli_full_connection(&cli, lp_netbios_name(), dc_name,
NULL, 0,
"IPC$", "IPC",
"", "",