Bug 8204

Summary: Systemd creates illimated number of nodes in /var/tmp
Product: Mageia Reporter: Juergen Harms <juergen.harms>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: Normal CC: cazzaniga.sandro, mageia
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: msec CVE:
Status comment:

Description Juergen Harms 2012-11-25 17:53:53 CET
Description of problem:

msec keeps sending warnings that there are world-writable nodes in /var/tmp/. The important problem however is the number of such nodes. There doesnt appear to be a limit - since I have installed Alpha2 I have accumulated 180 nodes  (/var/tmp/systend-private-...). In installations with tight storage that might lead to problems.


Version-Release number of selected component (if applicable):
systemd-195-2.mga3

How reproducible:
100%

Steps to Reproduce:
1. Look at the email messages sent by msec
Manuel Hiebel 2012-11-25 21:39:25 CET

CC: (none) => cazzaniga.sandro, mageia
Source RPM: (none) => msec

Comment 1 Colin Guthrie 2012-11-25 23:42:37 CET
These tend to accumulate over time when things are not shut down cleanly for whatever reason.

You can generally rmdir them happily (especially so if you're about to do a reboot anyway).

In addition, they are marked as temp (chmod +t) and as such I think msec should be modified to ignore them.
Comment 2 Juergen Harms 2012-11-26 08:50:44 CET
Yes - we had this kind of discussion when systemd appeared in Mageia2. You can do it, I can do it - Mr. Everybody wont or cant. This is not a bug "I" need fixed, it is a bug Mageia should fix.

I think that an honorable distro should keep itself "clean". That is low priority, but I thought that pre-release time when the dust has settled over urgent issues is the right moment.

In the discussion we had at that time, it was also mentioned, that hundreds of noise messages in the output of msec risk to hide the one message that is really important to be dealt with.
Comment 3 Juergen Harms 2012-12-02 06:56:27 CET
I have now added a file to my /etc/tmpfiles.d with the contents of 
R /var/tmp/systemd-private-*

That solves the problem, might be used "officially" (or append such an item to /etc/tmpfiles.d/mandriva.conf)
Comment 4 Colin Guthrie 2013-01-27 16:45:41 CET
Note that upstream now ships a rule to clean files in /tmp and /var/tmp after 10 and 30 days respectively.

However there are some caveats here. The exclusion of certain directories (namely the systemd-private ones is certainly required to prevent breaking running services)

Overall this behaviour should allow for nicer cleanup, but the old directories will likely still stick around until the feature is fully implemented.

See here:
http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/6874/focus=6928

So while I've backported the X type for now, the real cleanup will be in systemd itself rather than tmpfiles. Of course this doesn't really prevent them building up on a crashed system. I'll see what upstream thinks about that scenario.
Comment 5 Colin Guthrie 2013-01-27 16:47:48 CET
Ultimately I'm going to close this as upstream I think. It will be fixed in time, but I don't want to add any hacks in the short term. Hope that's OK.

[Note: I cannot resolve as "Upstream" here, so will pick "Works for Me" instead.... it's not really what I'm saying, but I hope you get the gist.

Status: NEW => RESOLVED
Resolution: (none) => WORKSFORME