[PATCH 7 of 7] chg: raise the length limit of socket path

Jun Wu quark at fb.com
Mon Apr 4 11:53:29 EDT 2016


On 04/04/2016 04:36 PM, Yuya Nishihara wrote:
> Simon's comment is interesting, but I don't see benefit to allow u-x on the
> socket dir. The socket dir shouldn't be world-accessible, and not be world-
> movable (to prevent local attack), but there should be no reason to hide it
> from the owner.

Okay. I will add a dirfd and only handle basenames then. Everything looks simpler!

> I meant CHGSOCKDIR would make more sense because we have more than one
> sockets and a lock file in it.

With chgserver.skiphash=True, the user probably wants a plain file path.
Advanced users or developers may want to specify file path as well.

I feel what chgserver uses is a set of files with a common prefix (basename),
instead of a directory. So two chg servers can use a same directory as long
as they use different basenames. The default lockfilepath should probably be 
changed to "dir/basename.lock" from "dir/lock".


More information about the Mercurial-devel mailing list