summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-02-04 02:20:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:31 -0500
commit32899da2002605686ce00c8c299701661ae9077e (patch)
treeece9d25109675dd5f41539397a750b890e1a6e9c
parentc832e57ceb0be2acb96f187884f63d071c9e787f (diff)
downloadsamba-32899da2002605686ce00c8c299701661ae9077e.tar.gz
samba-32899da2002605686ce00c8c299701661ae9077e.tar.bz2
samba-32899da2002605686ce00c8c299701661ae9077e.zip
r5214: added support for "netbios aliases" in smb.conf
(This used to be commit 3270b07539d9a50763f4f15c7aa8fee028928b29)
-rw-r--r--source4/nbt_server/register.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/nbt_server/register.c b/source4/nbt_server/register.c
index f05c8a4f82..c655de0515 100644
--- a/source4/nbt_server/register.c
+++ b/source4/nbt_server/register.c
@@ -163,7 +163,7 @@ static void nbtd_register_name_iface(struct nbt_interface *iface,
if (!iname) return;
iname->iface = iface;
- iname->name.name = talloc_strdup(iname, name);
+ iname->name.name = strupper_talloc(iname, name);
iname->name.type = type;
if (scope && *scope) {
iname->name.scope = talloc_strdup(iname, scope);
@@ -228,6 +228,7 @@ static void nbtd_register_name(struct nbt_server *nbtsrv,
void nbtd_register_names(struct nbt_server *nbtsrv)
{
uint16_t nb_flags = NBT_NODE_M;
+ const char **aliases;
/* note that we don't initially mark the names "ACTIVE". They are
marked active once registration is successful */
@@ -235,6 +236,12 @@ void nbtd_register_names(struct nbt_server *nbtsrv)
nbtd_register_name(nbtsrv, lp_netbios_name(), NBT_NAME_USER, nb_flags);
nbtd_register_name(nbtsrv, lp_netbios_name(), NBT_NAME_SERVER, nb_flags);
+ aliases = lp_netbios_aliases();
+ while (aliases && aliases[0]) {
+ nbtd_register_name(nbtsrv, aliases[0], NBT_NAME_SERVER, nb_flags);
+ aliases++;
+ }
+
nb_flags |= NBT_NM_GROUP;
nbtd_register_name(nbtsrv, lp_workgroup(), NBT_NAME_CLIENT, nb_flags);