Cert Manager currently creates a new file with the same content during Certificate::copyCertificate function but doesn’t preserve the file metadata(uid,gid,rwx etc.) from the original file. It's a nice to have feature if both content and file metadata are preserved during the copy. This would be useful for security software running later on to validate the file's integrity and authenticity.
This is achievable by utilizing the cp command. PCM will issue a std::system call to ask the underlying host environment's command processor to execute the cp -fp call.
This PR doesn't change any current business logic to any existing code that depends on PCM.
Cert Manager currently creates a new file with the same content during Certificate::copyCertificate function but doesn’t preserve the file metadata(uid,gid,rwx etc.) from the original file. It's a nice to have feature if both content and file metadata are preserved during the copy. This would be useful for security software running later on to validate the file's integrity and authenticity.
This is achievable by utilizing the
cp
command. PCM will issue a std::system call to ask the underlying host environment's command processor to execute thecp -fp
call.This PR doesn't change any current business logic to any existing code that depends on PCM.