From: Todd C. Miller Date: Wed, 19 Jun 2019 20:29:25 +0000 (-0600) Subject: Better description of secure_path. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05f9643b89bae83757f3755cc0d5c52b38853114;p=sudo Better description of secure_path. The secure_path option affects the resolution of unqualified commands as well as the environment that commands run with. --- diff --git a/doc/sudoers.cat b/doc/sudoers.cat index 88b5dbf90..63aa104e0 100644 --- a/doc/sudoers.cat +++ b/doc/sudoers.cat @@ -2080,13 +2080,15 @@ SSUUDDOOEERRSS OOPPTTIIOONNSS either case, the contents of _r_e_s_t_r_i_c_t_e_d___e_n_v___f_i_l_e are processed before the contents of _e_n_v___f_i_l_e. - secure_path Path used for every command run from ssuuddoo. If you don't - trust the people running ssuuddoo to have a sane PATH - environment variable you may want to use this. Another use - is if you want to have the "root path" be separate from the - "user path". Users in the group specified by the - _e_x_e_m_p_t___g_r_o_u_p option are not affected by _s_e_c_u_r_e___p_a_t_h. This - option is not set by default. + secure_path If set, ssuuddoo will use this value in place of the user's + PATH environment variable. This option can be used to + reset the PATH to a known good value that contains + directories for system administrator commands such as + _/_u_s_r_/_s_b_i_n. + + Users in the group specified by the _e_x_e_m_p_t___g_r_o_u_p option are + not affected by _s_e_c_u_r_e___p_a_t_h. This option is not set by + default. syslog Syslog facility if syslog is being used for logging (negate to disable syslog logging). Defaults to auth. diff --git a/doc/sudoers.man.in b/doc/sudoers.man.in index 8c5dd5f15..dd677daa2 100644 --- a/doc/sudoers.man.in +++ b/doc/sudoers.man.in @@ -4159,18 +4159,17 @@ are processed before the contents of \fIenv_file\fR. .TP 14n secure_path -Path used for every command run from -\fBsudo\fR. -If you don't trust the -people running +If set, \fBsudo\fR -to have a sane +will use this value in place of the user's \fRPATH\fR -environment variable you may want to use this. -Another use is if you want to have the -\(lqroot path\(rq -be separate from the -\(lquser path\(rq. +environment variable. +This option can be used to reset the +\fRPATH\fR +to a known good value that contains directories for system administrator +commands such as +\fI/usr/sbin\fR. +.sp Users in the group specified by the \fIexempt_group\fR option are not affected by diff --git a/doc/sudoers.mdoc.in b/doc/sudoers.mdoc.in index 5819c5e17..60616f29b 100644 --- a/doc/sudoers.mdoc.in +++ b/doc/sudoers.mdoc.in @@ -3885,18 +3885,17 @@ In either case, the contents of are processed before the contents of .Em env_file . .It secure_path -Path used for every command run from -.Nm sudo . -If you don't trust the -people running +If set, .Nm sudo -to have a sane +will use this value in place of the user's .Ev PATH -environment variable you may want to use this. -Another use is if you want to have the -.Dq root path -be separate from the -.Dq user path . +environment variable. +This option can be used to reset the +.Ev PATH +to a known good value that contains directories for system administrator +commands such as +.Pa /usr/sbin . +.Pp Users in the group specified by the .Em exempt_group option are not affected by