GNOME Bugzilla – Bug 168581
Save functionality is unsafe
Last modified: 2005-03-31 15:10:36 UTC
Please describe the problem: Due to a problem I still have to figure out (I guess some kind of library mismatch), the XML saver failed, with Fout bij opslaan bestand. Niet in staat om module bestand "/usr/lib/gnumeric/1.4.2/plugins/xml_sax/xml_sax" te openen /usr/lib/gnumeric/1.4.2/plugins/xml_sax/xml_sax.so: undefined symbol: g_assert_warning (error while saving, cannot open module xml_sax ) At this point, the to-be-written file is truncated. I was editing an existing file, and lost it completely. This is unacceptable. (Version : gnumeric 1.4.2 from Fedora Core 3) No backup is made before Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Other information: I think the proper behavior for saving file is to move the file to a backup, write the new file, and (optionally) unlink the old one.
Your suggested method requires more liberal permissions on the target directory. The "critical" part of coure is really that your installation is apparently messed up.
There is really nothing we can do if someone miscompiles Gnumeric. What distribution? (I am guessing Fedora.) *** This bug has been marked as a duplicate of 165709 ***
You are misinterpreting my bugreport. The point is not that there's something wrong, but that Gnumeric removes the old file before writing the new file, creating a window of opportunity where program errors lead to lost data. IMO, this is inexcusable. Said directory was owned by me and had permissions 775. How much more liberal should the permissions be? Distribution is FC3 - but as I explained this is besides the point.
sorry, messed up previous comment. It should read The point is not that there's something wrong with the binary/distribution, but but that Gnumeric removes the old file before writing the new file, creating a window of opportunity where program errors lead to lost data. IMO, this is inexcusable.
I actually didn't mean to mark this as a dupe. I wonder how I did that. We write to a temporary file, then rename that on top after we're done. I wonder if libgsf has the ability to abort a write in the middle.
aha, so this is really curious. Any idea how I could debug this?
Re the missing symbol, please have a look at http://groups-beta.google.com/group/linux.debian.bugs.dist/browse_thread/thread/542235315cc85aea/1637a732079fa0f8?q=gnumeric&rnum=3#1637a732079fa0f8 Re the overwrite, I believe this is fixed in libgsf (cvs HEAD branch).
Fixed in cvs HEAD, between libgsf, goffice, and gnumeric.