1 diff -u -r ../openssh-7.1p1/mux.c ./mux.c
2 --- ../openssh-7.1p1/mux.c 2015-08-21 00:49:03.000000000 -0400
3 +++ ./mux.c 2015-12-17 19:20:36.368902909 -0500
7 /* Now atomically "move" the mux socket into position */
9 + /* Android does not support hard links, so use a non-atomic
10 + check-then-rename for now. */
11 + if (access(orig_control_path, F_OK) == 0) {
12 + error("ControlSocket %s already exists, disabling multiplexing",
14 + unlink(options.control_path);
15 + goto disable_mux_master;
17 + if (rename(options.control_path, orig_control_path) == -1) {
18 + fatal("%s: link mux listener %s => %s: %s", __func__,
19 + options.control_path, orig_control_path,
24 if (link(options.control_path, orig_control_path) != 0) {
25 if (errno != EEXIST) {
26 fatal("%s: link mux listener %s => %s: %s", __func__,
28 goto disable_mux_master;
30 unlink(options.control_path);
32 free(options.control_path);
33 options.control_path = orig_control_path;