Allow the -k flag to be specified in conjunction with a command or

another option that may require authentication.
This commit is contained in:
Todd C. Miller
2009-02-24 13:04:39 +00:00
parent e7ee38d62c
commit 15975b83ce
4 changed files with 80 additions and 40 deletions

View File

@@ -27,10 +27,16 @@ sudo, sudoedit - execute a command as another user
=head1 SYNOPSIS
B<sudo> [B<-n>] B<-h> | B<-K> | B<-k> | B<-L> | B<-V> | B<-v>
B<sudo> B<-h> | B<-K> | B<-k> | B<-L> | B<-V>
B<sudo> B<-l[l]> [B<-AnS>] S<[B<-g> I<groupname>|I<#gid>]> S<[B<-U> I<username>]>
S<[B<-u> I<username>|I<#uid>]> [I<command>]
B<sudo> B<-v> [B<-AknS>]
S<[B<-a> I<auth_type>]>
S<[B<-p> I<prompt>]>
B<sudo> B<-l[l]> [B<-AknS>]
S<[B<-a> I<auth_type>]>
S<[B<-g> I<groupname>|I<#gid>]> S<[B<-p> I<prompt>]>
S<[B<-U> I<username>]> S<[B<-u> I<username>|I<#uid>]> [I<command>]
B<sudo> [B<-AbEHnPS>]
S<[B<-a> I<auth_type>]>
@@ -231,16 +237,23 @@ All other environment variables are removed.
=item -K
The B<-K> (sure I<kill>) option is like B<-k> except that it removes
the user's timestamp entirely. Like B<-k>, this option does not
require a password.
the user's timestamp entirely and may not be used in conjunction
with a command or other option. This option does not require a
password.
=item -k
The B<-k> (I<kill>) option to B<sudo> invalidates the user's timestamp
by setting the time on it to the Epoch. The next time B<sudo> is
run a password will be required. This option does not require a password
and was added to allow a user to revoke B<sudo> permissions from a .logout
file.
When used by itself, the B<-k> (I<kill>) option to B<sudo> invalidates
the user's timestamp by setting the time on it to the Epoch. The
next time B<sudo> is run a password will be required. This option
does not require a password and was added to allow a user to revoke
B<sudo> permissions from a .logout file.
When used in conjunction with a command or an option that may require
a password, the B<-k> option will cause B<sudo> to ignore the user's
timestamp file. As a result, B<sudo> will prompt for a password
(if one is required by I<sudoers>) and will not update the user's
timestamp file.
=item -L