From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outbound.smtp.vt.edu ([198.82.183.121]:41039 "EHLO omr2.cc.vt.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752837AbcDZSln (ORCPT ); Tue, 26 Apr 2016 14:41:43 -0400 To: Al Viro Cc: Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] a corner case of open(2) From: Valdis.Kletnieks@vt.edu In-Reply-To: <20160426175538.GO25498@ZenIV.linux.org.uk> References: <20160426175538.GO25498@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1461696097_3054P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Tue, 26 Apr 2016 14:41:37 -0400 Message-ID: <89187.1461696097@turing-police.cc.vt.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: --==_Exmh_1461696097_3054P Content-Type: text/plain; charset=us-ascii On Tue, 26 Apr 2016 18:55:38 +0100, Al Viro said: > It is a change of user-visible behaviour, but I would be very > surprised if anything broke from that change. And it would help to simplify > the awful mess we have in there. I have to admit that over the past 3 decades of working with Unix-y systems, there's been a number of times I've had to resort to 'od -cx /your/dir/here' to debug issues (/bin/ls -fi is *almost* equivalent, but doesn't show holes in the directory) The biggest danger I can see is some shell script doing something like: foobar > $dir/$targetfile and $targetfile is unset. If we allow a program to get an open fd that refers to a directory, what are the semantics of various operations on that fd? --==_Exmh_1461696097_3054P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Exmh version 2.5 07/13/2001 iQIVAwUBVx+2YQdmEQWDXROgAQJiRA//VIg7aN+ZiC+YoR9bXVO1lQgDpK9V7BfB Bokf91QbIdhrOPkCFnbbNXnaLUSEA+Ui04JIuK62oIrqt4ym4PN6XHVl9xv+j0F7 HtBugCxyAAD8Lvf1kI3kq35r95VYrm6GLfxL5Z9+HNdeolNo5UxzBu0ozGlwa2E8 TxR1VBdG5iDM9UAtDeoVUsrrNHjVo4njFSucmUe1l4QfDy3Tuwjk+abaYw105C7O kVhS+RMe123CJHEx/XYKFZts/7l7pgmFghoL2csKNpFX9Q6R0id5HDsLoWaaVUbN HsiNEpQTxq++t2Xfb/b77DJsoUAqBejQkhHUCQeBGGXLA4hIsJ1GlGfY66+U8pQz jYnEr+6nRlul9uqkK/VfLPqE5zZfOtZ7Hos6kVQfABdupO2lC/mnuWh2wT0wxiQD bEdbzuZG0Q8Hp7Br2d4jsEGA2u6sf5Rr9G/rlX8rOl18Ba8RcRofxRksMYCPy2pr ppBvzXmpNuu56Y3Rxuw71kgarQF0D7t1N4Eaz1vLV4fExfhs5CYvlgIpsIFhJ2T/ n6xl5yJvxKuLaIdS/GHBKMD3AKpV60SU5WbCdWBHvRFjN8T3UPJFAf8EV7vDrwDC gPP0+iBTilKJitiT6JHLhoNzMHbTHj9w1pme3tnyhDCZJVViJMAjR8n6saUmGIS4 rSkVZxymHgI= =0EaS -----END PGP SIGNATURE----- --==_Exmh_1461696097_3054P--