GNOME Bugzilla – Bug 547412
Temporary directories not deleted
Last modified: 2014-04-23 07:33:09 UTC
After a user has logged in and logged out 6 directories whose name starts with gvfs-<username> are left. They are in /var/tmp or /tmp/<username>. Five are created by gvfsd-trash and one by gvfsd-burn. They are created when daemon_handle_get_connection calls generate_addresses. A temporary directory whose name starts with virtual-<name> is also created. It is created by try_mount in gvfsbackendburn.c.
Does gvfs need a program like linc-cleanup-sockets?
I have noticed that the directory starting with virtual-<username> is empty after login. The directories starting with gvfs-<username> contain one socket socket2 which is dead.
In each of the temporary directories two sockets socket1 and socket2 are created. Subsequently socket1 is unlinked but socket2 is not. There is a call to unlink socket2 in unix_socket_at() but this is called before the socket is created. There is a call to rmdir the temporary directory in new_conection_data_free but this fails with EEXIST. This call is made before socket1 is unlinked so even if socket2 were unlinked the call would this fail.
Does this patch look right and fix your problem ? Index: daemon/gvfsdaemon.c =================================================================== --- daemon/gvfsdaemon.c (revision 1885) +++ daemon/gvfsdaemon.c (working copy) @@ -684,7 +684,6 @@ strncpy (&addr.sun_path[1], path, path_len); #else /* USE_ABSTRACT_SOCKETS */ strncpy (addr.sun_path, path, path_len); - unlink (path); #endif /* ! USE_ABSTRACT_SOCKETS */ if (bind (fd, (struct sockaddr*) &addr, @@ -694,6 +693,10 @@ return -1; } +#ifndef USE_ABSTRACT_SOCKETS + unlink (path); +#endif + if (listen (fd, 30 /* backlog */) < 0) { close (fd);
This patch does not fix the problem.
I think bug #581711 should be dupped on this one.
*** Bug 581711 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 720482 ***