more fixes from the IRIX compiler (thanks herb!)
authorAndrew Tridgell <tridge@samba.org>
Fri, 15 Aug 2003 18:33:43 +0000 (18:33 +0000)
committerAndrew Tridgell <tridge@samba.org>
Fri, 15 Aug 2003 18:33:43 +0000 (18:33 +0000)
(This used to be commit 4cf3839b727c77a727abb558bd9473119a092913)

41 files changed:
source4/client/client.c
source4/client/smbmount.c
source4/client/smbspool.c
source4/libcli/clifile.c
source4/libcli/clilist.c
source4/libcli/raw/clitree.c
source4/libcli/raw/rawfileinfo.c
source4/libcli/raw/rawnegotiate.c
source4/nmbd/nmbd.c
source4/nsswitch/winbindd.c
source4/nsswitch/wins.c
source4/pam_smbpass/pam_smb_acct.c
source4/pam_smbpass/pam_smb_auth.c
source4/pam_smbpass/pam_smb_passwd.c
source4/python/py_common.c
source4/python/py_lsa.c
source4/python/py_samr.c
source4/python/py_smb.c
source4/smbd/server.c
source4/smbwrapper/smbw.c
source4/torture/gentest.c
source4/torture/locktest.c
source4/torture/locktest2.c
source4/torture/masktest.c
source4/torture/msgtest.c
source4/torture/rpctorture.c
source4/torture/torture.c
source4/utils/nmblookup.c
source4/utils/pdbedit.c
source4/utils/rpccheck.c
source4/utils/smbcacls.c
source4/utils/smbcontrol.c
source4/utils/smbfilter.c
source4/utils/smbgroupedit.c
source4/utils/smbpasswd.c
source4/utils/smbtree.c
source4/utils/status.c
source4/utils/testparm.c
source4/utils/testprns.c
source4/web/swat.c
source4/wrepld/server.c

index 7f0577483602879b6861ccb3a78bde1dca262e6f..e418f3b456ac00400d2b0ccce71e1e48bc900c7e 100644 (file)
@@ -2896,7 +2896,7 @@ static void remember_query_host(const char *arg,
        *query_host = 0;
        *base_directory = 0;
 
-       setup_logging(argv[0],True);
+       setup_logging(argv[0],DEBUG_STDOUT);
        mem_ctx = talloc_init("client.c/main");
        if (!mem_ctx) {
                d_printf("\nclient.c: Not enough memory\n");
index da340144fc2e4f96ac1142efc7660d58273ce96f..ac1a742ab7293310645a5493b961381f3d6fe41c 100644 (file)
@@ -396,7 +396,7 @@ static void send_fs_socket(char *the_service, char *mount_point, struct cli_stat
 
                        /* here we are no longer interactive */
                        set_remote_machine_name("smbmount");    /* sneaky ... */
-                       setup_logging("mount.smbfs", False);
+                       setup_logging("mount.smbfs", DEBUG_STDERR);
                        reopen_logs();
                        DEBUG(0, ("mount.smbfs: entering daemon mode for service %s, pid=%d\n", the_service, sys_getpid()));
 
@@ -857,7 +857,7 @@ static void parse_mount_smb(int argc, char **argv)
        DEBUGLEVEL = 1;
 
        /* here we are interactive, even if run from autofs */
-       setup_logging("mount.smbfs",True);
+       setup_logging("mount.smbfs",DEBUG_STDERR);
 
 #if 0 /* JRA - Urban says not needed ? */
        /* CLI_FORCE_ASCII=false makes smbmount negotiate unicode. The default
index 43046bbad7599aa063da374950b50643506f149f..24d40114f0b6a38230affc19c7e8d86ffb9b1254 100644 (file)
@@ -182,7 +182,7 @@ static int          smb_print(struct cli_state *, char *, FILE *);
   * Setup the SAMBA server state...
   */
 
-  setup_logging("smbspool", True);
+  setup_logging("smbspool", DEBUG_STDOUT);
 
   in_client = True;   /* Make sure that we tell lp_load we are */
 
index d37a68c1e15a76ca34a5f6dccd7dba88ce8f2199..27ead407400a646afd55633c0929b200f65542a9 100644 (file)
@@ -34,11 +34,11 @@ static BOOL cli_link_internal(struct cli_state *cli,
        NTSTATUS status;
 
        if (hard_link) {
-               parms.generic.level = SMB_SFILEINFO_UNIX_HLINK;
+               parms.generic.level = RAW_SFILEINFO_UNIX_HLINK;
                parms.unix_hlink.file.fname = fname_src;
                parms.unix_hlink.in.link_dest = fname_dst;
        } else {
-               parms.generic.level = SMB_SFILEINFO_UNIX_LINK;
+               parms.generic.level = RAW_SFILEINFO_UNIX_LINK;
                parms.unix_link.file.fname = fname_src;
                parms.unix_link.in.link_dest = fname_dst;
        }
index 620e4382f48c5c5f888fba1a6b077f8d6d3d9834..425a6002ccae685e7874b744fec36a43ee6baeb8 100644 (file)
@@ -94,7 +94,7 @@ int cli_list_new(struct cli_state *cli, const char *Mask, uint16 attribute,
        char *mask;
        int ff_eos = 0, i, ff_searchcount;
        int ff_dir_handle=0;
-       int level;
+       enum search_level level;
 
        /* initialize state for search */
        state.dirlist = NULL;
index a088ae7023c83afb759053d79893efefedd33c41..1e9104308e0c2a3cb5eb229241545cb2d02c4fdb 100644 (file)
@@ -121,7 +121,6 @@ NTSTATUS smb_tree_connect_recv(struct cli_request *req, TALLOC_CTX *mem_ctx, uni
 
        case RAW_TCON_TCONX:
                ZERO_STRUCT(parms->tconx.out);
-               CLI_CHECK_MIN_WCT(req, 0);  /* this depends on the protocol level */
                parms->tconx.out.cnum = SVAL(req->in.hdr, HDR_TID);
                if (req->in.wct >= 4) {
                        parms->tconx.out.options = SVAL(req->in.vwv, VWV(3));
@@ -245,7 +244,6 @@ NTSTATUS cli_tree_full_connection(struct cli_tree **ret_tree,
 
        mem_ctx = talloc_init("tcon");
        if (!mem_ctx) {
-               cli_tree_close(tree);
                return NT_STATUS_NO_MEMORY;
        }
 
index 70121025d02f80f367e53477b464c52851c1a6aa..41fe1225cce474ae515161519b7a5275b712ccdb 100644 (file)
@@ -146,7 +146,6 @@ static NTSTATUS smb_raw_info_backend(struct cli_session *session,
 
        case RAW_FILEINFO_STREAM_INFO:
        case RAW_FILEINFO_STREAM_INFORMATION:
-               FINFO_CHECK_MIN_SIZE(0);
                ofs = 0;
                parms->stream_info.out.num_streams = 0;
                parms->stream_info.out.streams = NULL;
@@ -228,7 +227,6 @@ static NTSTATUS smb_raw_info_backend(struct cli_session *session,
                return NT_STATUS_OK;
 
        case RAW_FILEINFO_UNIX_LINK:
-               FINFO_CHECK_MIN_SIZE(0);
                cli_blob_pull_string(session, mem_ctx, blob, 
                                     &parms->unix_link_info.out.link_dest, 0, 4, STR_UNICODE);
                return NT_STATUS_OK;
index 78b2e007069dd5872becc54acd49a742c7fc7a14..04941f6118f891e58628ed9be44b3a2d685102ac 100644 (file)
@@ -22,7 +22,7 @@
 #include "includes.h"
 
 static const struct {
-       int prot;
+       enum protocol_types prot;
        const char *name;
 } prots[] = {
        {PROTOCOL_CORE,"PC NETWORK PROGRAM 1.0"},
index 2b7d8033a2a8a7e8300fadd78b4cf066419e4dc9..166e84bfbe905f79277c030f31bad1cbc68dcae2 100644 (file)
@@ -658,7 +658,7 @@ static BOOL open_sockets(BOOL isdaemon, int port)
     exit(1);
   }
 
-  setup_logging( argv[0], log_stdout );
+  setup_logging( argv[0], log_stdout?DEBUG_STDOUT : DEBUG_FILE );
 
   reopen_logs();
 
index ad37768c09097f36a32c2df1bea0012ab17175ba..23394f5e8cea5a9372eb4d054b799d7cbde1d68a 100644 (file)
@@ -892,7 +892,7 @@ static void usage(void)
 
        snprintf(logfile, sizeof(logfile), "%s/log.winbindd", dyn_LOGFILEBASE);
        lp_set_logfile(logfile);
-       setup_logging("winbindd", log_stdout);
+       setup_logging("winbindd", log_stdout?DEBUG_STDOUT:DEBUG_FILE);
        reopen_logs();
 
        DEBUG(1, ("winbindd version %s started.\n", VERSION ) );
index 187748d285b52176be020ccbbfa39dc54c7cde6d..d5791d7af50eb681e65b6e574fece1ea41e4bf05 100644 (file)
@@ -79,7 +79,7 @@ static void nss_wins_init(void)
        AllowDebugChange = False;
 
        TimeInit();
-       setup_logging("nss_wins",False);
+       setup_logging("nss_wins",DEBUG_FILE);
        lp_load(dyn_CONFIGFILE,True,False,False);
        load_interfaces();
 }
index 0803ef82a23c6b432a88bc557c5f7be16afa5131..aa3386d517244598e4631966e51ff5a92d235df0 100644 (file)
@@ -51,7 +51,7 @@ int pam_sm_acct_mgmt( pam_handle_t *pamh, int flags,
     extern BOOL in_client;
 
     /* Samba initialization. */
-    setup_logging( "pam_smbpass", False );
+    setup_logging( "pam_smbpass", DEBUG_FILE);
     in_client = True;
 
     ctrl = set_ctrl( flags, argc, argv );
index e5cc12e2f6d40bc4a095ca5ef2ee13b22dcf3139..fa38ba042c0648d58fb02d9752bd73fc88d8f8cd 100644 (file)
@@ -72,7 +72,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
 
 
     /* Samba initialization. */
-    setup_logging("pam_smbpass",False);
+    setup_logging("pam_smbpass",DEBUG_FILE);
     in_client = True;
 
     ctrl = set_ctrl(flags, argc, argv);
index 91eae3c7a1960712a8810a5e9b5394a6de47af5b..5e6d6060a4e01dee1930f77dca286e0b750e21d3 100644 (file)
@@ -99,7 +99,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
     NTSTATUS nt_status;
 
     /* Samba initialization. */
-    setup_logging( "pam_smbpass", False );
+    setup_logging( "pam_smbpass", DEBUG_FILE );
     in_client = True;
 
     ctrl = set_ctrl(flags, argc, argv);
index ea092d93703b48419e6b2f866c4b591e0a58676c..d42b54e533c06c8d5f82984e783914b6ca96ef72 100644 (file)
@@ -104,11 +104,11 @@ PyObject *py_setup_logging(PyObject *self, PyObject *args, PyObject *kw)
        }
 
        if (interactive)
-               setup_logging("spoolss", True);
+               setup_logging("spoolss", DEBUG_STDOUT);
 
        if (logfilename) {
                lp_set_logfile(logfilename);
-               setup_logging(logfilename, False);
+               setup_logging(logfilename, DEBUG_FILE );
                reopen_logs();
        }
 
index 22db29665a0085ccc8d3a31bf21c72c2919612a8..2ea7be3645fb8366e25599b5b65de408de881205 100644 (file)
@@ -463,6 +463,6 @@ void initlsa(void)
 
        py_samba_init();
 
-       setup_logging("lsa", True);
+       setup_logging("lsa", DEBUG_STDOUT);
        DEBUGLEVEL = 10;
 }
index 182671d04783c2ad62a3ce2d14da308628a5d364..39cfb3e60cc4c0a571680efed5e69501431482d1 100644 (file)
@@ -492,6 +492,6 @@ void initsamr(void)
 
        py_samba_init();
 
-       setup_logging("samr", True);
+       setup_logging("samr", DEBUG_STDOUT);
        DEBUGLEVEL = 10;
 }
index 3f05b5d7c6c0abbc5d5b70720fa372d69c71848f..52de768558897bed6b17e3e252014cec0b2774d2 100644 (file)
@@ -394,6 +394,6 @@ void initsmb(void)
 
        py_samba_init();
 
-       setup_logging("smb", True);
+       setup_logging("smb", DEBUG_STDOUT);
        DEBUGLEVEL = 10;
 }
index e33a13e75db9ea7d29ab06b61098e4f48a2dbf9c..ae1566b5ace82aa6afc97af062e703f699e3a03b 100644 (file)
@@ -259,7 +259,7 @@ static void setup_process_model(struct event_context *events,
                DEBUG(0,("ERROR: Can't log to stdout (-S) unless daemon is in foreground (-F) or interactive (-i)\n"));
                exit(1);
        }
-       setup_logging(argv[0], log_stdout);
+       setup_logging(argv[0], log_stdout?DEBUG_STDOUT:DEBUG_FILE);
 
        fault_setup((void (*)(void *))exit_server);
        
index fbc69b2371f3b3c3362c4756cae784d186dc7e54..c62533dc2a5d50e273c6270ba46f227437ffcc04 100644 (file)
@@ -55,7 +55,7 @@ void smbw_init(void)
        smbw_busy++;
 
        DEBUGLEVEL = 0;
-       setup_logging("smbsh",True);
+       setup_logging("smbsh", DEBUG_STDOUT);
 
        dbf = x_stderr;
 
index 4711ea91ae1646fab3103dc857a9eb4c0bb932c8..e914f98588680f7f4bb8afb5debe5da4d2a6e5d1 100644 (file)
@@ -2113,7 +2113,7 @@ static void usage(void)
                exit(1);
        }
 
-       setup_logging(argv[0],True);
+       setup_logging(argv[0], DEBUG_STDOUT);
 
        for (i=0;i<NSERVERS;i++) {
                const char *share = argv[1+i];
@@ -2147,7 +2147,7 @@ static void usage(void)
                        break;
                case 'd':
                        DEBUGLEVEL = atoi(optarg);
-                       setup_logging(NULL,True);
+                       setup_logging(NULL, DEBUG_STDOUT);
                        break;
                case 's':
                        options.seed = atoi(optarg);
index 26bf6d62ddca26af3ad0a9d0a5c3aa0704490687..cd66bab58ef04723793c05b1c9c2fbba8f8f2121 100644 (file)
@@ -465,7 +465,7 @@ static void usage(void)
                exit(1);
        }
 
-       setup_logging(argv[0],True);
+       setup_logging(argv[0], DEBUG_STDOUT);
 
        for (server=0;server<NSERVERS;server++) {
                share[server] = argv[1+server];
index 17435afb4cfb74c52b022bef34f745e7b6cef10d..ac48da58b98565d22ce55be972e824fbfceb10fd 100644 (file)
@@ -493,7 +493,7 @@ static void usage(void)
        all_string_sub(share1,"/","\\",0);
        all_string_sub(share2,"/","\\",0);
 
-       setup_logging(argv[0],True);
+       setup_logging(argv[0], DEBUG_STDOUT);
 
        argc -= 4;
        argv += 4;
index 15bc0808936e0b28c1d16ffa0d94549b5a058edf..f8d19697cb0e8e6b1f0a61278dc01b95c0c9e630 100644 (file)
@@ -380,7 +380,7 @@ static void usage(void)
 
        all_string_sub(share,"/","\\",0);
 
-       setup_logging(argv[0],True);
+       setup_logging(argv[0], DEBUG_STDOUT);
 
        argc -= 1;
        argv += 1;
index 952aa46bfecf3f5189fdc2ef36a2c94f56b811ac..fa21aa307cac3aeb3a56edd597a98f3a386af0d7 100644 (file)
@@ -39,7 +39,7 @@ void pong_message(int msg_type, pid_t src, void *buf, size_t len)
        int i, n;
        char buf[12];
 
-       setup_logging(argv[0],True);
+       setup_logging(argv[0], DEBUG_STDOUT);
        
        lp_load(dyn_CONFIGFILE,False,False,False);
 
index 04656e71d167b9fe821039bb30a000f285d5d749..284943c61215927863728aa118511e0fbb44125e 100644 (file)
@@ -282,7 +282,7 @@ enum client_action
 
        smb_cli->nt_pipe_fnum   = 0xffff;
 
-       setup_logging(pname, True);
+       setup_logging(pname, DEBUG_STDOUT);
 
        password[0] = 0;
 
index bf46c888b2ee9db8f3796ca32bee7da62b9c4f49..1ec73e0dff68aa7dd56e52929a8906e8945dde4a 100644 (file)
@@ -4113,7 +4113,7 @@ static void usage(void)
                        break;
                case 'd':
                        lp_set_cmdline("debug level", optarg);
-                       setup_logging(NULL,True);
+                       setup_logging(NULL, DEBUG_STDOUT);
                        break;
                case 'O':
                        lp_set_cmdline("socket options", optarg);
index 143d2ddd12bb0ce82246fa09e3a292723a4bd1ec..a2ec19d74d3117af6c04706b0d7874acbfec7526 100644 (file)
@@ -222,7 +222,7 @@ int main(int argc,char *argv[])
 
   *lookup = 0;
 
-  setup_logging(argv[0],True);
+  setup_logging(argv[0], DEBUG_STDOUT);
 
   while ((opt = getopt(argc, argv, "d:fB:U:i:s:SMrhART")) != EOF)
     switch (opt)
index cec3e706872a89a23f7a2fb0d0e5e4dcc1f25faf..15e0b50fa9a57d4b0f387013dcac8aa956e8d241 100644 (file)
@@ -513,7 +513,7 @@ int main (int argc, char **argv)
                {0,0,0,0}
        };
        
-       setup_logging("pdbedit", True);
+       setup_logging("pdbedit", DEBUG_STDOUT);
        
        pc = poptGetContext(NULL, argc, (const char **) argv, long_options,
                            POPT_CONTEXT_KEEP_FIRST);
index ae109f69b65c36e5bab997dae8c9c1b2bcd0fcef..dd357794fe672fd4afe2cfaa1fdfcea5a4c98579 100644 (file)
@@ -35,7 +35,7 @@ main()
        
        ZERO_STRUCT(rpc_stub);
 
-       setup_logging("", True);
+       setup_logging("", DEBUG_STDOUT);
        DEBUGLEVEL=10;
 
        ctx=talloc_init("main");
index 4c85ea58c21c8585a34683b63063d6ba0962c954..41dc24f846b75131afc6db851c5b82887150a3b1 100644 (file)
@@ -789,7 +789,7 @@ You can string acls together with spaces, commas or newlines\n\
                exit(EXIT_PARSE_ERROR);
        }
 
-       setup_logging(argv[0],True);
+       setup_logging(argv[0], DEBUG_STDOUT);
 
        share = argv[1];
        pstrcpy(filename, argv[2]);
index 0861eb5c5ae2007cb11a8403730f0b2d722bc8d2..d715163ebb16c83e6967cbab8f635ff7099a147c 100644 (file)
@@ -656,7 +656,7 @@ static BOOL do_command(char *dest, char *msg_name, int iparams, char **params)
        AllowDebugChange = False;
        DEBUGLEVEL = 0;
 
-       setup_logging(argv[0],True);
+       setup_logging(argv[0], DEBUG_STDOUT);
        
        if (argc < 2) usage(True);
 
index 1a0d639f0254efdbef8a1476b5d1eec7e943c3c3..9f240c31cae7cbb04db408f3c5583b8b54d27880 100644 (file)
@@ -222,7 +222,7 @@ int main(int argc, char *argv[])
        char *desthost;
        pstring configfile;
 
-       setup_logging(argv[0],True);
+       setup_logging(argv[0], DEBUG_STDOUT);
   
        pstrcpy(configfile,dyn_CONFIGFILE);
  
index 69f69aea5d444876a25123fdc1e439864a2fb5b5..edbee6cef20d1aa380e8935f88ec2afa93112c01 100644 (file)
@@ -271,7 +271,7 @@ int main (int argc, char **argv)
        enum SID_NAME_USE sid_type;
        uint32 rid = -1;
 
-       setup_logging("groupedit", True);
+       setup_logging("groupedit", DEBUG_STDOUT);
 
        if (argc < 2) {
                usage();
index 577e467fbdbe71717a2fb8455b86073c18f8d2cc..743023afd70fc133de61b21e17019b53a903efdd 100644 (file)
@@ -580,7 +580,7 @@ int main(int argc, char **argv)
 
        local_flags = process_options(argc, argv, local_flags);
 
-       setup_logging("smbpasswd", True);
+       setup_logging("smbpasswd", DEBUG_STDOUT);
        
        /*
         * Set the machine NETBIOS name if not already
index ff6120ee907c225e093f51d94fe24d6e9bc68068..eeb7b318cbb5c9313c3eeed5e8558ca03a84758b 100644 (file)
@@ -281,7 +281,7 @@ static BOOL print_tree(struct user_auth_info *user_info)
 
        dbf = x_stderr;
 
-       setup_logging(argv[0],True);
+       setup_logging(argv[0], DEBUG_STDOUT);
 
        lp_load(dyn_CONFIGFILE,True,False,False);
        load_interfaces();
index 76b925364662c6f9164214dc1df3dfec79a031b1..c28b0a41fd0cac74f0ed50ba9383cc4e8d42f1a7 100644 (file)
@@ -567,7 +567,7 @@ static int traverse_sessionid(TDB_CONTEXT *tdb, TDB_DATA kbuf, TDB_DATA dbuf, vo
                POPT_TABLEEND
        };
 
-       setup_logging(argv[0],True);
+       setup_logging(argv[0], DEBUG_STDOUT);
        
        dbf = x_stderr;
        
index b68deaaa5de12f11e6e0638f5a35f56081a6ce0b..fdfb6cb426c7db5e96dd92750f29dc0fed4694ec 100644 (file)
@@ -218,7 +218,7 @@ int main(int argc, const char *argv[])
 
        while((opt = poptGetNextOpt(pc)) != -1);
 
-       setup_logging(poptGetArg(pc), True);
+       setup_logging(poptGetArg(pc), DEBUG_STDOUT);
 
        if (poptPeekArg(pc)) 
                config_file = poptGetArg(pc);
index 7e52b86afb6979bd731ebc177d98fbca1e9767c0..07c4498038832d8b9feaaa49dea14acd285ebcbc 100644 (file)
@@ -36,7 +36,7 @@ int main(int argc, char *argv[])
 {
    const char *pszTemp;
 
-   setup_logging(argv[0],True);
+   setup_logging(argv[0], DEBUG_STDOUT);
 
    if (argc < 2 || argc > 3)
       printf("Usage: testprns printername [printcapfile]\n");
index db48cbbb5478269049a2685dda30f1404a4e3c5e..9e915433171f82f09f6faea38bf5b805a3fa813e 100644 (file)
@@ -1286,7 +1286,7 @@ static void printers_page(void)
                }
        }
 
-       setup_logging(argv[0],False);
+       setup_logging(argv[0],DEBUG_FILE);
        load_config(True);
        iNumNonAutoPrintServices = lp_numservices();
        load_printers();
index afeec3402b47d4d2c73a1dfc8ea32e57a1bad6cf..f49596dc41df718ea9f2b534dfaff2bd6cb268a1 100644 (file)
@@ -619,7 +619,7 @@ static void process(void)
 
        set_remote_machine_name("wrepld");
 
-       setup_logging(argv[0],log_stdout);
+       setup_logging(argv[0],log_stdout?DEBUG_STDOUT:DEBUG_FILE);
 
        /* we want to re-seed early to prevent time delays causing
            client problems at a later date. (tridge) */