Re: Hard links to directories
Re: Hard links to directories
- Subject: Re: Hard links to directories
- From: Mike Tegtmeyer <email@hidden>
- Date: Thu, 2 Oct 2008 21:14:31 -0400
I'm not sure they are doing what you are accusing them of. Every
flavor of *nix that supports it has some nonportable nuance. Hard
linking to directories is implementation defined behavior-end of
story. See http://www.opengroup.org/onlinepubs/009695399/functions/link.html
In most circles, this means that the implementors can do whatever
stable or unstable thing pleases them, especially since it really
isn't documented. This could very well be a .01 release that only
works in the specific case of how time machine is using it.
In short, it is hard to get mad at flakey behavior when your playing
around with the bleeding edge.
My .02,
Mike
On Oct 2, 2008, at 8:50 PM, Chris Idou wrote:
Remember when Microsoft was busted using secret APIs to make their
in-house apps better than anyone else's apps, and everyone though
that stunk and was anti-competitive?
I don't see why this sort of stuff should be considered some kind of
private detail of Time Machine. Especially since it is in the
kernel, and the API is a public one. The behavior of the API is
undocumented, but it shouldn't be. The behavior of all public APIs
should be fully documented and available to all.
BTW, I do realise that linking directories is pretty dangerous, but
that's in large part because none of the utilities or libraries take
the possibility into account. This is part of the reason I'm
interested in how it behaves.
--- On Thu, 10/2/08, Kevin Elliott <email@hidden> wrote:
From: Kevin Elliott <email@hidden>
Subject: Re: Hard links to directories
To: email@hidden
Cc: email@hidden
Date: Thursday, October 2, 2008, 3:32 PM
On Oct 1, 2008, at 8:00 PM, Chris Idou wrote:
>
> A couple more questions:
>
> 1) How do permissions work? I notice that the system seems to stop
> you doing dangerous things like hardlinking /System to somewhere,
> even as root, but its not clear why this case is different.
Can't shed any light on that. As someone else has mentioned,
directory hard links should effectively be considered SPI. If you
want help understanding them so you can work better with TimeMachine,
that's great. If you think you can use them to solve some other
unrelated problem, then your making a mistake and should reconsider
what your trying to
do.
> 2) I notice that once a directory has been hardlinked, it is forever
> tainted in some fashion. If I hardlink a directory somewhere, then
> unlink the 2nd link, then the original directory can never be
> trashed in the Finder for example. Such an attempt will fail, even
> though it is apparently no different to any other directory. Can
> anyone enlighten me about this?
Yes, that's true. The first time a directory is hard linked, both
directories become hard links. Once something is hard linked, there
is no concept of the "original" directory, just 1 or more hard links.
Not sure why the finders failing- I'd have to give it a try and look
into it further. At the very least, you should probably file a bug.
-Kevin Elliott
email@hidden
http://web.mac.com/kelliott/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden