User: helm...@debian.org
Usertags: dep17p6
Control: retitle -1 empty directory /lib/rc/tmp may be lost during 
canonicalization

On Thu, Aug 31, 2023 at 04:04:28PM +0700, Timothy Kenno Handojo wrote:
> I've began conducting my investigation on the temporary files within /lib 
> directory.

The issue is not with temporary files, but with empty directories below
lib. openrc has exactly one and that is /lib/rc/tmp.
https://subdivi.de/~helmut/dep17.html explains the underlying problem in
section P6.

> Looking thru the source code itself, there's no mention of this directory 
> except for where it was defined & validated.
> 
> There is a github issue discussing this: 
> https://github.com/OpenRC/openrc/issues/339

That issue seems to be about whether the directory should be writeable.
A directory may be used for other purposes. I've seen e.g. a use where
an empty directory is being used as a temporary mount point during boot
before calling pivot_root. That also seems plausible in this case.
Absence could render openrc unbootable.

> It appears to have been stale for a while. I am inciting further discussion 
> in hope we can move further.

Yes, please. We need a good understanding for why this directory exists.

Maybe you can also try it empirically? Create a VM using openrc, delete
the directory and see what breaks. In particular, does it still boot?

If we figure that nothing breaks, removing /lib/rc/tmp from the package
by far is the simplest solution here. If there is a need, there are
other mitigations available.

Helmut

Reply via email to