tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: zero-length symlinks
In article <20131105220754.GB295%snowdrop.l8s.co.uk@localhost>,
David Laight <david%l8s.co.uk@localhost> 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 performed by a library routine...
>
>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.
Nope, on 4.1BSD and I believe SVR1 (please correct me),
it was a setuid binary that did:
mknod("foo", 040000, 0);
chown("foo", getuid());
link("foo", "foo/.");
link(".", "foo/..");
>Also, if you look at any current fs code the processing of "." and
>".." is special - they will be treated as requests for the current
>and parent directories regardless of the inodes they reference.
>Doing otherwise is a complete locking nightmare!
I think that this also came much later. I believe with 4.4BSD.
christos
Home |
Main Index |
Thread Index |
Old Index