summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-11-19 03:12:10 +0000
committerMartin Pool <mbp@samba.org>2001-11-19 03:12:10 +0000
commit8654a161c8722a0059b15af12cdb81b27d49e71a (patch)
treeedf4e622fd1cbc3d165a80b5caf7b11a965519af /source3/nmbd
parenteb2bf006acc4842d9b6d2749805dc24404a3d423 (diff)
downloadsamba-8654a161c8722a0059b15af12cdb81b27d49e71a.tar.gz
samba-8654a161c8722a0059b15af12cdb81b27d49e71a.tar.bz2
samba-8654a161c8722a0059b15af12cdb81b27d49e71a.zip
LMHOSTSFILE is now dynamically configured too.
(This used to be commit a779710fff5fddcbf65a8ddc8e9169b586b85481)
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index de673b6462..595a65a0cd 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -32,7 +32,6 @@ int ClientNMB = -1;
int ClientDGRAM = -1;
int global_nmb_port = -1;
-static pstring host_file;
extern pstring global_myname;
extern fstring global_myworkgroup;
extern char **my_netbios_names;
@@ -668,7 +667,6 @@ static void usage(char *pname)
append_log = True; /* Default, override with '-o' option. */
global_nmb_port = NMB_PORT;
- *host_file = 0;
global_in_nmbd = True;
StartupTime = time(NULL);
@@ -680,10 +678,6 @@ static void usage(char *pname)
slprintf(debugf, sizeof(debugf)-1, "%s/log.nmbd", dyn_LOGFILEBASE);
setup_logging( argv[0], False );
-#ifdef LMHOSTSFILE
- pstrcpy( host_file, LMHOSTSFILE );
-#endif
-
/* this is for people who can't start the program correctly */
while (argc > 1 && (*argv[1] != '-'))
{
@@ -728,7 +722,7 @@ static void usage(char *pname)
DEBUG(0,("Obsolete option '%c' used\n",opt));
break;
case 'H':
- pstrcpy(host_file,optarg);
+ pstrcpy(dyn_LMHOSTSFILE, optarg);
break;
case 'n':
pstrcpy(global_myname,optarg);
@@ -838,11 +832,8 @@ static void usage(char *pname)
}
/* Load in any static local names. */
- if ( *host_file )
- {
- load_lmhosts_file(host_file);
- DEBUG(3,("Loaded hosts file\n"));
- }
+ load_lmhosts_file(dyn_LMHOSTSFILE);
+ DEBUG(3,("Loaded hosts file %s\n", dyn_LMHOSTSFILE));
/* If we are acting as a WINS server, initialise data structures. */
if( !initialise_wins() )