<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-CA" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<div id="mail-editor-reference-message-container">
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">> > Hi everyone,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> ><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> > The system manager (as of v253) executes generators in a sandbox with a fresh tmpfs mount on /tmp:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> ><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> > https://github.com/systemd/systemd/blob/a526b9ddfc03a290f20a65c0a73792e73029f1b8/src/core/manager.c#L4274<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> ><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> > Looking at the code, it appears that there is no way to disable that using, say, an environment variable or a config file setting.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> ><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> > Is that correct?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> Yes.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> Generators run during earliest boot, where /tmp/ is quite likely not<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> mounted yet, hence generators do not have access to the system's /tmp/<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">> and get a transient one.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks for your reply.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Is my second statement also correct?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">i.e. is there no way to prevent mounting a private /tmp when executing generators using something like an environment variable or config setting?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I see the condition !MANAGER_IS_TEST_RUN(m) guards the flag FORK_PRIVATE_TMP but that seems to be just for testing.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">-James M<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>