-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #862 from amousset/bug_7793/random_wrong_or_partia…
…l_copy_of_promises_from_node_to_server Fixes #7793: Random wrong or partial copy of promises from node to server
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
rudder-agent/SOURCES/patches/cfengine/0025-check-empty-response-dirlist-after-decrypt.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff -upr cfengine-3.7.1-old/libcfnet/client_code.c cfengine-3.7.1/libcfnet/client_code.c | ||
--- cfengine-3.7.1-old/libcfnet/client_code.c 2016-01-18 14:25:43.404660718 +0100 | ||
+++ cfengine-3.7.1/libcfnet/client_code.c 2016-01-18 14:28:06.454387620 +0100 | ||
@@ -348,6 +348,13 @@ Item *RemoteDirList(const char *dirname, | ||
goto err; | ||
} | ||
|
||
+ if (encrypt) | ||
+ { | ||
+ memcpy(in, recvbuffer, nbytes); | ||
+ DecryptString(conn->encryption_type, in, recvbuffer, | ||
+ conn->session_key, nbytes); | ||
+ } | ||
+ | ||
if (recvbuffer[0] == '\0') | ||
{ | ||
Log(LOG_LEVEL_ERR, | ||
@@ -357,13 +364,6 @@ Item *RemoteDirList(const char *dirname, | ||
goto err; | ||
} | ||
|
||
- if (encrypt) | ||
- { | ||
- memcpy(in, recvbuffer, nbytes); | ||
- DecryptString(conn->encryption_type, in, recvbuffer, | ||
- conn->session_key, nbytes); | ||
- } | ||
- | ||
if (FailedProtoReply(recvbuffer)) | ||
{ | ||
Log(LOG_LEVEL_INFO, "Network access to '%s:%s' denied", conn->this_server, dirname); |