]> granicus.if.org Git - sudo/commitdiff
Remove -D debug_level option.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 5 Jan 2012 16:48:24 +0000 (11:48 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 5 Jan 2012 16:48:24 +0000 (11:48 -0500)
doc/sudo.pod
src/parse_args.c
src/sudo.c
src/sudo.h

index 092146046983b0fc07c9090067111f7740d363be..d11705b909fd882d89f77b631f34c081552f4e07 100644 (file)
@@ -26,24 +26,21 @@ sudo, sudoedit - execute a command as another user
 
 =head1 SYNOPSIS
 
-B<sudo> S<[B<-D> I<level>]> B<-h> | B<-K> | B<-k> | B<-V>
+B<sudo> B<-h> | B<-K> | B<-k> | B<-V>
 
 B<sudo> B<-v> [B<-AknS>]
 S<[B<-a> I<auth_type>]>
-S<[B<-D> I<level>]>
 S<[B<-g> I<group name>|I<#gid>]> S<[B<-p> I<prompt>]>
 S<[B<-u> I<user name>|I<#uid>]>
 
 B<sudo> B<-l[l]> [B<-AknS>]
 S<[B<-a> I<auth_type>]>
-S<[B<-D> I<level>]>
 S<[B<-g> I<group name>|I<#gid>]> S<[B<-p> I<prompt>]>
 S<[B<-U> I<user name>]> S<[B<-u> I<user name>|I<#uid>]> [I<command>]
 
 B<sudo> [B<-AbEHnPS>]
 S<[B<-a> I<auth_type>]>
 S<[B<-C> I<fd>]>
-S<[B<-D> I<level>]>
 S<[B<-c> I<class>|I<->]>
 S<[B<-g> I<group name>|I<#gid>]> S<[B<-p> I<prompt>]>
 S<[B<-r> I<role>]> S<[B<-t> I<type>]>
@@ -54,7 +51,6 @@ B<sudoedit> [B<-AnS>]
 S<[B<-a> I<auth_type>]>
 S<[B<-C> I<fd>]>
 S<[B<-c> I<class>|I<->]>
-S<[B<-D> I<level>]>
 S<[B<-g> I<group name>|I<#gid>]> S<[B<-p> I<prompt>]>
 S<[B<-u> I<user name>|I<#uid>]> file ...
 
@@ -158,11 +154,6 @@ argument specifies an existing user class, the command must be run
 as root, or the B<sudo> command must be run from a shell that is already
 root.  This option is only available on systems with BSD login classes.
 
-=item -D I<level>
-
-Enable debugging of B<sudo> plugins and B<sudo> itself.  The I<level>
-may be a value from 1 through 9.
-
 =item -E
 
 The B<-E> (I<preserve> I<environment>) option indicates to the
index 74a1d952d72cb9c689512f4670598245bc1e5f5c..7a746350fde2ca7e839ff6eeda4c9aa2233db0ae 100644 (file)
@@ -74,43 +74,41 @@ static struct sudo_settings {
     { "login_class" },
 #define ARG_DEBUG_FLAGS 2
     { "debug_flags" },
-#define ARG_DEBUG_LEVEL 3
-    { "debug_level" },
-#define ARG_PRESERVE_ENVIRONMENT 4
+#define ARG_PRESERVE_ENVIRONMENT 3
     { "preserve_environment" },
-#define ARG_RUNAS_GROUP 5
+#define ARG_RUNAS_GROUP 4
     { "runas_group" },
-#define ARG_SET_HOME 6
+#define ARG_SET_HOME 5
     { "set_home" },
-#define ARG_USER_SHELL 7
+#define ARG_USER_SHELL 6
     { "run_shell" },
-#define ARG_LOGIN_SHELL 8
+#define ARG_LOGIN_SHELL 7
     { "login_shell" },
-#define ARG_IGNORE_TICKET 9
+#define ARG_IGNORE_TICKET 8
     { "ignore_ticket" },
-#define ARG_PROMPT 10
+#define ARG_PROMPT 9
     { "prompt" },
-#define ARG_SELINUX_ROLE 11
+#define ARG_SELINUX_ROLE 10
     { "selinux_role" },
-#define ARG_SELINUX_TYPE 12
+#define ARG_SELINUX_TYPE 11
     { "selinux_type" },
-#define ARG_RUNAS_USER 13
+#define ARG_RUNAS_USER 12
     { "runas_user" },
-#define ARG_PROGNAME 14
+#define ARG_PROGNAME 13
     { "progname" },
-#define ARG_IMPLIED_SHELL 15
+#define ARG_IMPLIED_SHELL 14
     { "implied_shell" },
-#define ARG_PRESERVE_GROUPS 16
+#define ARG_PRESERVE_GROUPS 15
     { "preserve_groups" },
-#define ARG_NONINTERACTIVE 17
+#define ARG_NONINTERACTIVE 16
     { "noninteractive" },
-#define ARG_SUDOEDIT 18
+#define ARG_SUDOEDIT 17
     { "sudoedit" },
-#define ARG_CLOSEFROM 19
+#define ARG_CLOSEFROM 18
     { "closefrom" },
-#define ARG_NET_ADDRS 20
+#define ARG_NET_ADDRS 19
     { "network_addrs" },
-#define NUM_SETTINGS 21
+#define NUM_SETTINGS 20
     { NULL }
 };
 
@@ -197,11 +195,7 @@ parse_args(int argc, char **argv, int *nargc, char ***nargv, char ***settingsp,
                    break;
 #endif
                case 'D':
-                   if ((debug_level = atoi(optarg)) < 1 || debug_level > 9) {
-                       warningx(_("the argument to -D must be between 1 and 9 inclusive"));
-                       usage(1);
-                   }
-                   sudo_settings[ARG_DEBUG_LEVEL].value = optarg;
+                   /* Ignored for backwards compatibility. */
                    break;
                case 'E':
                    sudo_settings[ARG_PRESERVE_ENVIRONMENT].value = "true";
index 0cc8f8c3c2cf4933a8929a1e3aa3e85b40a3416e..091c61c24d055f3c65903dc0ea4686a47dd72ff9 100644 (file)
@@ -102,7 +102,6 @@ struct plugin_container policy_plugin;
 struct plugin_container_list io_plugins;
 struct user_details user_details;
 const char *list_user, *runas_user, *runas_group; /* extern for parse_args.c */
-int debug_level;
 static int sudo_mode;
 
 /*
index 5972d57451a4ffe036542c9b493c2cc981fd59eb..5a4f0b98c9fe1a4073a4f3789d21c35abd4b36d4 100644 (file)
@@ -201,7 +201,6 @@ void get_ttysize(int *rowp, int *colp);
 /* sudo.c */
 bool exec_setup(struct command_details *details, const char *ptyname, int ptyfd);
 int run_command(struct command_details *details);
-extern int debug_level;
 extern const char *list_user, *runas_user, *runas_group;
 extern struct user_details user_details;