fix compile error
authorHerb Lewis <herb@samba.org>
Fri, 26 Apr 2002 16:16:14 +0000 (16:16 +0000)
committerHerb Lewis <herb@samba.org>
Fri, 26 Apr 2002 16:16:14 +0000 (16:16 +0000)
source/utils/pdbedit.c

index 2cbc9eb71dfbc64ccf5b9874aa40c30cac50fb1e..bf52d08989099fc941d446068fad63804f5ec756 100644 (file)
@@ -411,6 +411,7 @@ int main (int argc, char **argv)
        static char *backend_out = NULL;
        static char *logon_script = NULL;
        static char *profile_path = NULL;
+       static int new_debuglevel = -1;
 
        struct pdb_context *in;
        poptContext pc;
@@ -430,7 +431,7 @@ int main (int argc, char **argv)
                {"delete",      'x',POPT_ARG_VAL,&delete_user,1,"delete user",NULL},
                {"import",      'i',POPT_ARG_STRING,&backend_in,0,"use different passdb backend",NULL},
                {"export",      'e',POPT_ARG_STRING,&backend_out,0,"export user accounts to backend", NULL},
-               {"debuglevel",'D',POPT_ARG_INT,&DEBUGLEVEL,0,"set debuglevel",NULL},
+               {"debuglevel",'D',POPT_ARG_INT,&new_debuglevel,0,"set debuglevel",NULL},
                {0,0,0,0}
        };
 
@@ -451,6 +452,10 @@ int main (int argc, char **argv)
 
        while((opt = poptGetNextOpt(pc)) != -1);
 
+       if (new_debuglevel != -1) {
+               DEBUGLEVEL = new_debuglevel;
+       }
+
        setparms = (full_name || home_dir || home_drive || logon_script || profile_path);
 
        if (((add_user?1:0) + (delete_user?1:0) + (list_users?1:0) + (import?1:0) + (setparms?1:0)) + (backend_out?1:0) > 1) {