mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
sd-id128: also refuse an empty invocation ID
This commit is contained in:
parent
786b652c89
commit
75fa1f25c0
@ -139,7 +139,8 @@
|
||||
|
||||
<listitem><para>Returned by <function>sd_id128_get_machine()</function> and
|
||||
<function>sd_id128_get_machine_app_specific()</function> when <filename>/etc/machine-id</filename>
|
||||
is empty or all zeros.</para></listitem>
|
||||
is empty or all zeros. Also returned by <function>sd_id128_get_invocation()</function> when the
|
||||
invocation ID is all zeros.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
|
@ -284,6 +284,9 @@ _public_ int sd_id128_get_invocation(sd_id128_t *ret) {
|
||||
r = get_invocation_from_keyring(&saved_invocation_id);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (sd_id128_is_null(saved_invocation_id))
|
||||
return -ENOMEDIUM;
|
||||
}
|
||||
|
||||
if (ret)
|
||||
|
Loading…
Reference in New Issue
Block a user