2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 14:25:15 +00:00

Fix the -s and -i flags and add support for the "implied_shell"

option.  If the user does not specify a command, sudo will now pass
in the path to the user's shell and set impied_shell=true.  The
plugin can them either check the command normally or return -2 to
cause sudo to print a usage message and exit.
This commit is contained in:
Todd C. Miller
2010-03-21 08:54:06 -04:00
parent 2e27226a0d
commit 6b180d24da
8 changed files with 284 additions and 190 deletions

View File

@@ -139,7 +139,7 @@
.\" ========================================================================
.\"
.IX Title "SUDO_PLUGIN @mansectsu@"
.TH SUDO_PLUGIN @mansectsu@ "March 19, 2010" "1.8.0a1" "MAINTENANCE COMMANDS"
.TH SUDO_PLUGIN @mansectsu@ "March 21, 2010" "1.8.0a1" "MAINTENANCE COMMANDS"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -295,6 +295,15 @@ the user wishes to preserve the environment.
.IX Item "login_shell=bool"
Set to true if the user specified the \f(CW\*(C`\-i\*(C'\fR flag, indicating that
the user wishes to run a login shell.
.IP "implied_shell=bool" 4
.IX Item "implied_shell=bool"
If the user does not specify a program on the command line, \fBsudo\fR
will pass the plugin the path to the user's shell and set
\&\fIimplied_shell\fR to true. This allows \fBsudo\fR with no arguments
to be used similarly to \fIsu\fR\|(1). If the plugin does not to support
this usage, it may return a value of \-2 from the \f(CW\*(C`check_policy\*(C'\fR
function, which will cause \fBsudo\fR to print a usage message and
exit.
.IP "preserve_groups=bool" 4
.IX Item "preserve_groups=bool"
Set to true if the user specified the \f(CW\*(C`\-P\*(C'\fR flag, indicating that