From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.bugs Subject: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied Date: Sat, 27 Mar 2021 14:59:40 +0100 Message-ID: References: <86sg4hnkdo.fsf@protected.rcdrun.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19655"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 47432@debbugs.gnu.org To: Jean Louis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 27 15:00:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lQ9U2-00050R-Gv for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Mar 2021 15:00:10 +0100 Original-Received: from localhost ([::1]:50580 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lQ9U1-0001uH-Em for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Mar 2021 10:00:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lQ9Tu-0001u9-8j for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 10:00:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33172) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lQ9Tt-000748-Vz for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 10:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lQ9Tt-0003I8-U9 for bug-gnu-emacs@gnu.org; Sat, 27 Mar 2021 10:00:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Arthur Miller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Mar 2021 14:00:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47432 X-GNU-PR-Package: emacs Original-Received: via spool by 47432-submit@debbugs.gnu.org id=B47432.161685359012608 (code B ref 47432); Sat, 27 Mar 2021 14:00:01 +0000 Original-Received: (at 47432) by debbugs.gnu.org; 27 Mar 2021 13:59:50 +0000 Original-Received: from localhost ([127.0.0.1]:44718 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ9Ti-0003HI-7G for submit@debbugs.gnu.org; Sat, 27 Mar 2021 09:59:50 -0400 Original-Received: from mail-oln040092073068.outbound.protection.outlook.com ([40.92.73.68]:54147 helo=EUR04-HE1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lQ9Tf-0003H3-Mt for 47432@debbugs.gnu.org; Sat, 27 Mar 2021 09:59:49 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=awj6TcwcBmVwlQwH2ZILIS7SlEjSbmv58EQVW9umTz7EEDgNp+ByuG3PW76GKrtPaSX/QrJUXttRQ+sQVNl5a+Uwe00c8VRpQGdKj1Q9lOfjegXn9j31nc6DuFwwDbIdV0hqLEamTVPfaia0mntQErErF69BOONvD7Rf1ao8qjxIcaHr7rLIXFBAXQHp1L7OOq4ZqYI4evSAv3La3WKYw8rDH96E06r+ZQm+kcOJqbpccCJDeXpcrj+qsVmb6heWlzbD7D1x3SIsEly1vKXz6V4om6O9xicMs6c3BSA0+10FtVl9AuAFKDUnF/alx/KuK55U6SBZNuXXxPzkXbnU+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C4+gqMWnt1mN7688GpYZ1BPYmFeUUNl1LlrZGKPzRUM=; b=Ha76mAvjcHQ3c86TPPrEtByyA32Oky6sIRBoKHIvKnK8ox449IkrM1e1SrE15kawwEBF7d6vWoL2BQ8WSo1S9h0Kvxt8HQcoy2PJQvdaQwnAR6mFrqHuVOGnp5kcPimlln+GTac7FPeF6U1Cm+ArTO3h1RoNTk1CrlKScYKChP1fYSw9UYdQjX1r2btezHAiqAd11MrHckAFa+AVM4thO8tTLzBIdJSQy5tz10ZxzLUSluzX5UNCqzydfb4cJBt+1b0V1ocRX3diud+hXREKIGLkVsQUwmu5rmIHLeMhSE0FBMATy+ZfTMW5qOe1bhCeIy76IeXfTT4b/J01rkuo2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C4+gqMWnt1mN7688GpYZ1BPYmFeUUNl1LlrZGKPzRUM=; b=TkNxTPotS7aVqofCR3uQP+nffS/C+pIwM4Fis2y6LuFFdOhZy6W0DIP9NhSNseBWkUI80PHRu3iEAF0PCMjPDb44AKJ7n24CY0HDJlhHtf+Q7DAsAaGyerkdMQ63xJNBL6MrMCjdarHsHVRlvXT9xTcQWEtE/PParjINd8G8uhSdoSaNTxAykKYMWmKMGiop9nR7TpbGAQgl+W4nQLKz9nJp/Ex6ZC5CtlzCVUImbqzPCa3Zx9sjoCztVmBL7DNA1BNziE5uqHj4/mLFyrzWHHsoBlfmGL6Y1tGi/pDXQyrbRpdpwgDb6885EKOYdDoU4xABClA5N983zbUK8GkpBQ== Original-Received: from HE1EUR04FT027.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::4f) by HE1EUR04HT201.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::399) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.29; Sat, 27 Mar 2021 13:59:41 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:7e0d::40) by HE1EUR04FT027.mail.protection.outlook.com (2a01:111:e400:7e0d::286) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Sat, 27 Mar 2021 13:59:41 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:276740E633605311D5D8F3DD47869F0CAEF30E4EEBBF6649DFAE1847A5C75162; UpperCasedChecksum:CD4E3C06B5FC38B9B693442B51641BCB182A52FF2678F36AC9913D531B45D50E; SizeAsReceived:7568; Count:46 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b%6]) with mapi id 15.20.3977.031; Sat, 27 Mar 2021 13:59:41 +0000 In-Reply-To: (Jean Louis's message of "Sat, 27 Mar 2021 11:42:17 +0300") X-TMN: [X4I1xd3BYCg2v0qWf9zj72KFgv8zVEJO] X-ClientProxiedBy: AS8PR04CA0094.eurprd04.prod.outlook.com (2603:10a6:20b:31e::9) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <874kgwbstv.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AS8PR04CA0094.eurprd04.prod.outlook.com (2603:10a6:20b:31e::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25 via Frontend Transport; Sat, 27 Mar 2021 13:59:40 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 8ac1cabc-c088-492c-b07c-08d8f12890fb X-MS-TrafficTypeDiagnostic: HE1EUR04HT201: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g4RblOjgbbRYNemsXKUYnjfymXxEBI54BIr2J7LkJbCQTeVlJW05dxk5sDcKBKskpRw3Nf240qWncaDtOeJS/haasLi/pw0myRJQ0I4+vkT1lOaxAY8gCTBS5UdtoNh3paTv3BxnRZSlrmE23uCiLb1H5O4yWZxEgwcr2NHArk5Df4HOstibBY7T2ZAKyzohmcppr6DBeEALtpunCHPonskAyJvTlX3RCaCypKLDHidlpY1MYrLl901cJ73vmpq5Yo9sZ70z1GWADHcMB8S/BtohlPr0yOdV8f2uwNKkaJYyPMyz7k3UAsF6gOO/GHmkNL6pPtPFS1pMUAG9Rvxm4Z+gbN+Fuj25fckzOn68bTxmCUuvgvsoFxCf2jQG6fajS5spVRpqdhUe94xCd92mVA== X-MS-Exchange-AntiSpam-MessageData: FKQFaOQOs3RT81Pv+3aHC5/m7+4NhsD+UYKLbxfxkLPXsJhNXOux0Nh2EWVAQew8orC12qbbjueZJHo6DT1bfLS3hVFWj5gvQFgGQ1A/aARpJu8GA7kopjqP/nFrO+aAqF3MXjkwWDyR9b+H2QdfgQ== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ac1cabc-c088-492c-b07c-08d8f12890fb X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2021 13:59:41.0347 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT027.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT201 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203127 Archived-At: Jean Louis writes: > * Arthur Miller [2021-03-27 10:52]: >> Jean Louis writes: >> >> > In Dired, when using ! or & on a file, it should file if there is no >> > command supplied. >> > >> > This is what happens if I use ! on file ~/.asoundrc but without >> > supplying command, just pressing RET: >> > >> > /bin/bash: line 1: .asoundrc: command not found >> > >> > But it should not, if command is not supplied in: >> > (dired-do-shell-command COMMAND &optional ARG FILE-LIST) -- then it >> > shall rather silently fail or tell "Command not entered" or nothing to >> > do. >> >> Why is "Command not entered" to prefer to "Command not found"? > > It is meant as example, I leave those decisions to developers. > > Now I can see that ! and & without command are acting on the file as > the file should be executed. > > Let us say I have Screenshot.pl executable file, if I run ! on it, the > file is executed. Ja. I guess there is a shebang on it so bash invoked perl interpreter and executed the file. > This means there was attempt to execute ~/.asoundrc -- I find that > insecure and not logical. Ja. Because you invoked a command that will execute a script on a file. And since file wasn't executable it failed. So why is it insecured? > And I do not understand it quite how it works. Was there an attempt to > execute program with bash? How you seen the docs? For example C-h k ! RET: Signature (dired-do-shell-command COMMAND &optional ARG FILE-LIST) Documentation Run a shell command COMMAND on the marked files. > Why should there be attempt to execute non-executable files? Because you asked it to by calling ! or & on a file in Dired.