Date: Fri, 15 May 2020 17:06:27 +0200 From: Arne Steinkamm <freebsd-hackers@Steinkamm.COM> To: Diane Bruce <db@db.net> Cc: "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net>, Arne Steinkamm <arne@steinkamm.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org>, freebsd-arch@freebsd.org Subject: Re: [HEADSUP] Disallowing read() of a directory fd Message-ID: <20200515150627.GY82984@trajan.stk.cx> In-Reply-To: <20200515144815.GA8265@night.db.net> References: <e5a21dd4-6c53-2dca-8fa8-387e2532b7c8@freebsd.org> <202005151247.04FClhsD086497@gndrsh.dnsmgr.net> <20200515144815.GA8265@night.db.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 15, 2020 at 10:48:15AM -0400, Diane Bruce wrote: > All I have to say on this noisy bikeshed is, let's resurrect the mkdir > bug of V7 because it's tradition and the BSD way and history and stuff. > (I only expect a few of you to remember this one.) Oh, this "bug" was alive until Sys V 3.2 times... Implementing mkdir as library function without a syscall wasn't a good idea. ken and dmr saw no reason to implement mkdir as atomic operation. So it was easy, even with a shell script, to jump between the mknod(2) and the chown(2) to replace the directory node with a symlink to /etc/passwd. This was from a todays point of view a stupid mistake. Reading a directory node is lightyears away from "a stupid mistake". Make it switchable with a sysctl switch... would be the best of both worlds. .//. Arne -- Arne Steinkamm | Home: Mail: arne<at>steinkamm<dot>com Tel.: +49.89.21031004 | Gröbenbachweg 13, 82178 Puchheim, GERMANY
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200515150627.GY82984>