e2scrub: Remove PATH setting from the scripts
PATCH 1/1 e2scrub: Remove PATH setting from the scripts
We don't want to override system setting by changing the PATH. This should remain under administrator/user control.
--- scrub/e2scrub.in | 2 -- scrub/e2scrub_all.in | 2 -- 2 files changed, 4 deletions(-)
scrub/e2scrub.in +0 -2
@@ -23,8 +23,6 @@ # check filesystems in VGs that have at least 256MB (or so) of # free space. -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - if (( $EUID != 0 )); then echo "e2scrub must be run as root" exit 1
scrub/e2scrub_all.in +0 -2
@@ -18,8 +18,6 @@ # along with this program; if not, write the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - if (( $EUID != 0 )); then echo "e2scrub_all must be run as root" exit 1
Signature · 1 line
2.21.1
Quoted 4 lines · Lukas Czerner
We don't want to override system setting by changing the PATH. This should remain under administrator/user control.
Signed-off-by Lukas Czerner <[email protected]>
Looks ok to me,
--D
Quoted 34 lines
--- scrub/e2scrub.in | 2 -- scrub/e2scrub_all.in | 2 -- 2 files changed, 4 deletions(-)scrub/e2scrub.in +0
-2@@ -23,8 +23,6 @@ # check filesystems in VGs that have at least 256MB (or so) of # free space. -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - if (( $EUID != 0 )); then echo "e2scrub must be run as root" exit 1scrub/e2scrub_all.in +0
-2@@ -18,8 +18,6 @@ # along with this program; if not, write the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin - if (( $EUID != 0 )); then echo "e2scrub_all must be run as root" exit 1Signature · 1 line
2.21.1
Quoted 4 lines · Lukas Czerner
We don't want to override system setting by changing the PATH. This should remain under administrator/user control.
Signed-off-by Lukas Czerner <[email protected]>
The reason why the PATH was added is because most users don't have /sbin or /usr/sbin in their PATH, and if they run "sudo e2scrub", finding commands like lvcreate, lvremove, et. al., wouldn't be there.
I suppose we could do something like
PATH=$PATH:/sbin:/usr/sbin
instead, but otherwise, users will see some unexpected failures.
- Ted
Quoted 9 lines · Theodore Y. Ts'o
Quoted 4 lines · Lukas Czerner
We don't want to override system setting by changing the PATH. This should remain under administrator/user control.
Signed-off-by Lukas Czerner <[email protected]>The reason why the PATH was added is because most users don't have /sbin or
/usr/sbinin their PATH, and if they run "sudo e2scrub", finding commands like lvcreate, lvremove, et. al., wouldn't be there.
I don't understand, e2scrub should be in be in sbin as well, right ? Besides what if such user wants to run lvcreate, or lvremove ? This seems like a problem that should be fixed somewhere else.
Quoted 4 lines
I suppose we could do something like
PATH=$PATH:/sbin:/usr/sbin
that's better than replacing it.
-Lukas
Quoted 5 lines
instead, but otherwise, users will see some unexpected failures.
- Ted