From 5d73e607e8f27bc58255a6dfe31978c236d9163e Mon Sep 17 00:00:00 2001 From: Alexis Mousset Date: Mon, 18 Jan 2016 14:55:14 +0100 Subject: [PATCH] Fixes #7797: Warn when the servers answers an empty string to a (S)OPENDIR --- ...-answers-to-opendir-with-empty-string.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 rudder-agent/SOURCES/patches/cfengine/0025-warn-when-server-answers-to-opendir-with-empty-string.patch diff --git a/rudder-agent/SOURCES/patches/cfengine/0025-warn-when-server-answers-to-opendir-with-empty-string.patch b/rudder-agent/SOURCES/patches/cfengine/0025-warn-when-server-answers-to-opendir-with-empty-string.patch new file mode 100644 index 000000000..6d13e5a64 --- /dev/null +++ b/rudder-agent/SOURCES/patches/cfengine/0025-warn-when-server-answers-to-opendir-with-empty-string.patch @@ -0,0 +1,18 @@ +diff -upr cfengine-3.6.0/libcfnet/client_code.c cfengine-3.6.0-new/libcfnet/client_code.c +--- cfengine-3.6.0/libcfnet/client_code.c 2014-06-11 16:13:56.000000000 +0200 ++++ cfengine-3.6.0-new/libcfnet/client_code.c 2016-01-18 14:51:30.015183919 +0100 +@@ -630,6 +630,14 @@ Item *RemoteDirList(const char *dirname, + DecryptString(conn->encryption_type, in, recvbuffer, conn->session_key, n); + } + ++ if (recvbuffer[0] == '\0') ++ { ++ Log(LOG_LEVEL_ERR, ++ "Empty%s server packet when listing directory '%s'!", ++ (start == NULL) ? " first" : "", ++ dirname); ++ } ++ + if (FailedProtoReply(recvbuffer)) + { + Log(LOG_LEVEL_INFO, "Network access to '%s:%s' denied", conn->this_server, dirname);