]> git.eshelyaron.com Git - emacs.git/commit
emacsclient: fix symlink/socket race
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 3 Dec 2018 06:32:28 +0000 (22:32 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 3 Dec 2018 07:55:00 +0000 (23:55 -0800)
commit3e5d7755454bea9b6ffd232b1d115c629cdb193d
treee73573782b9b426fde071e978236c84311fc25f2
parente5634aae531ce932ecb8d84243d690c7ca89bec3
emacsclient: fix symlink/socket race

* lib-src/emacsclient.c (socket_status): New arg UID.
All uses changed.
(set_local_socket): Don’t create the unbound socket unless the
initial sanity checks on the socket file succeed; this
simplifies cleaning it up.  Check socket ownership again
after connecting, to fix a race (Bug#33366).
lib-src/emacsclient.c