From 5cd49e1e008d4688d35122a894cdacf58282402e Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 22 Jul 2007 19:20:42 +0000 Subject: [PATCH] Sort SYNOPSIS and sync usage. From Igor Sobrado. --- sudo.c | 11 ++++++----- sudo.pod | 34 +++++++++++++++++----------------- visudo.c | 2 +- visudo.pod | 2 +- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/sudo.c b/sudo.c index 2f1e65bad..5ebd6e47c 100644 --- a/sudo.c +++ b/sudo.c @@ -1309,11 +1309,11 @@ usage(exit_val) char **p, **uvec[5]; int i, linelen, linemax, ulen; static char *uvec1[] = { - " -K | -L | -V | -h | -k | -v", + " -h | -K | -k | -L | -V | -v", NULL }; static char *uvec2[] = { - " [-U username] [-u username|#uid] -l [command]", + " -l [-U username] [-u username|#uid] [command]", NULL }; static char *uvec3[] = { @@ -1328,10 +1328,11 @@ usage(exit_val) " [-p prompt]", " [-u username|#uid]", " [VAR=value]", - " { -e file [...] | -i | -s | }", + " {-i | -s | }", NULL }; static char *uvec4[] = { + " -e", " [-S]", #ifdef HAVE_BSD_AUTH_H " [-a auth_type]", @@ -1342,7 +1343,7 @@ usage(exit_val) #endif " [-p prompt]", " [-u username|#uid]", - " file [...]", + " file ...", NULL }; @@ -1350,7 +1351,7 @@ usage(exit_val) * Use usage vectors appropriate to the progname. */ if (strcmp(getprogname(), "sudoedit") == 0) { - uvec[0] = uvec4; + uvec[0] = uvec4 + 1; uvec[1] = NULL; } else { uvec[0] = uvec1; diff --git a/sudo.pod b/sudo.pod index 64e3c13b8..81a48cb57 100644 --- a/sudo.pod +++ b/sudo.pod @@ -28,17 +28,17 @@ sudo, sudoedit - execute a command as another user =head1 SYNOPSIS -B B<-K> | B<-k> | B<-h> | B<-L> | B<-V> | B<-v> +B B<-h> | B<-K> | B<-k> | B<-L> | B<-V> | B<-v> B B<-l> S<[B<-U> I]> S<[B<-u> I|I<#uid>]> [I] B [B<-bEHPS>] S<[B<-a> I]> S<[B<-C> I]> S<[B<-c> I|I<->]> S<[B<-p> I]> S<[B<-u> I|I<#uid>]> -S<[B=I]> S<{B<-e> file [...] | B<-i> | B<-s> | I}> +S<[B=I]> S<{B<-i> | B<-s> | I}> -B S<[B<-a> I]> S<[B<-c> I|I<->]> -S<[B<-p> I]> [B<-S>] S<[B<-u> I|I<#uid>]> -file [...] +B [B<-S>] S<[B<-a> I]> S<[B<-C> I]> +S<[B<-c> I|I<->]> S<[B<-p> I]> S<[B<-u> I|I<#uid>]> +file ... =head1 DESCRIPTION @@ -243,24 +243,24 @@ escapes are supported: =over 8 -=item C<%u> +=item C<%H> -expanded to the invoking user's login name +expanded to the local hostname including the domain name +(on if the machine's hostname is fully qualified or the I +I option is set) + +=item C<%h> + +expanded to the local hostname without the domain name =item C<%U> expanded to the login name of the user the command will be run as (defaults to root) -=item C<%h> - -expanded to the local hostname without the domain name - -=item C<%H> +=item C<%u> -expanded to the local hostname including the domain name -(on if the machine's hostname is fully qualified or the I -I option is set) +expanded to the invoking user's login name =item C<%%> @@ -481,8 +481,8 @@ to make the C and file redirection work. =head1 SEE ALSO -L, L, L, L, L, -L, L +L, L, L, L, L, +L, L =head1 AUTHORS diff --git a/visudo.c b/visudo.c index 5d8b6bae0..4834365cc 100644 --- a/visudo.c +++ b/visudo.c @@ -1012,7 +1012,7 @@ quit(signo) static void usage() { - (void) fprintf(stderr, "usage: %s [-c] [-f sudoers] [-q] [-s] [-V]\n", + (void) fprintf(stderr, "usage: %s [-c] [-q] [-s] [-V] [-f sudoers]\n", getprogname()); exit(1); } diff --git a/visudo.pod b/visudo.pod index 4668c2b91..4bd518b84 100644 --- a/visudo.pod +++ b/visudo.pod @@ -27,7 +27,7 @@ visudo - edit the sudoers file =head1 SYNOPSIS -B [ B<-c> ] [ B<-f> I ] [ B<-q> ] [ B<-s> ] [ B<-V> ] +B [B<-c>] [B<-q>] [B<-s>] [B<-V>] [B<-f> I] =head1 DESCRIPTION -- 2.40.0