Project

General

Profile

« Previous | Next » 

Revision c7c93807

Added by Alexis Mousset over 7 years ago

Fixes #9809: Broken CFEngine patch in 4.0 branch

View differences:

rudder-agent/SOURCES/patches/cfengine/31-fix-symlink-traversal.patch
while (next_component)
{
char *component = next_component;
@@ -528,7 +532,9 @@ int safe_open(const char *pathname, int flags, ...)
@@ -528,7 +532,13 @@ int safe_open(const char *pathname, int flags, ...)
close(currentfd);
return -1;
}
......
if ((dirfd = safe_open(parent_dir, O_RDONLY)) == -1)
{
@@ -702,7 +709,10 @@ static int safe_open_true_parent_dir(const char *path,
@@ -702,7 +709,14 @@ static int safe_open_true_parent_dir(const char *path,
goto cleanup;
}

Also available in: Unified diff