SHA256
1
0
forked from pool/csync2

Accepting request 115599 from network:ha-clustering:Factory

Fix protocol breakage when target directories don't exist

OBS-URL: https://build.opensuse.org/request/show/115599
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/csync2?expand=0&rev=9
This commit is contained in:
Stephan Kulow 2012-05-03 08:54:54 +00:00 committed by Git OBS Bridge
commit c2cfe41323
3 changed files with 29 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Mar 19 12:51:03 UTC 2012 - tserong@suse.com
- Force debug output off completely when running under xinetd (fixes
protocol breakage when target directories don't exist; bnc#752563)
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 20 19:10:40 UTC 2012 - coolo@suse.com Mon Feb 20 19:10:40 UTC 2012 - coolo@suse.com

View File

@ -33,6 +33,7 @@ Patch1: fix-missing-sentinels.diff
Patch2: csync2-1.34-pure-gnutls-r2.patch Patch2: csync2-1.34-pure-gnutls-r2.patch
BuildRequires: pkg-config BuildRequires: pkg-config
%endif %endif
Patch3: force-debug-stderr-off-inetd.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(post): openssl Requires(post): openssl
Requires: gnutls Requires: gnutls
@ -64,6 +65,7 @@ and server farms.
%if 0%{?suse_version} > 1120 %if 0%{?suse_version} > 1120
%patch2 -p1 %patch2 -p1
%endif %endif
%patch3 -p1
install -p -m 644 %{SOURCE1} README.quickstart install -p -m 644 %{SOURCE1} README.quickstart
%build %build

View File

@ -0,0 +1,21 @@
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 ) {