Bug 30938 - [patch] Improving behavior of /etc/periodic/daily/110.clean-tmps
Summary: [patch] Improving behavior of /etc/periodic/daily/110.clean-tmps
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 1.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2001-09-30 19:40 UTC by Udo Schweigert
Modified: 2017-12-31 22:37 UTC (History)
0 users

See Also:

file.diff (3.65 KB, patch)
2001-09-30 19:40 UTC, Udo Schweigert
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Udo Schweigert 2001-09-30 19:40:00 UTC
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.
Comment 1 brian 2001-10-01 16:26:50 UTC
> >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 <brian@freebsd-services.com>                <brian@Awfulhak.org>
      http://www.freebsd-services.com/        <brian@[uk.]FreeBSD.org>
Don't _EVER_ lose your sense of humour !      <brian@[uk.]OpenBSD.org>
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:01 UTC
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