<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - tests depend on /etc/machine-id"
href="https://bugs.freedesktop.org/show_bug.cgi?id=62344#c3">Comment # 3</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - tests depend on /etc/machine-id"
href="https://bugs.freedesktop.org/show_bug.cgi?id=62344">bug 62344</a>
from <span class="vcard"><a class="email" href="mailto:martin.pitt@ubuntu.com" title="Martin Pitt <martin.pitt@ubuntu.com>"> <span class="fn">Martin Pitt</span></a>
</span></b>
<pre>Would it be acceptable to do something like this, and set it in the tests?
- fd = open("/etc/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY);
+ machine_id_path = getenv("SYSTEMD_MACHINE_ID_PATH");
+ if (machine_id_path == NULL)
+ machine_id_path = "/etc/machine-id";
+ fd = open(machine_id_path, O_RDONLY|O_CLOEXEC|O_NOCTTY);
Security wise it should not matter much, as you can also use LD_PRELOAD to
divert the path.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>