[darcs-devel] darcs patch: Propagate opts to withRepoLock. (and 4 more)

Juliusz Chroboczek Juliusz.Chroboczek at pps.jussieu.fr
Thu Mar 30 14:48:29 PST 2006


> Sat Mar 25 21:51:50 CET 2006  Juliusz Chroboczek <jch at pps.jussieu.fr>
>   * Add options umask, uid and gid.

I've just dusted up my Unix textbooks, and had an orgy of reading
about the various ways of handling uids and gids.

The first conclusion is that Unix sucks.

The second conclusion is that while my patch is correct, it is
uselessly complex.  We don't need to rely on setresuid, on Unices that
get it right, we can simply use seteuid.  (I've checked 7th ed.,
4.4BSD, Linux, NetBSD, OpenBSD, 4.4BSD, SVR4 and POSIX.2001 -- V7
doesn't have saved ids, SVR4 is broken beyond repair as usual, but all
the others should work).

The third conclusion is that I'm not quite sure whether the uid and
gid part of the patch brings anything that cannot be done with the
sticky bit hack (a.k.a. BSD filesystem semantics).  So I'm half
tempted to just include the umask part, and write some docs about how
it can be used together with the sticky bit hack to centrally enfore
repository permissions.

Does anyone know if all modern Unices support the sticky bit hack?

                                        Juliusz






More information about the darcs-devel mailing list