Re: zero-length symlinks

2013-11-05 Thread David Laight
On Sun, Nov 03, 2013 at 04:35:19PM -0800, John Nemeth wrote: It has to do with the fact that historically mkdir(2) was actually mkdir(3), it wasn't an atomic syscall and was a sequence of operation performed by a library routine... Actually I think you'll find that mkdir way always a

Re: zero-length symlinks

2013-11-05 Thread Michael van Elst
da...@l8s.co.uk (David Laight) writes: Actually I think you'll find that mkdir way always a system call. It was directory rename that was done with a series of link and unlink system calls. mkdir(1) did a sequence of mknod,chown,link,link if you believe the public sys3 sources. According to

Re: zero-length symlinks

2013-11-05 Thread Christos Zoulas
In article 20131105220754.gb...@snowdrop.l8s.co.uk, David Laight da...@l8s.co.uk wrote: On Sun, Nov 03, 2013 at 04:35:19PM -0800, John Nemeth wrote: It has to do with the fact that historically mkdir(2) was actually mkdir(3), it wasn't an atomic syscall and was a sequence of operation

Re: zero-length symlinks

2013-11-03 Thread Hubert Feyrer
On Sat, 2 Nov 2013, David Holland wrote: I think not sensible is not a good enough reason to prohibit something. Yeah yeah, but still nowadays we don't allow adding hard links to directories. So while that's a valid premise, it's not universal. FWIW, the idea not allowing hard links to

Re: zero-length symlinks

2013-11-03 Thread Sverre Froyen
On 2013-11-03, at 11:47, Hubert Feyrer hub...@feyrer.de wrote: On Sat, 2 Nov 2013, David Holland wrote: I think not sensible is not a good enough reason to prohibit something. Yeah yeah, but still nowadays we don't allow adding hard links to directories. So while that's a valid premise,

Re: zero-length symlinks

2013-11-03 Thread John Nemeth
On Nov 3, 2:57pm, Sverre Froyen wrote: } On 2013-11-03, at 11:47, Hubert Feyrer hub...@feyrer.de wrote: } On Sat, 2 Nov 2013, David Holland wrote: } I think not sensible is not a good enough reason to prohibit } something. } } Yeah yeah, but still nowadays we don't allow adding hard links

Re: zero-length symlinks

2013-11-03 Thread Mouse
On Unix System V, the link command would allow hard-linking directories when used as root. Also, recently enough that at least some versions of NetBSD do it, unlink(2) performed by root on the last non-. link to a directory would silently orphan the directory, requiring fsck to fix. I've long

Re: zero-length symlinks

2013-11-03 Thread David Holland
On Sun, Nov 03, 2013 at 07:48:54PM -0500, Mouse wrote: On Unix System V, the link command would allow hard-linking directories when used as root. Also, recently enough that at least some versions of NetBSD do it, unlink(2) performed by root on the last non-. link to a directory would

Re: zero-length symlinks

2013-11-03 Thread Johnny Billquist
On 2013-11-03 22:57, Sverre Froyen wrote: On 2013-11-03, at 11:47, Hubert Feyrer hub...@feyrer.de wrote: On Sat, 2 Nov 2013, David Holland wrote: I think not sensible is not a good enough reason to prohibit something. Yeah yeah, but still nowadays we don't allow adding hard links to

Re: zero-length symlinks

2013-11-02 Thread Alan Barrett
On Fri, 01 Nov 2013, David Holland wrote: rmind@ points out that it's possible to create zero-length symlinks. As zero-length symlinks aren't sensible, this should probably be prohibited. Does anyone see any reason they shouldn't be? Symlink names should satisfy all the rules for file

Re: zero-length symlinks

2013-11-02 Thread Hubert Feyrer
Does anyone see any reason they shouldn't be? If it ain't broken don't fix it? Hubert smime.p7s Description: S/MIME cryptographic signature

Re: zero-length symlinks

2013-11-02 Thread David Holland
On Fri, Nov 01, 2013 at 01:17:50PM -0400, Mouse wrote: As zero-length symlinks aren't sensible, this should probably be prohibited. Does anyone see any reason they shouldn't be? I think not sensible is not a good enough reason to prohibit something. Yeah yeah, but still nowadays we

zero-length symlinks

2013-11-01 Thread David Holland
rmind@ points out that it's possible to create zero-length symlinks. As zero-length symlinks aren't sensible, this should probably be prohibited. Does anyone see any reason they shouldn't be? (rmind wants me to post this message for some reason) -- David A. Holland dholl...@netbsd.org

Re: zero-length symlinks

2013-11-01 Thread Greg Troxel
David Holland dholland-t...@netbsd.org writes: rmind@ points out that it's possible to create zero-length symlinks. As zero-length symlinks aren't sensible, this should probably be prohibited. Does anyone see any reason they shouldn't be? What does POSIX say? I note that one can't creaet

Re: zero-length symlinks

2013-11-01 Thread Paul Goyette
On Fri, 1 Nov 2013, David Holland wrote: rmind@ points out that it's possible to create zero-length symlinks. As zero-length symlinks aren't sensible, this should probably be prohibited. Does anyone see any reason they shouldn't be? Prohibiting them seems reasonable to me - I cannot imagine

Re: zero-length symlinks

2013-11-01 Thread Mouse
rmind@ points out that it's possible to create zero-length symlinks. Does this mean symlinks with zero-length names or symlinks with zero-length link-to strings? If you mean the former, then I agree, but the object's being a symlink has nothing to do with it. The rest of this email assumes you

Re: zero-length symlinks

2013-11-01 Thread Jonathan A. Kollasch
http://lwn.net/Articles/551224/ http://austingroupbugs.net/view.php?id=649 On Fri, Nov 01, 2013 at 04:47:35PM +, David Holland wrote: rmind@ points out that it's possible to create zero-length symlinks. As zero-length symlinks aren't sensible, this should probably be prohibited. Does

Re: zero-length symlinks

2013-11-01 Thread dieter roelants
On Fri, 1 Nov 2013 09:58:19 -0700 (PDT) Paul Goyette p...@whooppee.com wrote: On Fri, 1 Nov 2013, David Holland wrote: rmind@ points out that it's possible to create zero-length symlinks. As zero-length symlinks aren't sensible, this should probably be prohibited. Does anyone see any

Re: zero-length symlinks

2013-11-01 Thread Taylor R Campbell
Date: Fri, 1 Nov 2013 16:47:35 + From: David Holland dholland-t...@netbsd.org rmind@ points out that it's possible to create zero-length symlinks. As zero-length symlinks aren't sensible, this should probably be prohibited. Does anyone see any reason they shouldn't be? Some