diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-08-26 14:03:14 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-09-02 13:17:29 +0200 |
commit | fa96afb4c4ad1d5e82839dddb686398601784d53 (patch) | |
tree | 1543df08a125e06e2344b69a856f261eeb93eb19 /man | |
parent | id128: allow combining --app with show (diff) | |
download | systemd-fa96afb4c4ad1d5e82839dddb686398601784d53.tar.xz systemd-fa96afb4c4ad1d5e82839dddb686398601784d53.zip |
sd-id128: do not allow null 'app_id' param
If it is null, we get the 'base' param unchanged:
$ build/systemd-id128 show 00000000000000000000000000000001 \
--app-specific=00000000000000000000000000000000
00000000000000000000000000000001
This is not good, because it breaks our promise that the base (usually either
machine-id or boot-id) cannot be derived from the result. Some application
using the library could use a null app id, inadvertently exposing the machine
or boot id. (This could happen because of forgotten initialization, or maybe
because the app id is configurable, and the user configures it wrongly.)
Note: the other way the secret is not exposed:
$ build/systemd-id128 show 00000000000000000000000000000000 \
--app-specific=00000000000000000000000000000002
4f63080959264900b0d88d999dae2d3a
Normally systemd would not allow a null machine-id or boot-id, but we can let
the user do the calculation that if they want to.
Diffstat (limited to 'man')
-rw-r--r-- | man/sd_id128_get_machine.xml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/man/sd_id128_get_machine.xml b/man/sd_id128_get_machine.xml index fc13ae50f4..31e4b02d9b 100644 --- a/man/sd_id128_get_machine.xml +++ b/man/sd_id128_get_machine.xml @@ -198,7 +198,10 @@ <term><constant>-ENXIO</constant></term> <listitem><para>Returned by <function>sd_id128_get_invocation()</function> if no invocation ID is - set.</para> + set. Also returned by <function>sd_id128_get_app_specific()</function>, + <function>sd_id128_get_machine_app_specific()</function>, and + <function>sd_id128_get_boot_app_specific()</function> when the <parameter>app_id</parameter> + parameter is all zeros.</para> <xi:include href="version-info.xml" xpointer="v242"/></listitem> </varlistentry> |