ctdb-protocol: Avoid fgets in ctdb_connection_list_read
authorAmitay Isaacs <amitay@gmail.com>
Wed, 11 Jul 2018 08:35:46 +0000 (18:35 +1000)
committerKarolin Seeger <kseeger@samba.org>
Tue, 26 Mar 2019 07:49:18 +0000 (07:49 +0000)
commitcd5f1904032e9fcb62ad8094addc841a6b9cb73a
tree64085415d944ece33d743beaf115f3ed49148fc0
parent2c89c38851874637e1a7c92ce913427279b1cbe6
ctdb-protocol: Avoid fgets in ctdb_connection_list_read

C library buffering API can behave in unexpected fashion if underlying
fd for stdin, stdout or stderr is closed and re-opened.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13520

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit c9b42d27e6cf9e6ae36f44970f0a388edc737a7a)
ctdb/protocol/protocol_util.c
ctdb/wscript