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

Yuya Nishihara yuya at tcha.org
Tue Apr 5 09:43:07 EDT 2016


On Mon, 4 Apr 2016 16:53:29 +0100, Jun Wu wrote:
> On 04/04/2016 04:36 PM, Yuya Nishihara wrote:
> > 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.

Even with skiphash=True, chg should create (or test) a private directory. A
bare socket file can be insecure as chg tries to connect to it and spawns new
server if failed to connect.

I've initially added CHGSOCKNAME only for testing purpose, so it doesn't ensure
that the socket path is good. That is my fault.

> 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".

What's the benefit of it? I don't think users would care much how sockets were
managed.


More information about the Mercurial-devel mailing list