[Pkg-xfce-devel] Bug#583922: thunar: does not check return value of close() when copying files
John Lindgren
john.lindgren at tds.net
Mon May 31 17:10:19 UTC 2010
Package: thunar
Version: 1.0.1-4
Severity: normal
thunar-vfs/thunar-vfs-io-local-xfer.c:334: close (target_fd);
There is no check for errors, contrary to what is recommended by "man 2
close":
Not checking the return value of close() is a common but
nevertheless serious programming error. It is quite possible
that errors on a previous write(2) operation are first reported
at the final close(). Not checking the return value when
closing the file may lead to silent loss of data. This can
especially be observed with NFS and with disk quota.
Actually, the files should be synced to disk before closing them in
order to check for I/O errors:
A successful close does not guarantee that the data has been
successfully saved to disk, as the kernel defers writes. It is
not common for a file system to flush the buffers when the
stream is closed. If you need to be sure that the data is
physically stored use fsync(2). (It will depend on the disk
hardware at this point.)
John Lindgren
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages thunar depends on:
ii desktop-file-utils 0.15-2 Utilities for .desktop files
ii exo-utils 0.3.106-2 Utility files for libexo
ii libatk1.0-0 1.30.0-1 The ATK accessibility toolkit
ii libc6 2.10.2-9 Embedded GNU C Library: Shared lib
ii libcairo2 1.8.10-4 The Cairo 2D vector graphics libra
ii libdbus-1-3 1.2.24-1 simple interprocess messaging syst
ii libdbus-glib-1-2 0.86-1 simple interprocess messaging syst
ii libexo-0.3-0 0.3.106-2 Library with extensions for Xfce
ii libfreetype6 2.3.11-1 FreeType 2 font engine, shared lib
ii libglib2.0-0 2.24.1-1 The GLib library of C routines
ii libgtk2.0-0 2.20.1-1 The GTK+ graphical user interface
ii libice6 2:1.0.6-1 X11 Inter-Client Exchange library
ii libpango1.0-0 1.28.0-1 Layout and rendering of internatio
ii libsm6 2:1.1.1-1 X11 Session Management library
ii libthunar-vfs-1-2 1.0.1-4 VFS abstraction used in thunar
ii libx11-6 2:1.3.3-3 X11 client-side library
ii libxfce4util4 4.6.1-2 Utility functions library for Xfce
ii shared-mime-info 0.71-1 FreeDesktop.org shared MIME databa
ii thunar-data 1.0.1-4 Provides thunar documentation, ico
Versions of packages thunar recommends:
ii dbus-x11 1.2.1-5+lenny1 simple interprocess messaging syst
ii gamin 0.1.10-2+b1 File and directory monitoring syst
ii hal 0.5.14-2 Hardware Abstraction Layer
ii thunar-volman 0.3.80-4 Thunar extension for volumes manag
pn xdg-user-dirs <none> (no description available)
ii xfce4-panel 4.6.3-1 The Xfce4 desktop environment pane
Versions of packages thunar suggests:
pn thunar-archive-plugin <none> (no description available)
pn thunar-media-tags-plugin <none> (no description available)
-- no debconf information
More information about the Pkg-xfce-devel
mailing list