[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why do we have to support tmpfs for /var/run (policy changes in 3.8.1)



Russ Allbery schrieb:
> 
> I believe the original motivation for tmpfs /var/run in Solaris was that
> it was pointless to maintain scripts that try to clean /var/run (or /tmp
> or any other defined-transient directory) on boot, which can be dangerous
> and tricky if you don't write them carefully, when you can just put them

But this functionality is already there as Debian supports a static
/var/run and support for that is not going away. Maybe Petter can
comment if this ever posed any (security) problems.

> in tmpfs and have the cleaning happen automatically without doing any
> work.  It simplifies the boot process and eliminates a whole class of

I'm not sure I get that point. Why is the boot process simplified if now
every script has to check for it's run directory and potentially create
it or having to introduce fake boot scripts, which do nothing but create
a run directory.

> potential directory traversal races that you otherwise have to think
> about.  Potential additional boot speed from writing all the startup PID
> files to a tmpfs file system (and benefits for flash drives as the only
> system storage and similar special configurations) are just a bonus.

I doubt, that the boot process will be faster if I have to fork a shell
and create a run directory. And the /var/run directory is not something
that is constantly written at, so I also doubt that it will buy you much
of your flash drive life.

But let's be pragmatic, if we want to support both methods,  why should
we have to touch dozens (if not hundreds) of init script if I can do the
same with 10 lines of shell code (which does the backup/restore) and
this problem is solved today. I don't think this solution is less
elegant then fixing a myriad of init scripts.

I'm even willing to write such a patch and post it here for review.

Cheers,
Michael

P.S: That's it from my side for a while. I'll be waiting for comments
from other DDs first.

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: