/tmp/ is world writable, so there is no guarantee that one process will
be the first to write to a file anyway. The case of "another process
replaced it after deletion" is the same as "another process got there
first on boot", and cannot be avoided. Anything using /tmp/ needs to be
aware of this, and only use safe and non-guessable subdirectories, for
example via mkdtemp, and need to use O_NOFOLLOW and friends when
opening, and so on and so forth.

Or just do not use /tmp/ for functionality-critical files, and use
RuntimeDirectory= instead which is managed correctly, without any hassle
for the program.

If any of the above is _really_ not possible, then such package needs to
ship a drop-in in /usr/lib/tmpfles.d/ instructing sd-tmpfiles to leave a
specific path or pattern alone.

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to xorg in Ubuntu.
https://bugs.launchpad.net/bugs/2088268

Title:
  systemd /tmp cleaning removes files that it shouldn't

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2088268/+subscriptions


_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to     : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp

Reply via email to