Date: Sun, 30 May 2021 08:22:40 +0200 From: mario@supermoder.si To: Fas Xmut <fasxmut@protonmail.com> Cc: freebsd-security@freebsd.org Subject: Re: sysrc (awk) bug Message-ID: <D1C0D24E-2BC5-4353-BCCE-6176B8856F48@supermoder.si> In-Reply-To: <0J-hkv9PO-ZfjHO2kiEVatVRNdz0xTZ8pDMOvPreE53RFRsgyWHnU0U1IPO-mxNmswiB5KyGgO067-gLMA0PfW4Py3bBYllvQCBMTc2T8QE=@protonmail.com>
index | next in thread | previous in thread | raw e-mail
To my knowledge, it is not recommended to change default shell. As for rest I will leave to other experts. https://docs.freebsd.org/en/articles/linux-users/#shells Regards, Mario > On 30 May 2021, at 06:36, Fas Xmut via freebsd-security <freebsd-security@freebsd.org> wrote: > > I don't know if it is a security bug or not. When I use sysrc today, the error operations emptied my /etc/rc.conf, that's a small disaster, because my /etc/rc.conf is updated day by day, but now, it is empty. > > First, change your default root shell to sh/ksh or their derived shell. (I have tested, csh will not trigger that bug). > > Second, backup /etc/rc.conf to any other place. > > Then do the following commands: > > ------------------------------------------------------------------------ > # sysrc something_enable="NO" > # sysrc something_enable="YES >> " > awk: newline in string YES > ... at source line 1 > something_enable: NO -> YES > ------------------------------------------------------------------------ > > Now see what is inside /etc/rc.conf ? Everything is empty! only one thing in it: > > ------------------------------------------------------------------------ > something_enable="YES > " > ------------------------------------------------------------------------ > > Sent with [ProtonMail](https://protonmail.com) Secure Email. > _______________________________________________ > freebsd-security@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-security > To unsubscribe, send any mail to "freebsd-security-unsubscribe@freebsd.org"help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D1C0D24E-2BC5-4353-BCCE-6176B8856F48>
