Bug 30938

Summary: Improving behavior of /etc/periodic/daily/110.clean-tmps
Product: Base System Reporter: Udo Schweigert <ust>
Component: confAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me    
Priority: Normal    
Version: 1.0-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

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

Hi,

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 
directories.

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
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:38:46 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>