]> granicus.if.org Git - sudo/commitdiff
Do not shadow global sudo_mode with a local variable in set_cmnd()
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 18 Jul 2011 20:23:38 +0000 (16:23 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 18 Jul 2011 20:23:38 +0000 (16:23 -0400)
plugins/sudoers/sudoers.c

index edd2bd51cb0567947134c685365e0728765ae136..b8beeae8a9586b06c7a1f622b84307cdcc783690 100644 (file)
@@ -90,7 +90,7 @@
  * Prototypes
  */
 static void init_vars(char * const *);
-static int set_cmnd(int);
+static int set_cmnd(void);
 static void set_loginclass(struct passwd *);
 static void set_runasgr(char *);
 static void set_runaspw(char *);
@@ -351,7 +351,7 @@ sudoers_policy_main(int argc, char * const argv[], int pwflag, char *env_add[],
        def_preserve_groups = TRUE;
 
     /* Find command in path */
-    cmnd_status = set_cmnd(sudo_mode);
+    cmnd_status = set_cmnd();
     if (cmnd_status == -1) {
        rval = -1;
        goto done;
@@ -833,7 +833,7 @@ init_vars(char * const envp[])
  * and apply any command-specific defaults entries.
  */
 static int
-set_cmnd(int sudo_mode)
+set_cmnd(void)
 {
     int rval;
     char *path = user_path;