From owner-freebsd-security@freebsd.org Tue Jun 1 21:22:43 2021 Return-Path: Delivered-To: freebsd-security@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9E62E6302FB for ; Tue, 1 Jun 2021 21:22:43 +0000 (UTC) (envelope-from qmi@foresthacker.hu) Received: from mona.foresthacker.hu (mona.foresthacker.hu [80.211.198.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FvlVp6BM5z4r9h for ; Tue, 1 Jun 2021 21:22:42 +0000 (UTC) (envelope-from qmi@foresthacker.hu) Received: from [192.168.0.10] (unknown [178.48.142.77]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mona.foresthacker.hu (Postfix) with ESMTPSA id CE4E79B83 for ; Tue, 1 Jun 2021 23:22:33 +0200 (CEST) Subject: Re: sysrc bug To: freebsd-security@freebsd.org References: From: =?UTF-8?Q?Mikl=c3=b3s_Quartus?= Organization: Foresthacker Message-ID: <242de1fa-ccd5-c9d6-4b2e-330ac9dcc152@foresthacker.hu> Date: Tue, 1 Jun 2021 23:22:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-Rspamd-Queue-Id: 4FvlVp6BM5z4r9h X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.80 / 15.00]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[80.211.198.27:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-security@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; HAS_ORG_HEADER(0.00)[]; SPAMHAUS_ZRD(0.00)[80.211.198.27:from:127.0.2.255]; ARC_NA(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[foresthacker.hu,quarantine]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; R_MIXED_CHARSET(1.00)[subject]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:24806, ipnet:80.211.192.0/19, country:CZ]; MAILMAN_DEST(0.00)[freebsd-security] X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2021 21:22:43 -0000 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 have to >> ask specifically what said reasons are, particularly considering >> /usr/sbin/sysrc starts with "#!/bin/sh" (as does and should every system >> shell script). > It’s likely due to the quoting behavior of newlines passed as the argument when he ran the script, which varies between shell implementations. As I said, I’m not surprised something broke because many utilities 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ós GPG fingerprint: 3C4B 1364 A379 7366 7FED 260A 2208 F2CE 3FCE A0D3