The following patch fixes some inconveniences I came around.
First thing is to have a diffent setting of the amount of a time an empty
directory is deleted after. This is in the current version a little bit
annoying because if there are subdirectories in /tmp all the files in it
are deleted by the script, which changes the modification time of this
directory and thus the directory will be deleted only after another period
according to $daily_clean_tmps_days.
Second thing deals with the ssh-agent sockets created by sshd in /tmp. If
you do not shutdown the ssh-connection properly (which can be caused when
using ssh over a dial-in connection) these sockets fill-up /tmp because
sockets are never deleted from /tmp.
The attached fix is in action here on all my servers for a reasonable amount
of time (at least two months on -current and -stable) so I'm pretty confident
that it won't cause problems.
> >Number: 30938
> >Category: conf
> >Synopsis: Improving behavior of /etc/periodic/daily/110.clean-tmps
While I appreciate the problems here (I have exactly the same
problems here), I'm not sure if these solutions are the best that
could be come up with.
In the first case (where directories aren't being deleted at the
right time), maybe a better solution is to delete all empty
In the second case (ssh leaving stuff around), I think the bug in ssh
should really be fixed. Failing this, maybe the best solution is to
include special files in the list of deletion candidates.
Brian <email@example.com> <brian@Awfulhak.org>
Don't _EVER_ lose your sense of humour ! <brian@[uk.]OpenBSD.org>
For bugs matching the following criteria:
Status: In Progress Changed: (is less than) 2014-06-01
Reset to default assignee and clear in-progress tags.
Mail being skipped