Paolo Bonzini wrote: > "sed -i" bothers. ... hard links ... the choice > to break them or keep them must be done uniformly on all platforms
This choice has been already been made public in sed's documentation: "This option specifies that files are to be edited in-place. GNU `sed' does this by creating a temporary file and sending output to this file rather than to the standard output.(1). This option implies `-s'. When the end of the file is reached, the temporary file is renamed to the output file's original name." > it must recreate the file (*) and then copy it > to the old file name. In doing so it must copy the security context > just like it copies UIDs, GIDs, modes and ACLs. So this means: 1) The existing module 'copy-file' (used e.g. by gettext when creating backup files) should be updated to copy also the selinux context of the file. Anyone knows how to do that? 2) We should also have a module that creates a new, empty file with the security context (uid, gid, mode, ACL and selinux context) of a given file. Bruno