Description of problem: gedit saves files via. the traditional method of: x = open_tmp_file() write_data(x) rename_orig_backup(); rename_tmp_orig(); ...but it doesn't copy the xattrs from the orig. to the tempfile, so ACLs, xattrs and SELinux context info. is all lost. Version-Release number of selected component (if applicable): current rawhide, FC5 How reproducible: always Additional info: I've created a patch for gedit which fixes this. NOTE: 1. You need to call: autoconf autoheader automake ...in the %build, due to needing to link to libattr etc.
Created attachment 133977 [details] patch to add full xattr copying to gedit
Hi James, we can apply this locally in rawhide, but would you mind filing the patch upstream as well?
*** Bug 202097 has been marked as a duplicate of this bug. ***
Also, would it be appropriate to give a similar treatment to g_file_set_contents() ?
Well, we document g_file_set_contents as explicitly not having those semantics: "On Unix, if filename already exists hard links to filename will break. Also since the file is recreated, existing permissions, access control lists, metadata etc. may be lost. If filename is a symbolic link, the link itself will be replaced, not the linked file."
Well, we say it _may_ be lost. We don't say it _will_ be lost. Looks like a quality-of-implementation issue to me.
fixed in the gedit that is in rawhide