Merge pull request #8744 from Icinga/bugfix/unnecessary-chown-8743

NodeUtility::WriteNodeConfigObjects(): avoid unneccessary Utility::SetFileOwnership()
This commit is contained in:
Julian Brost 2023-02-01 14:27:46 +01:00 committed by GitHub
commit 2b43354080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,10 +160,6 @@ bool NodeUtility::WriteNodeConfigObjects(const String& filename, const Array::Pt
Log(LogWarning, "cli")
<< "Cannot set ownership for user '" << user << "' group '" << group << "' on path '" << path << "'. Verify it yourself!";
}
if (!Utility::SetFileOwnership(filename, user, group)) {
Log(LogWarning, "cli")
<< "Cannot set ownership for user '" << user << "' group '" << group << "' on path '" << path << "'. Verify it yourself!";
}
std::fstream fp;
String tempFilename = Utility::CreateTempFile(filename + ".XXXXXX", 0644, fp);