Re: [patch for 1.6.2] dot-file locking



Very interesting.  Some comments:

1. Bugzilla is a far better place.  Please open a bug and
   attach the patch.

2. The guts of this ought to live in goffice, probably go-file.c

3. I don't think the mechanism to lock should be O_EXCL
    because it does not work with NFS.  Symlinks would
    work there, but might be an issue on Win32.

4. Please use g_get_host_name if available.  Alway use g_get_user_name.

5. You need to ensure that other people can read the lock
    files.

6. If $EVIL creates a 1GB fake lock file, will Gnumeric crash?

7. What about character set for the file?  Since the encoding of the username is
    not known, it appears that we can end up trying to display non-UTF8 text.
    (Same issue if $EVIL puts random binary stuff into a lockfile.)

8. You are writing a zero byte at the end of the file.  Worse, it looks like you
    depend on it being there when you read the file.

9. Things need to be translated, i.e., use _() as appropriate.

Morten



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]