summaryrefslogtreecommitdiff
path: root/source3/rpc_server/spoolss
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/rpc_server/spoolss
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/rpc_server/spoolss')
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_nt.c14
-rw-r--r--source3/rpc_server/spoolss/srv_spoolss_util.c6
2 files changed, 10 insertions, 10 deletions
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 1be5100d9e..cb311ef043 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -2523,7 +2523,7 @@ static bool spoolss_connect_to_client(struct rpc_pipe_client **pp_pipe,
}
/* setup the connection */
- ret = cli_full_connection( &the_cli, global_myname(), remote_machine,
+ ret = cli_full_connection( &the_cli, lp_netbios_name(), remote_machine,
&rm_addr, 0, "IPC$", "IPC",
"", /* username */
"", /* domain */
@@ -6037,7 +6037,7 @@ static bool check_printer_ok(TALLOC_CTX *mem_ctx,
info2->location));
/* we force some elements to "correct" values */
- info2->servername = talloc_asprintf(mem_ctx, "\\\\%s", global_myname());
+ info2->servername = talloc_asprintf(mem_ctx, "\\\\%s", lp_netbios_name());
if (info2->servername == NULL) {
return false;
}
@@ -6049,7 +6049,7 @@ static bool check_printer_ok(TALLOC_CTX *mem_ctx,
/* check to see if we allow printername != sharename */
if (lp_force_printername(snum)) {
info2->printername = talloc_asprintf(mem_ctx, "\\\\%s\\%s",
- global_myname(), info2->sharename);
+ lp_netbios_name(), info2->sharename);
} else {
/* make sure printername is in \\server\printername format */
fstrcpy(printername, info2->printername);
@@ -6060,7 +6060,7 @@ static bool check_printer_ok(TALLOC_CTX *mem_ctx,
}
info2->printername = talloc_asprintf(mem_ctx, "\\\\%s\\%s",
- global_myname(), p);
+ lp_netbios_name(), p);
}
if (info2->printername == NULL) {
return false;
@@ -6446,7 +6446,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
buffer.length);
}
- push_reg_sz(mem_ctx, &buffer, global_myname());
+ push_reg_sz(mem_ctx, &buffer, lp_netbios_name());
winreg_set_printer_dataex(mem_ctx,
session_info,
msg_ctx,
@@ -6461,7 +6461,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
if (dnsdomname != NULL && dnsdomname[0] != '\0') {
longname = talloc_strdup(mem_ctx, dnsdomname);
} else {
- longname = talloc_strdup(mem_ctx, global_myname());
+ longname = talloc_strdup(mem_ctx, lp_netbios_name());
}
if (longname == NULL) {
result = WERR_NOMEM;
@@ -6480,7 +6480,7 @@ static WERROR update_dsspooler(TALLOC_CTX *mem_ctx,
buffer.length);
uncname = talloc_asprintf(mem_ctx, "\\\\%s\\%s",
- global_myname(), printer->sharename);
+ lp_netbios_name(), printer->sharename);
push_reg_sz(mem_ctx, &buffer, uncname);
winreg_set_printer_dataex(mem_ctx,
session_info,
diff --git a/source3/rpc_server/spoolss/srv_spoolss_util.c b/source3/rpc_server/spoolss/srv_spoolss_util.c
index 8505c8ffb5..ecb3567060 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_util.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_util.c
@@ -1047,7 +1047,7 @@ WERROR winreg_create_printer(TALLOC_CTX *mem_ctx,
winreg_handle,
&key_hnd,
SPOOL_REG_SHORTSERVERNAME,
- global_myname(),
+ lp_netbios_name(),
&result);
if (!NT_STATUS_IS_OK(status)) {
result = ntstatus_to_werror(status);
@@ -1062,9 +1062,9 @@ WERROR winreg_create_printer(TALLOC_CTX *mem_ctx,
*/
dnssuffix = get_mydnsdomname(tmp_ctx);
if (dnssuffix != NULL && dnssuffix[0] != '\0') {
- longname = talloc_asprintf(tmp_ctx, "%s.%s", global_myname(), dnssuffix);
+ longname = talloc_asprintf(tmp_ctx, "%s.%s", lp_netbios_name(), dnssuffix);
} else {
- longname = talloc_strdup(tmp_ctx, global_myname());
+ longname = talloc_strdup(tmp_ctx, lp_netbios_name());
}
if (longname == NULL) {
result = WERR_NOMEM;