]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/dissect-image.c
dissect-image: introduce new get_common_dissect_directory() helper
authorLennart Poettering <lennart@poettering.net>
Mon, 4 Dec 2023 17:15:41 +0000 (18:15 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 18 Jan 2024 01:30:10 +0000 (01:30 +0000)
commit2d1e7d19377b5addbbf59c30e357f72bc447ec65
tree181b57248524d438ebb95e261a16b65a09d42f3f
parent73a994cff0306642b84bac81f847fc8d0cace124
dissect-image: introduce new get_common_dissect_directory() helper

So far, if some component mounts a DDI in some local mount namespace we
created a temporary mountpoint in /tmp/ for that. Let's instead use the
same directory inode in /run/ instead. This is safe, since if everything
runs in a local mount namespace (with propagation on /run/ off) then
they shouldn't fight for the inode. And it relieves us from having to
clean up the directory after use. Morever, it allows us to run without
/tmp/ mounted.

This only moves dissect-image.c and the dissec tool over. More stuff is
moved over later.
src/dissect/dissect.c
src/shared/dissect-image.c
src/shared/dissect-image.h