]> granicus.if.org Git - sudo/commitdiff
Attempt to clarify the conditions under which MAIL and HOME are
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 10 Jul 2015 16:02:38 +0000 (10:02 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 10 Jul 2015 16:02:38 +0000 (10:02 -0600)
set to the target user.

doc/sudo.cat
doc/sudo.man.in
doc/sudo.mdoc.in
doc/sudoers.cat
doc/sudoers.man.in
doc/sudoers.mdoc.in

index 2dfd5f9d9c16940bfa32f66c982fc2707ddbdf9f..c4b5b3c67c1c4e1d1d240549c51bd01f12263306 100644 (file)
@@ -455,13 +455,16 @@ E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
      EDITOR           Default editor to use in -\b-e\be (sudoedit) mode if neither
                       SUDO_EDITOR nor VISUAL is set.
 
-     MAIL             In -\b-i\bi mode or when _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt is enabled in _\bs_\bu_\bd_\bo_\be_\br_\bs, set
-                      to the mail spool of the target user.
+     MAIL             Set to the mail spool of the target user when the -\b-i\bi
+                      option is specified or when _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt is enabled in
+                      _\bs_\bu_\bd_\bo_\be_\br_\bs (unless MAIL is present in the _\be_\bn_\bv_\b__\bk_\be_\be_\bp list).
 
-     HOME             Set to the home directory of the target user if -\b-i\bi or -\b-H\bH
-                      are specified, _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt or _\ba_\bl_\bw_\ba_\by_\bs_\b__\bs_\be_\bt_\b__\bh_\bo_\bm_\be are set in
-                      _\bs_\bu_\bd_\bo_\be_\br_\bs, or when the -\b-s\bs option is specified and _\bs_\be_\bt_\b__\bh_\bo_\bm_\be
-                      is set in _\bs_\bu_\bd_\bo_\be_\br_\bs.
+     HOME             Set to the home directory of the target user when the -\b-i\bi
+                      or -\b-H\bH options are specified, when the -\b-s\bs option is
+                      specified and _\bs_\be_\bt_\b__\bh_\bo_\bm_\be is set in _\bs_\bu_\bd_\bo_\be_\br_\bs, when
+                      _\ba_\bl_\bw_\ba_\by_\bs_\b__\bs_\be_\bt_\b__\bh_\bo_\bm_\be is enabled in _\bs_\bu_\bd_\bo_\be_\br_\bs, or when _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt
+                      is enabled in _\bs_\bu_\bd_\bo_\be_\br_\bs and _\bH_\bO_\bM_\bE is not present in the
+                      _\be_\bn_\bv_\b__\bk_\be_\be_\bp list.
 
      PATH             May be overridden by the security policy.
 
@@ -582,4 +585,4 @@ D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
      file distributed with s\bsu\bud\bdo\bo or http://www.sudo.ws/license.html for
      complete details.
 
-Sudo 1.8.14                      June 8, 2015                      Sudo 1.8.14
+Sudo 1.8.14                      July 10, 2015                     Sudo 1.8.14
index 52e8d6c885ab8895ba242ff75113923e38376ff4..c3b50ac9df88d5c735e1892f35c97facd2852449 100644 (file)
@@ -21,7 +21,7 @@
 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
 .\"
-.TH "SUDO" "8" "June 8, 2015" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
+.TH "SUDO" "8" "July 10, 2015" "Sudo @PACKAGE_VERSION@" "System Manager's Manual"
 .nh
 .if n .ad l
 .SH "NAME"
@@ -920,31 +920,42 @@ nor
 is set.
 .TP 17n
 \fRMAIL\fR
-In
+Set to the mail spool of the target user when the
 \fB\-i\fR
-mode or when
+option is specified or when
 \fIenv_reset\fR
 is enabled in
-\fIsudoers\fR,
-set to the mail spool of the target user.
+\fIsudoers\fR
+(unless
+\fRMAIL\fR
+is present in the
+\fIenv_keep\fR
+list).
 .TP 17n
 \fRHOME\fR
-Set to the home directory of the target user if
+Set to the home directory of the target user when the
 \fB\-i\fR
 or
 \fB\-H\fR
-are specified,
-\fIenv_reset\fR
-or
-\fIalways_set_home\fR
-are set in
-\fIsudoers\fR,
-or when the
+options are specified, when the
 \fB\-s\fR
 option is specified and
 \fIset_home\fR
 is set in
-\fIsudoers\fR.
+\fIsudoers\fR,
+when
+\fIalways_set_home\fR
+is enabled in
+\fIsudoers\fR,
+or when
+\fIenv_reset\fR
+is enabled in
+\fIsudoers\fR
+and
+\fIHOME\fR
+is not present in the
+\fIenv_keep\fR
+list.
 .TP 17n
 \fRPATH\fR
 May be overridden by the security policy.
index 13f7b252c5ec33bdd9730e34cd783de073282822..23ed9f020a9d99e8f0ed523baf011a3906cd1db6 100644 (file)
@@ -19,7 +19,7 @@
 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
 .\"
-.Dd June 8, 2015
+.Dd July 10, 2015
 .Dt SUDO @mansectsu@
 .Os Sudo @PACKAGE_VERSION@
 .Sh NAME
@@ -851,30 +851,41 @@ nor
 .Ev VISUAL
 is set.
 .It Ev MAIL
-In
+Set to the mail spool of the target user when the
 .Fl i
-mode or when
+option is specified or when
 .Em env_reset
 is enabled in
-.Em sudoers ,
-set to the mail spool of the target user.
+.Em sudoers
+(unless
+.Ev MAIL
+is present in the
+.Em env_keep
+list).
 .It Ev HOME
-Set to the home directory of the target user if
+Set to the home directory of the target user when the
 .Fl i
 or
 .Fl H
-are specified,
-.Em env_reset
-or
-.Em always_set_home
-are set in
-.Em sudoers ,
-or when the
+options are specified, when the
 .Fl s
 option is specified and
 .Em set_home
 is set in
-.Em sudoers .
+.Em sudoers ,
+when
+.Em always_set_home
+is enabled in
+.Em sudoers ,
+or when
+.Em env_reset
+is enabled in
+.Em sudoers
+and
+.Em HOME
+is not present in the
+.Em env_keep
+list.
 .It Ev PATH
 May be overridden by the security policy.
 .It Ev SHELL
index b091ff61e2308c47e4f15fb4dd9559495cedfe2c..cbf478fde2407ed2b015f27772ec23eea320ee54 100644 (file)
@@ -837,9 +837,10 @@ S\bSU\bUD\bDO\bOE\bER\bRS\bS O\bOP\bPT\bTI\bIO\bON\bNS\bS
      always_set_home   If enabled, s\bsu\bud\bdo\bo will set the HOME environment variable
                        to the home directory of the target user (which is root
                        unless the -\b-u\bu option is used).  This effectively means
-                       that the -\b-H\bH option is always implied.  Note that HOME
-                       is already set when the _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt option is enabled, so
-                       _\ba_\bl_\bw_\ba_\by_\bs_\b__\bs_\be_\bt_\b__\bh_\bo_\bm_\be is only effective for configurations
+                       that the -\b-H\bH option is always implied.  Note that by
+                       default, HOME will be set to the home directory of the
+                       target user when the _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt option is enabled, so
+                       _\ba_\bl_\bw_\ba_\by_\bs_\b__\bs_\be_\bt_\b__\bh_\bo_\bm_\be only has an effect for configurations
                        where either _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt is disabled or HOME is present
                        in the _\be_\bn_\bv_\b__\bk_\be_\be_\bp list.  This flag is _\bo_\bf_\bf by default.
 
@@ -2416,4 +2417,4 @@ D\bDI\bIS\bSC\bCL\bLA\bAI\bIM\bME\bER\bR
      file distributed with s\bsu\bud\bdo\bo or http://www.sudo.ws/license.html for
      complete details.
 
-Sudo 1.8.14                     March 24, 2015                     Sudo 1.8.14
+Sudo 1.8.14                      July 10, 2015                     Sudo 1.8.14
index 74b67d2848703714fe033c79cd1a5db0780a8061..298a33a70526a2f9eb1908f6d843e057d3983c30 100644 (file)
@@ -21,7 +21,7 @@
 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
 .\"
-.TH "SUDOERS" "5" "March 24, 2015" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
+.TH "SUDOERS" "5" "July 10, 2015" "Sudo @PACKAGE_VERSION@" "File Formats Manual"
 .nh
 .if n .ad l
 .SH "NAME"
@@ -1825,13 +1825,13 @@ option is used).
 This effectively means that the
 \fB\-H\fR
 option is always implied.
-Note that
+Note that by default,
 \fRHOME\fR
-is already set when the
+will be set to the home directory of the target user when the
 \fIenv_reset\fR
 option is enabled, so
 \fIalways_set_home\fR
-is only effective for configurations where either
+only has an effect for configurations where either
 \fIenv_reset\fR
 is disabled or
 \fRHOME\fR
index 2fe0cb3294ec3e8c0126dda0c188e6a76faaaa56..cd8d6c7b062b0c465b115cd6295af67ab77355c6 100644 (file)
@@ -19,7 +19,7 @@
 .\" Agency (DARPA) and Air Force Research Laboratory, Air Force
 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
 .\"
-.Dd March 24, 2015
+.Dd July 10, 2015
 .Dt SUDOERS @mansectform@
 .Os Sudo @PACKAGE_VERSION@
 .Sh NAME
@@ -1697,13 +1697,13 @@ option is used).
 This effectively means that the
 .Fl H
 option is always implied.
-Note that
+Note that by default,
 .Ev HOME
-is already set when the
+will be set to the home directory of the target user when the
 .Em env_reset
 option is enabled, so
 .Em always_set_home
-is only effective for configurations where either
+only has an effect for configurations where either
 .Em env_reset
 is disabled or
 .Ev HOME