csync2/force-debug-stderr-off-inetd.patch
2012-04-23 11:14:02 +00:00

22 lines
750 B
Diff

Index: csync2-1.34/csync2.c
===================================================================
--- csync2-1.34.orig/csync2.c
+++ csync2-1.34/csync2.c
@@ -458,6 +458,16 @@ int main(int argc, char ** argv)
for (i=0; myhostname[i]; i++)
myhostname[i] = tolower(myhostname[i]);
+ if ( mode == MODE_INETD ) {
+ /* Force debug level below zero when running under inetd,
+ * else stderr junk may be emitted back to some other host
+ * which breaks the protocol. One case is where a target
+ * directory does not exist resulting in allegations of
+ * I/O error during rsync write (bnc#752563)
+ */
+ csync_debug_level = -1;
+ }
+
/* Stand-alone server mode. This is a hack..
*/
if ( mode == MODE_SERVER || mode == MODE_SINGLE ) {