svn commit: samba r12967 - branches/SAMBA_3_0/source/nmbd
trunk/source/nmbd
jerry at samba.org
jerry at samba.org
Mon Jan 16 18:03:56 GMT 2006
Author: jerry
Date: 2006-01-16 18:03:56 +0000 (Mon, 16 Jan 2006)
New Revision: 12967
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12967
Log:
BUG 1061: don't corrupt the file name when reading an lmhosts file (-H) in nmbd. Patch from Andrew Esh <Andrew_Esh at adaptec.com>
Modified:
branches/SAMBA_3_0/source/nmbd/nmbd.c
trunk/source/nmbd/nmbd.c
Changeset:
Modified: branches/SAMBA_3_0/source/nmbd/nmbd.c
===================================================================
--- branches/SAMBA_3_0/source/nmbd/nmbd.c 2006-01-16 17:45:01 UTC (rev 12966)
+++ branches/SAMBA_3_0/source/nmbd/nmbd.c 2006-01-16 18:03:56 UTC (rev 12967)
@@ -657,13 +657,14 @@
pstring logfile;
static BOOL opt_interactive;
poptContext pc;
+ static char *p_lmhosts = dyn_LMHOSTSFILE;
struct poptOption long_options[] = {
POPT_AUTOHELP
{"daemon", 'D', POPT_ARG_VAL, &is_daemon, True, "Become a daemon(default)" },
{"interactive", 'i', POPT_ARG_VAL, &opt_interactive, True, "Run interactive (not a daemon)" },
{"foreground", 'F', POPT_ARG_VAL, &Fork, False, "Run daemon in foreground (for daemontools & etc)" },
{"log-stdout", 'S', POPT_ARG_VAL, &log_stdout, True, "Log to stdout" },
- {"hosts", 'H', POPT_ARG_STRING, dyn_LMHOSTSFILE, 'H', "Load a netbios hosts file"},
+ {"hosts", 'H', POPT_ARG_STRING, &p_lmhosts, 'H', "Load a netbios hosts file"},
{"port", 'p', POPT_ARG_INT, &global_nmb_port, NMB_PORT, "Listen on the specified port" },
POPT_COMMON_SAMBA
{ NULL }
@@ -803,8 +804,8 @@
}
/* Load in any static local names. */
- load_lmhosts_file(dyn_LMHOSTSFILE);
- DEBUG(3,("Loaded hosts file %s\n", dyn_LMHOSTSFILE));
+ load_lmhosts_file(p_lmhosts);
+ DEBUG(3,("Loaded hosts file %s\n", p_lmhosts));
/* If we are acting as a WINS server, initialise data structures. */
if( !initialise_wins() ) {
Modified: trunk/source/nmbd/nmbd.c
===================================================================
--- trunk/source/nmbd/nmbd.c 2006-01-16 17:45:01 UTC (rev 12966)
+++ trunk/source/nmbd/nmbd.c 2006-01-16 18:03:56 UTC (rev 12967)
@@ -657,13 +657,14 @@
pstring logfile;
static BOOL opt_interactive;
poptContext pc;
+ static char *p_lmhosts = dyn_LMHOSTSFILE;
struct poptOption long_options[] = {
POPT_AUTOHELP
{"daemon", 'D', POPT_ARG_VAL, &is_daemon, True, "Become a daemon(default)" },
{"interactive", 'i', POPT_ARG_VAL, &opt_interactive, True, "Run interactive (not a daemon)" },
{"foreground", 'F', POPT_ARG_VAL, &Fork, False, "Run daemon in foreground (for daemontools & etc)" },
{"log-stdout", 'S', POPT_ARG_VAL, &log_stdout, True, "Log to stdout" },
- {"hosts", 'H', POPT_ARG_STRING, dyn_LMHOSTSFILE, 'H', "Load a netbios hosts file"},
+ {"hosts", 'H', POPT_ARG_STRING, &p_lmhosts, 'H', "Load a netbios hosts file"},
{"port", 'p', POPT_ARG_INT, &global_nmb_port, NMB_PORT, "Listen on the specified port" },
POPT_COMMON_SAMBA
{ NULL }
@@ -803,8 +804,8 @@
}
/* Load in any static local names. */
- load_lmhosts_file(dyn_LMHOSTSFILE);
- DEBUG(3,("Loaded hosts file %s\n", dyn_LMHOSTSFILE));
+ load_lmhosts_file(p_lmhosts);
+ DEBUG(3,("Loaded hosts file %s\n", p_lmhosts));
/* If we are acting as a WINS server, initialise data structures. */
if( !initialise_wins() ) {
More information about the samba-cvs
mailing list