From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x32.google.com (mail-oa1-x32.google.com [IPv6:2001:4860:4864:20::32]) by sourceware.org (Postfix) with ESMTPS id A32FC3858D39 for ; Tue, 28 Mar 2023 13:02:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A32FC3858D39 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-x32.google.com with SMTP id 586e51a60fabf-177b78067ffso12567708fac.7 for ; Tue, 28 Mar 2023 06:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680008553; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=ofTnvvyGJdau0lz1arb8SKx/4JTVnxFOVpU0x4baGeQ=; b=qW2yFBGBLcoSuxGzZwz0qQUCKQPnY8F5Z2ha/e1Dcrxr7EqBvDOtIAj2LoiS/4pGZ9 eTyxd5SAsNYgCBAi3O2HCEanXZYjWNmUwr13wadFFsigRuYQl84RKVq7EkzRYE0+kDFk 5+UgKXsZBACc1Z5ZUoQamX4sZnwIL29yzD2vNNkYgRSBwxxCNILIUuN7UYtDq6muevkr hWOlqBVb5OUuSoaQrH6eAvlyv94Val3DRxWMsBCKovDLnTy7XxVRegplODjYsRC09Da9 Mxlh3pMMW8OpiIm44BBbrT6r91tHUXRuXRMelE0GZUPRcRmKbMglSzWytaWIpoeiadMX G4MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680008553; h=content-transfer-encoding:in-reply-to:organization:from:references :cc: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=ofTnvvyGJdau0lz1arb8SKx/4JTVnxFOVpU0x4baGeQ=; b=Jx+jCzc3z49LqM5ti9J007l03RdGH5A2fubff1AYifcjSIHeUrOgBh82etHGrM1Nz9 aFH9mtfxC8ovFx+I93v7h/EjariV0wHd2U4mv39D/VKQiCqVk4TvxyV+JPPxyRoTAwJ4 H/F/m64DQEzEc8HX+bPTCpHbVDsAIfo/RAtFSmE+vGOCnmJzN90L3o3MUNvC56tdb2vY 8iaRx3gJ5wxvJzdaagsmHhoPBHAR4k7Fwi2uxIkejmv5YpNddf+iodLah1TJynq2mr+7 cRflnwoFv+LEjUdmcQZmbPwL3lLhWPRS/Wq6Xh2w8kmqRMf+CuGb5EM/KnPSNNigzlmX /ZkQ== X-Gm-Message-State: AAQBX9cABPJ/9rrD5C5mNWzHV7v6BxiU0i1Xemv/srHrYXb9rK/Hci55 oUeVTaU0DiCfsK4DO9Jrt8byEA== X-Google-Smtp-Source: AK7set/yoeshA2oLVXdLg0LwTFcgBh0xlkyHMsM8V09aHe0EUnKXlHXbzm/dQ7cryaUEeTJsa9jOQA== X-Received: by 2002:a05:6870:210f:b0:172:4748:32d9 with SMTP id f15-20020a056870210f00b00172474832d9mr8869598oae.3.1680008552868; Tue, 28 Mar 2023 06:02:32 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c1:60f9:1426:1d2d:d6b:1761? ([2804:1b3:a7c1:60f9:1426:1d2d:d6b:1761]) by smtp.gmail.com with ESMTPSA id tb7-20020a05687186c700b0017630fe87e5sm10729322oab.33.2023.03.28.06.02.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Mar 2023 06:02:32 -0700 (PDT) Message-ID: <0a7494b2-831d-1aa1-531a-c75af7e6d68e@linaro.org> Date: Tue, 28 Mar 2023 10:02:29 -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: Joe Simmons-Talbott , Zack Weinberg Cc: GNU libc development References: <20230322180430.986512-1-josimmon@redhat.com> <4d6fca26-f73d-5e87-3e7e-082a92735f50@linaro.org> <20230328125202.GA1053650@oak> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20230328125202.GA1053650@oak> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.2 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 28/03/23 09:52, Joe Simmons-Talbott via Libc-alpha wrote: > 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 > As Andreas added, we already assume a Bourne-compatible shell. So the patch is ok, thanks. Reviewed-by: Adhemerval Zanella