From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17601 invoked by alias); 12 Jun 2017 15:10:53 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 41274 Received: (qmail 12587 invoked from network); 12 Jun 2017 15:10:53 -0000 X-Qmail-Scanner-Diagnostics: from mail-wr0-f194.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.128.194):SA:0(0.0/5.0):. Processed in 1.782758 secs); 12 Jun 2017 15:10:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: stephane.chazelas@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.128.194 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fw+Uq3CwBry8Occr+Kqya63sVyionKVVq5LTYhJ4XZ8=; b=ROIm9CS5O8bS/4m32bQifWJOJdOrMaKnBOat22Cr8PAINEnc1v8pX+1nwqhw9gpx5U PYxL1sVGOE6HbnP+4prAbYQxXb6KmCNk3PVhf2xbpyoGWDsr9spWV2Sff767+Es8uOG0 +Bv8Bs4b8x4ys/A8lcTgRXdAbjeOVvU43CymVHVgiEv31vV6dRCOuWsGVeexLezk9tlz eYvtYXAA8Mh5a5IDPnlMZ8IDDrNBt47iuB9qQeRX6jtmUdynBuosu/k4gM9jzKBLyscE FUZ43AZBk5gUsmbJO7SCE0HX7bzi2Avs8tw8PzuB5biLQXnYUpNNpEIX+eEuB/At3PPf r6Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=fw+Uq3CwBry8Occr+Kqya63sVyionKVVq5LTYhJ4XZ8=; b=sru+2t/wmVR7vR/MxtjGG3VMzo6jGurh0ojvlfick7bQEm67oPb3Wj0WNW7LPsQZJk P7tqWH6RDi5//te/NbhRB4QZWp9egRV9LmgRZ2MxmHJUZKGOjTRWH13Kn1X7vkdqs/NW nhpVfZ7k4xTo/6Ubyg6lI1zZ5d0fg0CBjurnSYc8GGqdQ+IAJJrXf8J1HrNjk0cHBxWy 6pXXOxSbdgZDFPixK5gavQbBnLe6qj7yai77INGbkymVeTxvL6+oy8PYqQUNHcXOJt9y 6alsKySM8der8+Fm6h9lPk72Exu7cAHotXGs3qYoIhmVjR9wte6+fuyUjYKxHBNFYVPJ JsSA== X-Gm-Message-State: AKS2vOwjlf/M1zl2N/fc5R5cXd1BLeXe8/2/6+t9I0gq7G8AEwlaWPzZ BvTC8Ix6KzThaA== X-Received: by 10.28.228.84 with SMTP id b81mr8359539wmh.78.1497280244891; Mon, 12 Jun 2017 08:10:44 -0700 (PDT) Date: Mon, 12 Jun 2017 16:10:42 +0100 From: Stephane Chazelas To: Daniel Shahaf Cc: zsh-workers@zsh.org, Eric Cook Subject: Re: [PATCH2] Re: avoid closed stdin() in zle widgets Message-ID: <20170612151042.GB3806@chaz.gmail.com> Mail-Followup-To: Daniel Shahaf , zsh-workers@zsh.org, Eric Cook References: <20170611182045.GA5318@chaz.gmail.com> <20170612060554.GA4709@chaz.gmail.com> <1497278089.1853864.1006670720.0A8DB74D@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1497278089.1853864.1006670720.0A8DB74D@webmail.messagingengine.com> User-Agent: Mutt/1.5.24 (2015-08-30) 2017-06-12 14:34:49 +0000, Daniel Shahaf: [...] > Incompatible changes should be mentioned in NEWS or README. [...] > I'm not convinced that the change should be made. Devil's advocate > argues that this is a bug in dircolors(1), so (a) as an immediate > workaround, people with a buggy dircolors(1) command should redirect > stdin from /dev/null when invoking it, (b) those people should fix their > dircolors(1) command to not assume fd 0 is open. [...] While I agree there's a bug in dircolors, closing stdin, stdout or stderr is widely regarded as antisocial and bad practice (a number of security vulnerabilities could be exploited in the past by closing 0,1,2. glibc does reopen stdin on /dev/full and stdout/stderr on /dev/null (apparently) when they are closed when running in setid/setgid (AT_SECURE) executables to guard against this type of abuse). -- Stephane