openssh/openssh-5.8p2-remove-stale-control-socket.patch

14 lines
567 B
Diff
Raw Normal View History

2011-06-09 14:10:59 +00:00
diff -up openssh-5.8p2/mux.c.remove_stale openssh-5.8p2/mux.c
--- openssh-5.8p2/mux.c.remove_stale 2011-01-14 02:01:32.000000000 +0100
+++ openssh-5.8p2/mux.c 2011-06-09 15:27:42.556360291 +0200
@@ -1867,6 +1867,9 @@ muxclient(const char *path)
unlink(path);
} else if (errno == ENOENT) {
debug("Control socket \"%.100s\" does not exist", path);
+ } else if (errno == ECONNREFUSED) {
+ debug("Removing stale control socket \"%.100s\"", path);
+ unlink(path);
} else {
error("Control socket connect(%.100s): %s", path,
strerror(errno));