Mailinglist Archive: yast-devel (73 mails)

< Previous Next >
Re: [yast-devel] Moving stuff from /sbin /bin /lib /lib64 to /usr/*

Hello Thomas,

On Jul 8 11:55 Thomas Biege wrote (excerpt):
I would suggest to set PATH to a safe value (/bin, /sbin, /usr/bin,
/usr/sbin, maybe more) in your code and use the short form of the
command for your convenience.

I wonder if the ordering of the directories in PATH is of importance?

In
https://bugzilla.novell.com/show_bug.cgi?id=794084#c11
you suggested to set PATH to /bin:/usr/bin:/sbin:/usr/sbin

root has after log in
/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:...

In bash scripts and when running commands in yast2-printer I use
---------------------------------------------------------------------
# Make sure to have a clean environment:
export PATH="/sbin:/usr/sbin:/usr/bin:/bin"
export LC_ALL="POSIX"
export LANG="POSIX"
umask 022
---------------------------------------------------------------------

I would appreciate an authoritative "recommended default way" how to
set up a reasonably clean environment before calling programs as root.

Is perhaps calling "su - root" a reasonable way?


Kind Regards
Johannes Meixner
--
SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups