From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id F0A443858D39 for ; Tue, 28 Mar 2023 12:52:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F0A443858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680007927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7RYSECLHtD8MNtsq51loWzeVLZyHXFbRXV2kVbe3OBY=; b=HJwDmX4HvTo17ui0XiyAUDJuEf0ZFqc1s7fLMZBu+fYa9WnuHohAhJt8DigZpou+n5l5FU JF6pgLILkha13gNf4K5bZ0JaWXytVDklpuMlNfEvZo3cb361I2JnPdVhIM1n7vznwyMyjq xuhFViM6tydeZUF8KPqWvX/3Wtb4hQo= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-219-BLSCmd9hO_qGOsSejBMbqA-1; Tue, 28 Mar 2023 08:52:04 -0400 X-MC-Unique: BLSCmd9hO_qGOsSejBMbqA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2BC963C10C6C; Tue, 28 Mar 2023 12:52:04 +0000 (UTC) Received: from oak (unknown [10.22.9.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 108884042AC5; Tue, 28 Mar 2023 12:52:03 +0000 (UTC) Date: Tue, 28 Mar 2023 08:52:02 -0400 From: Joe Simmons-Talbott To: Zack Weinberg Cc: GNU libc development Subject: Re: [PATCH] system: Add "--" after "-c" for sh (BZ #28519) Message-ID: <20230328125202.GA1053650@oak> References: <20230322180430.986512-1-josimmon@redhat.com> <4d6fca26-f73d-5e87-3e7e-082a92735f50@linaro.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Mar 27, 2023 at 03:50:35PM -0400, Zack Weinberg via Libc-alpha wrote: > On Mon, Mar 27, 2023, at 3:34 PM, Cristian Rodríguez via Libc-alpha wrote: > > On Mon, Mar 27, 2023 at 3:56 PM Adhemerval Zanella Netto via Libc- > > alpha wrote: > > > >> I am not sure if it should be ok to break such environments, at least > >> there are available shells in some environments. > > > > Isn't a posix compliant shell already required as "/bin/sh" ? if it is > > not in writing..it is already de facto required. > > I wouldn't go so far as to say that, _but_ setting a version of the C > shell as /bin/sh is definitely an improper system configuration and will > break tons of other things. > > > A lot of work has already been done to get basic components running > > with dash which has strict compliance as goals. > > You're thinking about this patch from the wrong end of things; whether > this is a safe change to make is not about other programs that might not > work with _no more than_ the features specified by POSIX for /bin/sh. > Rather, it is a question of whether glibc can safely assume availability > of _all of_ the features specified by POSIX for /bin/sh, in particular > unusual corners of command line option handling. > > I think it would be a good idea to test this patch on a system where > /bin/sh is busybox sh, and one where /bin/sh is mksh. I tested both busybox and mksh with the patch and they both accept the '--' after '-c' and behave as expected. Joe