From nobody Sun Oct 22 16:25:56 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SD3bS6s2nz4xWJy for ; Sun, 22 Oct 2023 16:25:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SD3bS5Pjlz4Wk8 for ; Sun, 22 Oct 2023 16:25:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697991956; a=rsa-sha256; cv=none; b=ijl7E1H5EUTXF8RpteYZ0pmBMsX1fUCxCBRmli13dTRadOa0eJh4KZhWa/pvA/zvaeci+H +rG86qPUWBuFwQB28izi3NUSMd5JNtbkQHL2kZ3dwkzhcK+7jLPGeyV+OlWtg39XGzIiKp qBQvRJbtcMZydfwd/ha26X3ntZ/+OVmHaWG27IMl7JkHzh7G8/nmdUDidaBrJnlCbpqZsj NUPt30MNJyLRpinnZC6PEUQlhhYrUl0DGXUarp9oZzeQYBuEoHAZj8F7lYP+hQCMuIOtRm Xx9EyXpT66jTxIyuIC6TjR7Bdpw1KIEhIPz6QAGGEQkCf8ZHB8IE4wre5gBAHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697991956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6Qy3md7iaHZ/BURWwmJTX9xQ54dCDOBDzO1tsFuFWU0=; b=dOJfwzcfC70Fm0ssO2ly+tyzLCh62DNnQ0Fl1BNKRA+iFiCVBn+ckhjW0xooXftFHlhVyv MlB+ZXfqM+U21tESC/4fdJVKBQ5pmoNowSJuIeP2q1yWfmd9bHyg3M8DuzRUlLdiYeXVWu I0xP0eg8iR5dpkZ3xrFEdySb0IRnQ0F9nNDSafIFmDgdHcK46Ba5zUoq38oRFlzCRlUrzx TQQXphlWsnsNQxlqoMCtNiXWdmmSEIH+kbjEMnkC7B6MjNL1oUT1XSfQ1owGFPVBoAKLI6 JwUiXD+LbBpv7ciMXfxvk4XAxoKGh0++Nrg5T5H5Me4m2q2mqU6FReUrkQfUbQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SD3bS4Km5z13nb for ; Sun, 22 Oct 2023 16:25:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 39MGPumR050517 for ; Sun, 22 Oct 2023 16:25:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 39MGPutf050516 for bugs@FreeBSD.org; Sun, 22 Oct 2023 16:25:56 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 274650] sh does not accept -- after -c Date: Sun, 22 Oct 2023 16:25:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 13.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: guillem@hadrons.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274650 Bug ID: 274650 Summary: sh does not accept -- after -c Product: Base System Version: 13.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: guillem@hadrons.org After having seen a similar change implemented for glibc, I did the same in dpkg to make its shell invocations more robust and avoid missparsing in cas= e a command starts with a =C2=AB-=C2=BB (which would be very unusual, but=E2=80= =A6). See . Just noticed afterwards that this did not work on FreeBSD's /bin/sh: ,--- $ sh -c -- "echo \$0" name arg echo $0: --: not found `--- This though seems to work fine on posh, dash, ksh93, bash, and the default = sh on NetBSD, OpenBSD, Solaris and macOS. But neither on sh, ksh nor bsh on AIX 7.3. For now I guess I'll need to make its usage conditional on the system. --=20 You are receiving this mail because: You are the assignee for the bug.=