Merge branch 'upstream'
[debian/sudo] / sudoers.pod
index f65db6b51de6e8c318041b52a00468812f00feeb..5f25ce3f29b60bcfb6c7a21ef82171a9ea2d27bb 100644 (file)
@@ -93,7 +93,7 @@ C<Host_Alias> and C<Cmnd_Alias>.
 
  Cmnd_Alias ::= NAME '=' Cmnd_List
 
- NAME ::= [A-Z]([A-Z][0-9]_)*
+ NAME ::= [A-Z]([a-z][A-Z][0-9]_)*
 
 Each I<alias> definition is of the form
 
@@ -437,12 +437,36 @@ B<Flags>:
 
 =over 16
 
-=item always_set_home
+=item mail_badpass
 
-If set, B<sudo> will set the C<HOME> environment variable to the home
-directory of the target user (which is root unless the B<-u> option is used).
-This effectively means that the B<-H> flag is always implied.
-This flag is I<off> by default.
+Send mail to the I<mailto> user if the user running B<sudo> does not
+enter the correct password.  This flag is I<off> by default.
+
+=item mail_no_host
+
+If set, mail will be sent to the I<mailto> user if the invoking
+user exists in the I<sudoers> file, but is not allowed to run
+commands on the current host.  This flag is I<@mail_no_host@> by default.
+
+=item mail_no_perms
+
+If set, mail will be sent to the I<mailto> user if the invoking
+user is allowed to use B<sudo> but the command they are trying is not
+listed in their I<sudoers> file entry or is explicitly denied.
+This flag is I<@mail_no_perms@> by default.
+
+=item mail_no_user
+
+If set, mail will be sent to the I<mailto> user if the invoking
+user is not in the I<sudoers> file.  This flag is I<@mail_no_user@>
+by default.
+
+=item noexec
+
+If set, all commands run via B<sudo> will behave as if the C<NOEXEC>
+tag has been set, unless overridden by a C<EXEC> tag.  See the
+description of I<NOEXEC and EXEC> below as well as the L<PREVENTING SHELL
+ESCAPES> section at the end of this manual.  This flag is I<off> by default.
 
 =item authenticate
 
@@ -1001,7 +1025,10 @@ the I<-V> option.
 
 =item env_delete
 
-Environment variables to be removed from the user's environment.
+
+Not effective due to security issues: only variables listed in 
+I<env_keep> or I<env_check> can be passed through B<sudo>!
+
 The argument may be a double-quoted, space-separated list or a
 single value without double-quotes.  The list can be replaced, added
 to, deleted from, or disabled by using the C<=>, C<+=>, C<-=>, and
@@ -1013,8 +1040,8 @@ as B<sudo>).
 
 =item env_keep
 
-Environment variables to be preserved in the user's environment
-when the I<env_reset> option is in effect.  This allows fine-grained
+Environment variables to be preserved in the user's environment.
+This allows fine-grained
 control over the environment B<sudo>-spawned processes will receive.
 The argument may be a double-quoted, space-separated list or a
 single value without double-quotes.  The list can be replaced, added
@@ -1062,6 +1089,15 @@ is you cannot reference an Alias that has not already been defined.
 Below are example I<sudoers> entries.  Admittedly, some of
 these are a bit contrived.  First, we define our I<aliases>:
 
+Below are example I<sudoers> entries.  Admittedly, some of
+these are a bit contrived.  First, we allow a few environment
+variables to pass and then define our I<aliases>:
+
+ # Run X applications through sudo; HOME is used to find .Xauthority file
+ # Note that some programs may use HOME for other purposes too and
+ # this may lead to privilege escalation!
+ Defaults env_keep = "DISPLAY HOME"
  # User alias specification
  User_Alias    FULLTIMERS = millert, mikef, dowdy
  User_Alias    PARTTIMERS = bostley, jwfox, crawl