summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-01-08 02:16:15 +0000
committerJeremy Allison <jra@samba.org>2000-01-08 02:16:15 +0000
commitfab3e0eb08ce3f479131eaea040f3d9215caa038 (patch)
treeeac369cac554ad8a61ba6cede0a2bb4234775f55 /source3/smbd
parentfaa302c7688eeb03f543d6dac817b5a80753a9f5 (diff)
downloadsamba-fab3e0eb08ce3f479131eaea040f3d9215caa038.tar.gz
samba-fab3e0eb08ce3f479131eaea040f3d9215caa038.tar.bz2
samba-fab3e0eb08ce3f479131eaea040f3d9215caa038.zip
smbd/mangle.c
smbd/negprot.c: Tidyup of static initializers. smbd/server.c: Fix -l option. Jeremy. (This used to be commit d120f22fefde21b38e43ea5ad0180bf27304d2eb)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/mangle.c2
-rw-r--r--source3/smbd/negprot.c2
-rw-r--r--source3/smbd/server.c15
3 files changed, 14 insertions, 5 deletions
diff --git a/source3/smbd/mangle.c b/source3/smbd/mangle.c
index 48e16e5332..4c306ad00f 100644
--- a/source3/smbd/mangle.c
+++ b/source3/smbd/mangle.c
@@ -124,7 +124,7 @@ static BOOL ct_initialized = False;
#define isbasechar(C) ( (chartest[ ((C) & 0xff) ]) & BASECHAR_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;
#define MANGLED_CACHE_MAX_ENTRIES 0
#define MANGLED_CACHE_MAX_MEMORY 16384
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index b2366b0a37..3cabc6b229 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -315,7 +315,7 @@ static struct {
{"MICROSOFT NETWORKS 3.0", "LANMAN1", reply_lanman1, PROTOCOL_LANMAN1},
{"MICROSOFT NETWORKS 1.03", "COREPLUS", reply_coreplus, PROTOCOL_COREPLUS},
{"PC NETWORK PROGRAM 1.0", "CORE", reply_corep, PROTOCOL_CORE},
- {NULL,NULL},
+ {NULL,NULL,NULL,0},
};
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 79d37e5093..bd07ed8458 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -504,6 +504,7 @@ static void usage(char *pname)
extern BOOL append_log;
/* shall I run as a daemon */
BOOL is_daemon = False;
+ BOOL specified_logfile = False;
int port = SMB_PORT;
int opt;
extern char *optarg;
@@ -536,6 +537,7 @@ static void usage(char *pname)
break;
case 'l':
+ specified_logfile = True;
pstrcpy(debugf,optarg);
break;
@@ -597,7 +599,8 @@ static void usage(char *pname)
TimeInit();
- pstrcpy(debugf,SMBLOGFILE);
+ if(!specified_logfile)
+ pstrcpy(debugf,SMBLOGFILE);
pstrcpy(remote_machine, "smb");
@@ -714,10 +717,16 @@ static void usage(char *pname)
pidfile_create("smbd");
}
- if (!locking_init(0))
+ if (!open_sockets(is_daemon,port))
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);
if(!initialize_password_db())