[PATCH 1 of 5 V2] chgserver: use basename for socket symlink

Yuya Nishihara yuya at tcha.org
Sat Mar 5 04:43:00 EST 2016


On Fri, 4 Mar 2016 13:28:54 +0000, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1457097482 0
> #      Fri Mar 04 13:18:02 2016 +0000
> # Node ID 8868538a8a0d5ca8f36f0bdea8d11192ff4e8ca0
> # Parent  e00e57d836535aadcb13337613d2f891492d8e04
> chgserver: use basename for socket symlink
> 
> Previously we use full path and the symlink may point to outside (unsafe)
> world if the directory is moved. This patch fixes it by only linking to
> basename of the target. Therefore the symbolic link and socket files will
> always stay in the same directory.

Queued this one. Thanks for the detailed explanation.


More information about the Mercurial-devel mailing list