mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
smbd/mangle.c
smbd/negprot.c: Tidyup of static initializers. smbd/server.c: Fix -l option. Jeremy.
This commit is contained in:
@ -57,7 +57,7 @@ LOCKDIR = @lockdir@
|
|||||||
CODEPAGEDIR = $(LIBDIR)/codepages
|
CODEPAGEDIR = $(LIBDIR)/codepages
|
||||||
|
|
||||||
# The current codepage definition list.
|
# The current codepage definition list.
|
||||||
CODEPAGELIST= 437 737 850 852 861 932 866 949 950 936 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI-R
|
CODEPAGELIST= 437 737 850 852 861 932 866 949 950 936 1251 ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 KOI-R
|
||||||
|
|
||||||
# where you are going to have the smbrun binary. This defaults to the
|
# where you are going to have the smbrun binary. This defaults to the
|
||||||
# install directory. This binary is needed for correct printing
|
# install directory. This binary is needed for correct printing
|
||||||
|
@ -198,7 +198,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <grp.h>
|
|
||||||
|
|
||||||
#ifdef HAVE_STDARG_H
|
#ifdef HAVE_STDARG_H
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
@ -124,7 +124,7 @@ static BOOL ct_initialized = False;
|
|||||||
#define isbasechar(C) ( (chartest[ ((C) & 0xff) ]) & BASECHAR_MASK )
|
#define isbasechar(C) ( (chartest[ ((C) & 0xff) ]) & BASECHAR_MASK )
|
||||||
#define isillegal(C) ( (chartest[ ((C) & 0xff) ]) & ILLEGAL_MASK )
|
#define isillegal(C) ( (chartest[ ((C) & 0xff) ]) & ILLEGAL_MASK )
|
||||||
|
|
||||||
static ubi_cacheRoot mangled_cache[1] = { { { 0 }, 0, 0, 0, 0, 0, 0} };
|
static ubi_cacheRoot mangled_cache[1] = { { { 0, 0, 0, 0 }, 0, 0, 0, 0, 0, 0 } };
|
||||||
static BOOL mc_initialized = False;
|
static BOOL mc_initialized = False;
|
||||||
#define MANGLED_CACHE_MAX_ENTRIES 0
|
#define MANGLED_CACHE_MAX_ENTRIES 0
|
||||||
#define MANGLED_CACHE_MAX_MEMORY 16384
|
#define MANGLED_CACHE_MAX_MEMORY 16384
|
||||||
|
@ -315,7 +315,7 @@ static struct {
|
|||||||
{"MICROSOFT NETWORKS 3.0", "LANMAN1", reply_lanman1, PROTOCOL_LANMAN1},
|
{"MICROSOFT NETWORKS 3.0", "LANMAN1", reply_lanman1, PROTOCOL_LANMAN1},
|
||||||
{"MICROSOFT NETWORKS 1.03", "COREPLUS", reply_coreplus, PROTOCOL_COREPLUS},
|
{"MICROSOFT NETWORKS 1.03", "COREPLUS", reply_coreplus, PROTOCOL_COREPLUS},
|
||||||
{"PC NETWORK PROGRAM 1.0", "CORE", reply_corep, PROTOCOL_CORE},
|
{"PC NETWORK PROGRAM 1.0", "CORE", reply_corep, PROTOCOL_CORE},
|
||||||
{NULL,NULL},
|
{NULL,NULL,NULL,0},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -504,6 +504,7 @@ static void usage(char *pname)
|
|||||||
extern BOOL append_log;
|
extern BOOL append_log;
|
||||||
/* shall I run as a daemon */
|
/* shall I run as a daemon */
|
||||||
BOOL is_daemon = False;
|
BOOL is_daemon = False;
|
||||||
|
BOOL specified_logfile = False;
|
||||||
int port = SMB_PORT;
|
int port = SMB_PORT;
|
||||||
int opt;
|
int opt;
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
@ -536,6 +537,7 @@ static void usage(char *pname)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'l':
|
case 'l':
|
||||||
|
specified_logfile = True;
|
||||||
pstrcpy(debugf,optarg);
|
pstrcpy(debugf,optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -597,7 +599,8 @@ static void usage(char *pname)
|
|||||||
|
|
||||||
TimeInit();
|
TimeInit();
|
||||||
|
|
||||||
pstrcpy(debugf,SMBLOGFILE);
|
if(!specified_logfile)
|
||||||
|
pstrcpy(debugf,SMBLOGFILE);
|
||||||
|
|
||||||
pstrcpy(remote_machine, "smb");
|
pstrcpy(remote_machine, "smb");
|
||||||
|
|
||||||
@ -714,10 +717,16 @@ static void usage(char *pname)
|
|||||||
pidfile_create("smbd");
|
pidfile_create("smbd");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!locking_init(0))
|
if (!open_sockets(is_daemon,port))
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
if (!open_sockets(is_daemon,port))
|
/*
|
||||||
|
* Note that this call should be done after the fork() call
|
||||||
|
* in open_sockets(), as some versions of the locking shared
|
||||||
|
* memory code register openers in a flat file.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!locking_init(0))
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
||||||
if(!initialize_password_db())
|
if(!initialize_password_db())
|
||||||
|
Reference in New Issue
Block a user