Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 01 Jun 2021 22:52:16 +0000
From:      Fas Xmut <fasxmut@protonmail.com>
To:        =?utf-8?Q?Mikl=C3=B3s_Quartus?= <qmi@foresthacker.hu>
Cc:        "freebsd-security@freebsd.org" <freebsd-security@freebsd.org>
Subject:   Re: sysrc bug
Message-ID:  <u3JdTX8lWJSDUQ_kGBagZgc_Bht4CfBODvCj_N_z7Bh1i83bhtFZQ5gCeuZB66AqsVtBL9jn1z0BYjS0WveYlbyraNqwzgmmL-8vjBv15cQ=@protonmail.com>
In-Reply-To: <242de1fa-ccd5-c9d6-4b2e-330ac9dcc152@foresthacker.hu>
References:  <s2s2o821-3n23-6811-2020-s172porqps6n@mx.roble.com> <E8315698-19C7-46FB-AD46-CD61057FECD7@tetlows.org> <242de1fa-ccd5-c9d6-4b2e-330ac9dcc152@foresthacker.hu>

next in thread | previous in thread | raw e-mail | index | archive | help
=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me=
ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90
On Tuesday, June 1, 2021 9:22 PM, Mikl=C3=B3s Quartus via freebsd-security =
<freebsd-security@freebsd.org> wrote:

> On 6/1/21 5:54 AM, Gordon Tetlow via freebsd-security wrote:
>
> > Surprised this old myth is still being repeated. Having used various
> >
> > > root shells in FreeBSD and other Unux/Linux systems for decades I hav=
e to
> > > ask specifically what said reasons are, particularly considering
> > > /usr/sbin/sysrc starts with "#!/bin/sh" (as does and should every sys=
tem
> > > shell script).
> > > It=E2=80=99s likely due to the quoting behavior of newlines passed as=
 the argument when he ran the script, which varies between shell implementa=
tions. As I said, I=E2=80=99m not surprised something broke because many ut=
ilities are not tested with different shell behaviors.
> >
> > I also believe if we have a reproducible test case, we should go ahead =
and fix it.
> > Gordon
>
> I have Bash shell in my root terminal (did not change the default shell,
> just type 'bash -l' from the default csh) and I could not reproduce this
> error on 13.0-RELEASE . The rc.conf remains fine showing just the
> expected changes.
>
> -------------------------------------------------------------------------=
---------------------------------------------------------------------------=
---------------------------------------------------------------------------=
-------
>
> Regards,
> Mikl=C3=B3s
> GPG fingerprint: 3C4B 1364 A379 7366 7FED 260A 2208 F2CE 3FCE A0D3





I think I didnt express clearly. You have to do two commands to reproduce i=
t:



First:

sysrc something_enable=3D"NO"



Then:

sysrc something_enable=3D"YES
"



(Suppose you forget to type " at the end and just type enter, so I type " a=
t the following line)







---





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?u3JdTX8lWJSDUQ_kGBagZgc_Bht4CfBODvCj_N_z7Bh1i83bhtFZQ5gCeuZB66AqsVtBL9jn1z0BYjS0WveYlbyraNqwzgmmL-8vjBv15cQ=>