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

Bug#610667: /etc/init.d/x11-common: Please clear /tmp/.ICE-unix on boot



On Thu, Jan 20, 2011 at 16:28:18 -0800, Josh Triplett wrote:

> Package: x11-common
> Version: 1:7.5+8
> Severity: normal
> File: /etc/init.d/x11-common
> 
> As a workaround for bug 584491, please consider clearing /tmp/.ICE-unix
> on boot.  The sockets in that directory don't sensibly survive a reboot
> anyway, and leaving them around will eventually cause some program using
> ICE to fail due to reuse of a PID.
> 
The problem with removing stuff in /tmp is as it's a world-writable
location you'd need to be careful not to remove too much.  It's fine for
bootclean since that only ever runs on boot before anybody has access to
the machine, but since /etc/init.d/x11-common also runs on package
installation it's a bit tricky.  It was suggested on irc to remove the [
! -d ${SOCKET,ICE}_DIR ] test from set_up_socket_dir and set_up_ice_dir
before moving it away.  We should probably also use mktemp for the
rename rather than just the shell's pid.  There's still a race there,
though.  Maybe checking that $SOCKET_DIR and $ICE_DIR aren't
symlinks after the mkdir would improve things a bit to avoid chmod'ing
random stuff.

Cheers,
Julien



Reply to: