[systemd-devel] [PATCH 1/2] Don't clean /var/lock/subsys or /var/run/user; they're not aged content.

Bill Nottingham notting at redhat.com
Tue Oct 26 08:26:33 PDT 2010


Lennart Poettering (lennart at poettering.net) said: 
> In a number of ways:
> 
> - Primarily it is nearly impossible to use /tmp safely to place a communication
>   socket in: on one hand you need to establish a non-random name, so that
>   client and server find each other. On the other hand you must choose a
>   random name to avoid DoS vulnerabilities that some other user might
>   take away your names in /tmp and all your software doesn't
>   break. (With major hacks one can work around this, but it's awful and
>   almost nobody gets it right -- I did it in PA, and I am not proud of it)
> 
> - The lifetime of XDG_RUNTIME_DIR is strictly bound to the user
>   actually being logged in. i.e. pam_systemd removes the dir when you log
>   out. /tmp doesn't have that.

... if this is the case, I'm not sure why it needs periodically cleaned.
If it's specifically tied to the length of the session, and cleaned up on
exit, there's no reason to have periodic cleaning of it.

Bill


More information about the systemd-devel mailing list