From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by sourceware.org (Postfix) with ESMTPS id C60F93858404 for ; Mon, 27 Mar 2023 19:56:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C60F93858404 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-17ac5ee3f9cso10485201fac.12 for ; Mon, 27 Mar 2023 12:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679946963; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=dbRqwzXdnEj5akplcqy4uJch1+IiIoHNcFXGFhVVLs4=; b=LW96uOtMGDcfRkNBDp6qRatZ9841+vE+6ulfO3cnUD0O2uQAEdVaOUzW+JebZdfkze NwJsBYe4qyf0GGsOmCMvmWm6mFFXIezQWQKFPWB/oQ1Hym5g9lNW1uB2Cnzxcl+n/c+U f0rWfChybfDQIlye10XYQSlBH38VxYv8zvqdBijiwcxpR9oVR7/dd1XmSIBRqP5K9rkd x3qniRyYQicWkIFMx1fuCxpeBQvo3/PkYTcTAYObMxmq8+MZGWwBmewCN23AEUTj/H58 mg64O0di48vP5Dwa6RucQPbedPDIDNtKigm3tTHLJW1WG9X0TfwR2mCGYm8UmMPwPKak UTuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679946963; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dbRqwzXdnEj5akplcqy4uJch1+IiIoHNcFXGFhVVLs4=; b=VfLh2WV0DSTnPRC9LTKZFuPO10MZTGjtVeFE1GMhd80JUyZgdzF7D133exQ4XlnT4d GTykM6fMXW4v7lH1VMsQ373A9LAFcYNuE61Y5MGEpPxrrDO3ur7ECYdVmW4T4x+N3MPA dEhQfHQYMi1wCazRYokt2+A2FlrAIZ/795FTWEFI+6HlsblwkLmdkoozmaz0VcbSFJjE 6LMKqUX/+LkcbKDWcTBRLqrQaOogYcc8XG3FwkuuJNESdPNIDmspzP/LvW5R9TthCQip lA4CK58WmvaRN/dRtfx2dliPFiW1zgIOkSo5a5Vp7kNS57e3qJT/dn6Qcj5+lfhL/ETj SYVg== X-Gm-Message-State: AAQBX9fUWRmDcWON+r6FjIO6hkiwG1cOfcvCdG49JCRIhy+VDfOXtndP BOZ+I4Pe5RldzMhN2AqlT+MRhUXkjA5LYOFhzpLuPg== X-Google-Smtp-Source: AKy350bydCQXqy342l9F9rkff68E4h2gKYXHTsQHENt7l/6Wk/Z1epSwx4J36abWXfc/njCjc1awiQ== X-Received: by 2002:a05:6870:ac13:b0:177:9a21:19f8 with SMTP id kw19-20020a056870ac1300b001779a2119f8mr7294640oab.6.1679946963249; Mon, 27 Mar 2023 12:56:03 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c1:60f9:9d7f:7b90:a6ae:401d? ([2804:1b3:a7c1:60f9:9d7f:7b90:a6ae:401d]) by smtp.gmail.com with ESMTPSA id ax35-20020a05687c022300b0017243edbe5bsm10048525oac.58.2023.03.27.12.56.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Mar 2023 12:56:02 -0700 (PDT) Message-ID: <8d0cf378-0f9b-0dc8-cf99-07550de049f8@linaro.org> Date: Mon, 27 Mar 2023 16:56:00 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] system: Add "--" after "-c" for sh (BZ #28519) Content-Language: en-US To: libc-alpha@sourceware.org References: <20230322180430.986512-1-josimmon@redhat.com> <4d6fca26-f73d-5e87-3e7e-082a92735f50@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 27/03/23 16:50, 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. > > zw Indeed and and I am leaning to make glibc assume that _PATH_BSHELL should support at least some minimum POSIX features, which includes '--' as mark the end of the options.