File pacemaker-libcrmcommon-async-connection-callback-negative-error-codes.patch of Package pacemaker.14737
commit b758762e74e73b4f592e1764131abdb75094db55
Author: Ken Gaillot <kgaillot@redhat.com>
Date: Wed Oct 25 16:39:09 2017 -0500
Low: libcrmcommon: async connection callback must get negative error codes
check_connect_finished() mistakenly set rc to errno in one case,
but a positive rc value is interpreted as a socket fd by the callback.
Use -errno instead.
diff --git a/lib/common/remote.c b/lib/common/remote.c
index 05a780606..d19ddbbe8 100644
--- a/lib/common/remote.c
+++ b/lib/common/remote.c
@@ -697,7 +697,7 @@ check_connect_finished(gpointer userdata)
rc = select(sock + 1, &rset, &wset, NULL, &ts);
if (rc < 0) {
- rc = errno;
+ rc = -errno;
if ((errno == EINPROGRESS) || (errno == EAGAIN)) {
/* reschedule if there is still time left */
if ((time(NULL) - cb_data->start) < (cb_data->timeout / 1000)) {