[darcs-users] it would be useful for patch-tag to turn off hard linking for darcs storage. can anyone suggest how to do that?

Thomas Hartman thomashartman1 at googlemail.com
Sun Dec 20 04:27:08 UTC 2009


Sure, though it's a little involved.

Patch-Tag uses unix security for securing repos. When several users
share a private repo, they are all on the same linux group, and the
repo has rwxs for that group.

However, darcs also has a global cache for patches (and whatever
objects are under _darcs/hashed.inventory)

These patches are shared across repos using hard links.

So, what happens if you have two repos, with two owners, some hashes
in common? The hardlinked file objects can only belong to one group,
so somebody is not going to be able to access that repo.

In practice this happened rarely (I think! I hope!), and I think this
is because most users had the patches cached locally. It did happen
though.

I finally resolved the problem by making everything under _darcs world
readable. Since the parent directory (repo root for a particular repo)
is world invisible, the effect is that the hardlinked file objects are
shared by everybody that should have access to them, without
compromising security.



On Sat, Dec 19, 2009 at 9:24 AM, Max Battcher <me at worldmaker.net> wrote:
> On 12/19/2009 12:06, Thomas Hartman wrote:
>>
>> Never mind, I think I found a better way around this problem.
>
> For reference, I'm curious what problem you've had with hard linking, if you
> are willing to discuss it.
>
> --
> --Max Battcher--
> http://worldmaker.net
> _______________________________________________
> darcs-users mailing list
> darcs-users at darcs.net
> http://lists.osuosl.org/mailman/listinfo/darcs-users
>



-- 
Need somewhere to put your code? http://patch-tag.com
Want to build a webapp? http://happstack.com


More information about the darcs-users mailing list