summaryrefslogtreecommitdiff
path: root/source3/nameserv.c
diff options
context:
space:
mode:
authorSamba Release Account <samba-bugs@samba.org>1997-07-31 18:47:26 +0000
committerSamba Release Account <samba-bugs@samba.org>1997-07-31 18:47:26 +0000
commit363b9a2739e9e39d1f69625e6647c6c9047a901a (patch)
tree1fb3f2f19bbcd15922468bf125ba1314220cd915 /source3/nameserv.c
parentf2b7e75f0cbff28b082150ba5ec60617b92bd545 (diff)
downloadsamba-363b9a2739e9e39d1f69625e6647c6c9047a901a.tar.gz
samba-363b9a2739e9e39d1f69625e6647c6c9047a901a.tar.bz2
samba-363b9a2739e9e39d1f69625e6647c6c9047a901a.zip
loadparm.c: Added new netbios aliases parameter (code from Cisco)
nameannounce.c: Code to announce aliases as well as our own names. namedbsubnet.c: Code to add the aliases to the server list. nameserv.c: Code to defend our aliases on the namelist. namework.c: Code to check it's one of our aliases. nmbd.c: Code to initialise the aliases. proto.h: Fixup protos. util.c: Code to check it's one of our aliases. All above code based on code for 1.9.16p11 donated by Cisco from Ben Woodard <bwoodard@luthien.cisco.com> Jeremy (jallison@whistle.com) (This used to be commit a2ce1c0cb1331551ff728dcfe3260fab4cd827e5)
Diffstat (limited to 'source3/nameserv.c')
-rw-r--r--source3/nameserv.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source3/nameserv.c b/source3/nameserv.c
index abad9b28c2..96bb1c0eac 100644
--- a/source3/nameserv.c
+++ b/source3/nameserv.c
@@ -38,6 +38,7 @@ extern int DEBUGLEVEL;
extern pstring scope;
extern pstring myname;
extern fstring myworkgroup;
+extern char **my_netbios_names;
extern struct in_addr ipzero;
extern struct in_addr wins_ip;
@@ -366,11 +367,16 @@ void add_my_names(void)
for (d = FIRST_SUBNET; d; d = NEXT_SUBNET_INCLUDING_WINS(d))
{
+ int n;
BOOL wins = (lp_wins_support() && (d == wins_subnet));
- add_my_name_entry(d, myname,0x20,nb_type|NB_ACTIVE);
- add_my_name_entry(d, myname,0x03,nb_type|NB_ACTIVE);
- add_my_name_entry(d, myname,0x00,nb_type|NB_ACTIVE);
+ /* Add all our names including aliases. */
+ for (n=0; my_netbios_names[n]; n++)
+ {
+ add_my_name_entry(d, my_netbios_names[n],0x20,nb_type|NB_ACTIVE);
+ add_my_name_entry(d, my_netbios_names[n],0x03,nb_type|NB_ACTIVE);
+ add_my_name_entry(d, my_netbios_names[n],0x00,nb_type|NB_ACTIVE);
+ }
/* these names are added permanently (ttl of zero) and will NOT be
refreshed with the WINS server */