summaryrefslogtreecommitdiff
path: root/source3/smbd
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/smbd
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/smbd')
-rw-r--r--source3/smbd/avahi_register.c2
-rw-r--r--source3/smbd/lanman.c12
-rw-r--r--source3/smbd/negprot.c4
-rw-r--r--source3/smbd/reply.c2
-rw-r--r--source3/smbd/seal.c2
-rw-r--r--source3/smbd/sesssetup.c2
-rw-r--r--source3/smbd/trans2.c2
7 files changed, 13 insertions, 13 deletions
diff --git a/source3/smbd/avahi_register.c b/source3/smbd/avahi_register.c
index 05bd6038f4..368168d41d 100644
--- a/source3/smbd/avahi_register.c
+++ b/source3/smbd/avahi_register.c
@@ -88,7 +88,7 @@ static void avahi_client_callback(AvahiClient *c, AvahiClientState status,
}
if (avahi_entry_group_add_service(
state->entry_group, AVAHI_IF_UNSPEC,
- AVAHI_PROTO_UNSPEC, 0, global_myname(),
+ AVAHI_PROTO_UNSPEC, 0, lp_netbios_name(),
"_smb._tcp", NULL, NULL, state->port, NULL) < 0) {
error = avahi_client_errno(c);
DEBUG(10, ("avahi_entry_group_add_service failed: "
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 5958bb9746..f8101d9571 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -2377,7 +2377,7 @@ static bool api_RNetGroupEnum(struct smbd_server_connection *sconn,
b = samr_pipe->binding_handle;
- status = dcerpc_samr_Connect2(b, talloc_tos(), global_myname(),
+ status = dcerpc_samr_Connect2(b, talloc_tos(), lp_netbios_name(),
SAMR_ACCESS_LOOKUP_DOMAIN, &samr_handle,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -2583,7 +2583,7 @@ static bool api_NetUserGetGroups(struct smbd_server_connection *sconn,
b = samr_pipe->binding_handle;
- status = dcerpc_samr_Connect2(b, talloc_tos(), global_myname(),
+ status = dcerpc_samr_Connect2(b, talloc_tos(), lp_netbios_name(),
SAMR_ACCESS_LOOKUP_DOMAIN, &samr_handle,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -2775,7 +2775,7 @@ static bool api_RNetUserEnum(struct smbd_server_connection *sconn,
b = samr_pipe->binding_handle;
- status = dcerpc_samr_Connect2(b, talloc_tos(), global_myname(),
+ status = dcerpc_samr_Connect2(b, talloc_tos(), lp_netbios_name(),
SAMR_ACCESS_LOOKUP_DOMAIN, &samr_handle,
&result);
if (!NT_STATUS_IS_OK(status)) {
@@ -3044,7 +3044,7 @@ static bool api_SetUserPassword(struct smbd_server_connection *sconn,
b = cli->binding_handle;
status = dcerpc_samr_Connect2(b, mem_ctx,
- global_myname(),
+ lp_netbios_name(),
SAMR_ACCESS_CONNECT_TO_SERVER |
SAMR_ACCESS_ENUM_DOMAINS |
SAMR_ACCESS_LOOKUP_DOMAIN,
@@ -3294,7 +3294,7 @@ static bool api_SamOEMChangePassword(struct smbd_server_connection *sconn,
b = cli->binding_handle;
- init_lsa_AsciiString(&server, global_myname());
+ init_lsa_AsciiString(&server, lp_netbios_name());
init_lsa_AsciiString(&account, user);
status = dcerpc_samr_OemChangePasswordUser2(b, mem_ctx,
@@ -4306,7 +4306,7 @@ static bool api_RNetUserGetInfo(struct smbd_server_connection *sconn,
b = cli->binding_handle;
status = dcerpc_samr_Connect2(b, mem_ctx,
- global_myname(),
+ lp_netbios_name(),
SAMR_ACCESS_CONNECT_TO_SERVER |
SAMR_ACCESS_ENUM_DOMAINS |
SAMR_ACCESS_LOOKUP_DOMAIN,
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index da66dad0d8..a6d7cc0ab3 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -224,7 +224,7 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn)
} else {
fstring myname;
char *host_princ_s = NULL;
- name_to_fqdn(myname, global_myname());
+ name_to_fqdn(myname, lp_netbios_name());
strlower_m(myname);
if (asprintf(&host_princ_s, "cifs/%s@%s", myname, lp_realm())
== -1) {
@@ -246,7 +246,7 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn)
memset(blob_out.data, '\0', 16);
- checked_strlcpy(unix_name, global_myname(), sizeof(unix_name));
+ checked_strlcpy(unix_name, lp_netbios_name(), sizeof(unix_name));
strlower_m(unix_name);
push_ascii_nstring(dos_name, unix_name);
strlcpy((char *)blob_out.data, dos_name, 17);
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 1980f757fd..a804884ef7 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -972,7 +972,7 @@ void reply_ioctl(struct smb_request *req)
SSVAL(p, 0, 0);
}
srvstr_push((char *)req->outbuf, req->flags2, p+2,
- global_myname(), 15,
+ lp_netbios_name(), 15,
STR_TERMINATE|STR_ASCII);
if (conn) {
srvstr_push((char *)req->outbuf, req->flags2,
diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c
index 28f70b6241..26185062a6 100644
--- a/source3/smbd/seal.c
+++ b/source3/smbd/seal.c
@@ -196,7 +196,7 @@ static NTSTATUS make_auth_gss(struct smb_srv_trans_enc_ctx *ec)
gss_cred_id_t srv_cred;
fstring fqdn;
- name_to_fqdn(fqdn, global_myname());
+ name_to_fqdn(fqdn, lp_netbios_name());
strlower_m(fqdn);
status = get_srv_gss_creds("cifs", fqdn, GSS_C_ACCEPT, &srv_cred);
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 98bed880df..dda4ef296e 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -194,7 +194,7 @@ static bool make_krb5_skew_error(DATA_BLOB *pblob_out)
return False;
}
/* Create server principal. */
- asprintf(&host_princ_s, "%s$@%s", global_myname(), lp_realm());
+ asprintf(&host_princ_s, "%s$@%s", lp_netbios_name(), lp_realm());
if (!host_princ_s) {
goto out;
}
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index ae6eb59451..b853722eae 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -8377,7 +8377,7 @@ static void call_trans2ioctl(connection_struct *conn,
SSVAL(pdata, 0, 0);
}
srvstr_push(pdata, req->flags2, pdata + 2,
- global_myname(), 15,
+ lp_netbios_name(), 15,
STR_ASCII|STR_TERMINATE); /* Our NetBIOS name */
srvstr_push(pdata, req->flags2, pdata+18,
lp_servicename(SNUM(conn)), 13,