fix startup of smbd, nmbd, winbindd
authorStefan Metzmacher <metze@samba.org>
Fri, 19 Oct 2007 08:34:06 +0000 (10:34 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 19 Oct 2007 08:34:06 +0000 (10:34 +0200)
jra: POPT_ARG_VAL arguments need int values.
     I assume there're more places like this
     in the cmdline tools.

     Please fix this properly, as my commit is just
     a hack to get make test working again.

in samba4 we have a workaround for this see
smbd/server.c

metze

source/nmbd/nmbd.c
source/smbd/server.c
source/winbindd/winbindd.c

index 46808f51ded7365d7a0676e3d2f78f9856101023..510e676e33a03dc0326c531cbe2e5991d6d0c74b 100644 (file)
@@ -31,15 +31,6 @@ extern bool global_in_nmbd;
 
 extern bool override_logfile;
 
-/* are we running as a daemon ? */
-static bool is_daemon;
-
-/* fork or run in foreground ? */
-static bool Fork = True;
-
-/* log to standard output ? */
-static bool log_stdout;
-
 /* have we found LanMan clients yet? */
 bool found_lm_clients = False;
 
@@ -692,11 +683,14 @@ static bool open_sockets(bool isdaemon, int port)
  **************************************************************************** */
  int main(int argc, const char *argv[])
 {
+       static int is_daemon;
+       static int Fork = True;
+       static int log_stdout;
        pstring logfile;
-       static bool opt_interactive;
+       static int opt_interactive;
        poptContext pc;
        static char *p_lmhosts = dyn_LMHOSTSFILE;
-       static bool no_process_group = False;
+       static int no_process_group = False;
        int opt;
        struct poptOption long_options[] = {
        POPT_AUTOHELP
index 05bb3504c76805e4a81b0e662af7981903b4ced5..1ae2c71ddd10679cac8d67ffc270e7e9e55c01c5 100644 (file)
@@ -882,11 +882,11 @@ extern void build_options(bool screen);
  int main(int argc,const char *argv[])
 {
        /* shall I run as a daemon */
-       static bool is_daemon = False;
-       static bool interactive = False;
-       static bool Fork = True;
-       static bool no_process_group = False;
-       static bool log_stdout = False;
+       static int is_daemon = False;
+       static int interactive = False;
+       static int Fork = True;
+       static int no_process_group = False;
+       static int log_stdout = False;
        static char *ports = NULL;
        static char *profile_level = NULL;
        int opt;
index 97bbe063baad31d54bfe3a71fab934e0569639ac..057790a541b2fe73aff953761a57b0987998c76a 100644 (file)
@@ -984,10 +984,10 @@ static void process_loop(void)
 int main(int argc, char **argv, char **envp)
 {
        pstring logfile;
-       static bool is_daemon = False;
-       static bool Fork = True;
-       static bool log_stdout = False;
-       static bool no_process_group = False;
+       static int is_daemon = False;
+       static int Fork = True;
+       static int log_stdout = False;
+       static int no_process_group = False;
        struct poptOption long_options[] = {
                POPT_AUTOHELP
                { "stdout", 'S', POPT_ARG_VAL, &log_stdout, True, "Log to stdout" },