]> granicus.if.org Git - sudo/commitdiff
LOGNAME and USERNAME are set the same way as USER
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 27 Sep 2015 21:40:05 +0000 (15:40 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 27 Sep 2015 21:40:05 +0000 (15:40 -0600)
doc/sudo.cat
doc/sudo.man.in
doc/sudo.mdoc.in

index 1d9bd635f32f7046c5db0380d924e8d8046222fa..ad05667dd5d9b69342adc48e7485cfd958531e24 100644 (file)
@@ -491,6 +491,12 @@ E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\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.
 
+     LOGNAME          Set to the login name of the target user when the -\b-i\bi
+                      option is specified, when the _\bs_\be_\bt_\b__\bl_\bo_\bg_\bn_\ba_\bm_\be option is
+                      enabled in _\bs_\bu_\bd_\bo_\be_\br_\bs or when the _\be_\bn_\bv_\b__\br_\be_\bs_\be_\bt option is
+                      enabled in _\bs_\bu_\bd_\bo_\be_\br_\bs (unless LOGNAME is present in the
+                      _\be_\bn_\bv_\b__\bk_\be_\be_\bp list).
+
      PATH             May be overridden by the security policy.
 
      SHELL            Used to determine shell to run with -\b-s\bs option.
@@ -514,8 +520,9 @@ E\bEN\bNV\bVI\bIR\bRO\bON\bNM\bME\bEN\bNT\bT
 
      SUDO_USER        Set to the login name of the user who invoked sudo.
 
-     USER             Set to the target user (root unless the -\b-u\bu option is
-                      specified).
+     USER             Set to the same value as LOGNAME, described above.
+
+     USERNAME         Same as USER.
 
      VISUAL           Default editor to use in -\b-e\be (sudoedit) mode if
                       SUDO_EDITOR is not set.
index 0c6a135d5403bd571b08a0de02001cdde59f8f4e..d906e800aa76cd33911896dcb7ab85a34dc52c1b 100644 (file)
@@ -997,6 +997,23 @@ is not present in the
 \fIenv_keep\fR
 list.
 .TP 17n
+\fRLOGNAME\fR
+Set to the login name of the target user when the
+\fB\-i\fR
+option is specified, when the
+\fIset_logname\fR
+option is enabled in
+\fIsudoers\fR
+or when the
+\fIenv_reset\fR
+option is enabled in
+\fIsudoers\fR
+(unless
+\fRLOGNAME\fR
+is present in the
+\fIenv_keep\fR
+list).
+.TP 17n
 \fRPATH\fR
 May be overridden by the security policy.
 .TP 17n
@@ -1037,9 +1054,13 @@ Set to the user ID of the user who invoked sudo.
 Set to the login name of the user who invoked sudo.
 .TP 17n
 \fRUSER\fR
-Set to the target user (root unless the
-\fB\-u\fR
-option is specified).
+Set to the same value as
+\fRLOGNAME\fR,
+described above.
+.TP 17n
+\fRUSERNAME\fR
+Same as
+\fRUSER\fR.
 .TP 17n
 \fRVISUAL\fR
 Default editor to use in
index a015744e786067cea774a6e37e8c2ea2a84cf46d..3bbb21ef30ab49564e59e7edfdeb192680310504 100644 (file)
@@ -926,6 +926,22 @@ and
 is not present in the
 .Em env_keep
 list.
+.It Ev LOGNAME
+Set to the login name of the target user when the
+.Fl i
+option is specified, when the
+.Em set_logname
+option is enabled in
+.Em sudoers
+or when the
+.Em env_reset
+option is enabled in
+.Em sudoers
+(unless
+.Ev LOGNAME
+is present in the
+.Em env_keep
+list).
 .It Ev PATH
 May be overridden by the security policy.
 .It Ev SHELL
@@ -956,9 +972,12 @@ Set to the user ID of the user who invoked sudo.
 .It Ev SUDO_USER
 Set to the login name of the user who invoked sudo.
 .It Ev USER
-Set to the target user (root unless the
-.Fl u
-option is specified).
+Set to the same value as
+.Ev LOGNAME ,
+described above.
+.It Ev USERNAME
+Same as
+.Ev USER .
 .It Ev VISUAL
 Default editor to use in
 .Fl e