Date: Tue, 28 Sep 2021 20:04:18 +0200 From: Mateusz Piotrowski <0mp@FreeBSD.org> To: freebsd-current@freebsd.org Subject: Re: [HEADSUP] making /bin/sh the default shell for root Message-ID: <c9c908af-0151-2e77-2333-979ecc44d52a@FreeBSD.org> In-Reply-To: <97ebc390-a19e-3203-7016-ce541796eb18@beastielabs.net> References: <20210922083645.4vnoajyvwq6wfhdf@aniel.nours.eu> <97ebc390-a19e-3203-7016-ce541796eb18@beastielabs.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 23/09/2021 10:55, Hans Ottevanger wrote: > As you mention elsewhere in this thread, usage in scripts is not affect= ed by these changes. And=20 > for interactive use it could be a POLA violation, but the astonishment = would be a positive one. Unfortunately, the switch from csh to sh is going to affect scripts. Take= a look at this (examples=20 below assume that toor uses /bin/sh): # su root -c 'echo $1' abc def abc # su toor -c 'echo $1' abc def def Another example: # ssh -p 2222 root@xxx -- '$@' echo 1 2 3 Illegal variable name. # ssh -p 2222 toor@xxx -- '$@' echo 1 2 3 1 2 3 I've been bitten by this a couple of times when working with some product= ion scripts. I'm afraid=20 changing the default shell to csh may cause a bit of hard-to-debug proble= ms there in the wild. Otherwise, I'd be happy with having sh(1) as the default shell for root. = =46rom my perspective, sh(1)=20 was far more forgiving to my colleagues when they started with FreeBSD. Best, Mateusz Piotrowski
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c9c908af-0151-2e77-2333-979ecc44d52a>