summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc.c
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/utils/net_rpc.c
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/utils/net_rpc.c')
-rw-r--r--source3/utils/net_rpc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index a8ce9b7d48..2ecf1aaa5a 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -366,7 +366,7 @@ static NTSTATUS rpc_oldjoin_internals(struct net_context *c,
sec_channel_type = get_sec_channel_type(NULL);
}
- fstrcpy(trust_passwd, global_myname());
+ fstrcpy(trust_passwd, lp_netbios_name());
strlower_m(trust_passwd);
/*
@@ -379,7 +379,7 @@ static NTSTATUS rpc_oldjoin_internals(struct net_context *c,
E_md4hash(trust_passwd, orig_trust_passwd_hash);
result = trust_pw_change_and_store_it(pipe_hnd, mem_ctx, c->opt_target_workgroup,
- global_myname(),
+ lp_netbios_name(),
orig_trust_passwd_hash,
sec_channel_type);
@@ -481,10 +481,10 @@ int net_rpc_join(struct net_context *c, int argc, const char **argv)
return -1;
}
- if (strlen(global_myname()) > 15) {
+ if (strlen(lp_netbios_name()) > 15) {
d_printf(_("Our netbios name can be at most 15 chars long, "
"\"%s\" is %u chars long\n"),
- global_myname(), (unsigned int)strlen(global_myname()));
+ lp_netbios_name(), (unsigned int)strlen(lp_netbios_name()));
return -1;
}
@@ -6535,7 +6535,7 @@ static int rpc_trustdom_vampire(struct net_context *c, int argc,
domain_name = c->opt_workgroup;
c->opt_target_workgroup = c->opt_workgroup;
} else {
- fstrcpy(pdc_name, global_myname());
+ fstrcpy(pdc_name, lp_netbios_name());
domain_name = talloc_strdup(mem_ctx, lp_workgroup());
c->opt_target_workgroup = domain_name;
};
@@ -6713,7 +6713,7 @@ static int rpc_trustdom_list(struct net_context *c, int argc, const char **argv)
domain_name = c->opt_workgroup;
c->opt_target_workgroup = c->opt_workgroup;
} else {
- fstrcpy(pdc_name, global_myname());
+ fstrcpy(pdc_name, lp_netbios_name());
domain_name = talloc_strdup(mem_ctx, lp_workgroup());
c->opt_target_workgroup = domain_name;
};
@@ -7089,7 +7089,7 @@ bool net_rpc_check(struct net_context *c, unsigned flags)
return false;
status = cli_connect_nb(server_name, &server_ss, 0, 0x20,
- global_myname(), Undefined, &cli);
+ lp_netbios_name(), Undefined, &cli);
if (!NT_STATUS_IS_OK(status)) {
return false;
}