[Slackbuilds-users] Add "unset CDPATH" at the head of SlackBuilds
Eric Hameleers
eha at alienbase.nl
Mon Jul 12 10:53:25 UTC 2010
On Mon, 12 Jul 2010, Grissiom wrote:
> Hello,
>
> In recent work, I know that it is better to unset CDPATH at the very
> beginning of packaging scripts. There are tow reasons:
>
> 1, If CDPATH is not empty, cd will echo the dir name to stdout each
> time changes pwd. This will mess up the output in some cases.
>
> 2, User can use CDPATH to mislead cd's search path and then _may_ do
> something dangerous. For example:
...
> You can see CDPATH can make cd don't change into folder under current
> directory. This may lead to vulnerable problems in SlackBuilds.
> This is tested in normal user but applicable to root.
If I put a gun to my head and pull the trigger, I may get killed too.
I do not believe that a SlackBuild script should try and safeguard the
user from all the weird things he does as root. Keep your root
environment
clean and nothing disastrous will happen.
Cheers, Eric
--
Eric Hameleers
Email: alien at slackware.com
Jabber: alien at jabber.xs4all.nl
Gpg fingerprint: F2CE 1B92 EE1F 2C0C E97E 581E 5E56 AAAF A75C BDA0
The two basic principles of Windows system administration:
* For minor problems, reboot
* For major problems, reinstall
More information about the SlackBuilds-users
mailing list