mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
LMHOSTSFILE is now dynamically configured too.
(This used to be commit a779710fff
)
This commit is contained in:
parent
eb2bf006ac
commit
8654a161c8
@ -71,14 +71,16 @@ man_langs = "@manlangs@"
|
||||
|
||||
PASSWD_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DPRIVATE_DIR=\"$(PRIVATE_DIR)\"
|
||||
FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper $(CPPFLAGS) -I. -I$(srcdir)
|
||||
FLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
|
||||
FLAGS2 =
|
||||
FLAGS3 = -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\"
|
||||
FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\" -DFORMSFILE=\"$(FORMSFILE)\" -DNTDRIVERSDIR=\"$(NTDRIVERSDIR)\" -DLIBDIR=\"$(LIBDIR)\"
|
||||
FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4) -DHAVE_INCLUDES_H
|
||||
FLAGS = $(ISA) $(FLAGS5) $(PASSWD_FLAGS)
|
||||
FLAGS32 = $(ISA32) $(FLAGS5) $(PASSWD_FLAGS)
|
||||
|
||||
PATH_FLAGS = -DSBINDIR=\"$(SBINDIR)\" -DBINDIR=\"$(BINDIR)\" -DLOGFILEBASE=\"$(LOGFILEBASE)\"
|
||||
PATH_FLAGS1 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\"
|
||||
PATH_FLAGS2 = $(PATH_FLAGS1) -DBINDIR=\"$(BINDIR)\" -DLOGFILEBASE=\"$(LOGFILEBASE)\"
|
||||
PATH_FLAGS = $(PATH_FLAGS2) -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
|
||||
|
||||
WINBIND_PROGS = bin/wbinfo
|
||||
WINBIND_SPROGS = bin/winbindd
|
||||
|
@ -43,3 +43,5 @@ char const *dyn_SBINDIR = SBINDIR,
|
||||
pstring dyn_CONFIGFILE = CONFIGFILE; /**< Location of smb.conf file. **/
|
||||
|
||||
pstring dyn_LOGFILEBASE; /**< Log file directory. **/
|
||||
|
||||
pstring dyn_LMHOSTSFILE; /**< Statically configured LanMan hosts. **/
|
||||
|
@ -28,4 +28,4 @@ extern char const *dyn_SBINDIR,
|
||||
*dyn_SWATDIR;
|
||||
|
||||
extern pstring dyn_CONFIGFILE;
|
||||
extern pstring dyn_LOGFILEBASE;
|
||||
extern pstring dyn_LOGFILEBASE, dyn_LMHOSTSFILE;
|
||||
|
@ -748,7 +748,7 @@ static BOOL resolve_lmhosts(const char *name, int name_type,
|
||||
|
||||
DEBUG(3,("resolve_lmhosts: Attempting lmhosts lookup for name %s<0x%x>\n", name, name_type));
|
||||
|
||||
fp = startlmhosts( LMHOSTSFILE );
|
||||
fp = startlmhosts(dyn_LMHOSTSFILE);
|
||||
if(fp) {
|
||||
while (getlmhostsent(fp, lmhost_name, &name_type2, &return_ip)) {
|
||||
if (strequal(name, lmhost_name) &&
|
||||
|
@ -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() )
|
||||
|
Loading…
Reference in New Issue
Block a user