hostnamed: if polkit authentication fails for Varlink Describe() call, don't reply...
authorLennart Poettering <lennart@poettering.net>
Thu, 27 Jun 2024 08:09:45 +0000 (10:09 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 27 Jun 2024 08:43:21 +0000 (10:43 +0200)
commitb6464e80d65fd5bfd9e6206ee305f0da9c88c096
treef895d6f30701569e2acea4c6eeef3a3c1528e5bc
parentfbdb7854a5f681fd1a981ca202e9f26651fd16b7
hostnamed: if polkit authentication fails for Varlink Describe() call, don't reply to client with an error

The logic of the Describe() call was supposed to be: if we can acquire
the PK priv to get the product UUID then let's return the product UUID,
and if we cannot then return the data without it.

This didn't work however, since the polkit varlink glue would
immediately propagate the error it acquired from polkit its own client.
Let's turn this off, optionally, so that hostnamed can handle this
nicely.
src/hostname/hostnamed.c
src/shared/bus-polkit.c
src/shared/bus-polkit.h