Hi folks

I'm wondering if it'd be a good idea to have PS1 set to

'${debian_chroot:+($debian_chroot)[EMAIL PROTECTED]:$(realpath "$(pwd)")\$ '

instead of the default

'${debian_chroot:+($debian_chroot)[EMAIL PROTECTED]:\w\$ '

and make it a suggestion in /etc/skel/.bashrc for those users who want
to see the actual current working directory.

 From a security standpoint you could enter e.g.
/home/someoneelse/somedir/ and see [EMAIL PROTECTED]:/home/someoneelse/somedir/$
in the prompt, but really be in /etc/ if somedir is a (potentially
malicious) symlink to /etc created by a different user. It could get
quite disastrous if you decide to run something like rm -r * in such a
directory.

It won't be very helpful with more sophisticated symlink race
conditions, but it is better than nothing.

Perhaps I should post it to bash package wishlist, what do you think?

Peter Kuma





-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to