From 8b48ab71e433ee8e90ec85e08b69395de01634e0 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" <Todd.Miller@courtesan.com> Date: Wed, 9 Dec 2009 16:19:30 +0000 Subject: [PATCH] Allow the -u flag to be used in conjunction with the -v flag as per older versions of sudo. --- sudo.c | 2 +- sudo.pod | 3 ++- sudo_usage.h.in | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sudo.c b/sudo.c index d03a5635f..c98741634 100644 --- a/sudo.c +++ b/sudo.c @@ -1083,7 +1083,7 @@ parse_args(argc, argv) usage(1); } if ((runas_user != NULL || runas_group != NULL) && - !ISSET(mode, MODE_EDIT | MODE_RUN | MODE_CHECK)) { + !ISSET(mode, MODE_EDIT | MODE_RUN | MODE_CHECK | MODE_VALIDATE)) { usage(1); } if (list_pw != NULL && mode != MODE_LIST && mode != MODE_CHECK) { diff --git a/sudo.pod b/sudo.pod index 41e1ed54b..f7c57f645 100644 --- a/sudo.pod +++ b/sudo.pod @@ -31,7 +31,8 @@ B<sudo> B<-h> | B<-K> | B<-k> | B<-L> | B<-V> B<sudo> B<-v> [B<-AknS>] S<[B<-a> I<auth_type>]> -S<[B<-p> I<prompt>]> +S<[B<-g> I<groupname>|I<#gid>]> S<[B<-p> I<prompt>]> +S<[B<-u> I<username>|I<#uid>]> B<sudo> B<-l[l]> [B<-AknS>] S<[B<-a> I<auth_type>]> diff --git a/sudo_usage.h.in b/sudo_usage.h.in index 10bd43893..9f1c102cc 100644 --- a/sudo_usage.h.in +++ b/sudo_usage.h.in @@ -26,7 +26,7 @@ * need to be able to substitute values from configure. */ #define SUDO_USAGE1 " -h | -K | -k | -L | -V" -#define SUDO_USAGE2 " -v [-AknS] @BSDAUTH_USAGE@[-p prompt]" +#define SUDO_USAGE2 " -v [-AknS] @BSDAUTH_USAGE@[-g groupname|#gid] [-p prompt] [-u username|#uid]" #define SUDO_USAGE3 " -l[l] [-AknS] @BSDAUTH_USAGE@[-g groupname|#gid] [-p prompt] [-U username] [-u username|#uid] [-g groupname|#gid] [command]" #define SUDO_USAGE4 " [-AbEHknPS] @BSDAUTH_USAGE@@SELINUX_USAGE@[-C fd] @LOGINCAP_USAGE@[-g groupname|#gid] [-p prompt] [-u username|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]" #define SUDO_USAGE5 " -e [-AknS] @BSDAUTH_USAGE@@SELINUX_USAGE@[-C fd] @LOGINCAP_USAGE@[-g groupname|#gid] [-p prompt] [-u username|#uid] file ..." -- 2.40.0