From 52ec12f52f6ada519e0933093bf65ab96e7923bc Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 27 Sep 2015 15:40:05 -0600 Subject: [PATCH] LOGNAME and USERNAME are set the same way as USER --- doc/sudo.cat | 11 +++++++++-- doc/sudo.man.in | 27 ++++++++++++++++++++++++--- doc/sudo.mdoc.in | 25 ++++++++++++++++++++++--- 3 files changed, 55 insertions(+), 8 deletions(-) diff --git a/doc/sudo.cat b/doc/sudo.cat index 1d9bd635f..ad05667dd 100644 --- a/doc/sudo.cat +++ b/doc/sudo.cat @@ -491,6 +491,12 @@ EENNVVIIRROONNMMEENNTT is enabled in _s_u_d_o_e_r_s and _H_O_M_E is not present in the _e_n_v___k_e_e_p list. + LOGNAME Set to the login name of the target user when the --ii + option is specified, when the _s_e_t___l_o_g_n_a_m_e option is + enabled in _s_u_d_o_e_r_s or when the _e_n_v___r_e_s_e_t option is + enabled in _s_u_d_o_e_r_s (unless LOGNAME is present in the + _e_n_v___k_e_e_p list). + PATH May be overridden by the security policy. SHELL Used to determine shell to run with --ss option. @@ -514,8 +520,9 @@ EENNVVIIRROONNMMEENNTT SUDO_USER Set to the login name of the user who invoked sudo. - USER Set to the target user (root unless the --uu option is - specified). + USER Set to the same value as LOGNAME, described above. + + USERNAME Same as USER. VISUAL Default editor to use in --ee (sudoedit) mode if SUDO_EDITOR is not set. diff --git a/doc/sudo.man.in b/doc/sudo.man.in index 0c6a135d5..d906e800a 100644 --- a/doc/sudo.man.in +++ b/doc/sudo.man.in @@ -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 diff --git a/doc/sudo.mdoc.in b/doc/sudo.mdoc.in index a015744e7..3bbb21ef3 100644 --- a/doc/sudo.mdoc.in +++ b/doc/sudo.mdoc.in @@ -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 -- 2.40.0