log: don't create directories for fuzz builds

parent b61757b3
......@@ -502,7 +502,11 @@ static int build_dir(const char *name)
continue;
*p = '\0';
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
ret = lxc_unpriv(mkdir(n, 0755));
#else
ret = errno = EEXIST;
#endif /*!FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
*p = '/';
if (ret && errno != EEXIST)
return log_error_errno(-errno, errno, "Failed to create directory \"%s\"", n);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment