chiark / gitweb /
core: run each system service with a fresh session keyring
authorLennart Poettering <lennart@poettering.net>
Fri, 2 Dec 2016 00:54:41 +0000 (01:54 +0100)
committerSven Eden <yamakuzure@gmx.net>
Mon, 17 Jul 2017 15:58:35 +0000 (17:58 +0200)
commitea4774c2dd76bec7cb099f73ba75b9993e2132fe
treee9b7be7f8400f4c962b02665c979e2ae6c13b536
parentc1748bb202ab6f6aa4e5c17409ef83cf3ffdaa37
core: run each system service with a fresh session keyring

This patch ensures that each system service gets its own session kernel keyring
automatically, and implicitly. Without this a keyring is allocated for it
on-demand, but is then linked with the user's kernel keyring, which is OK
behaviour for logged in users, but not so much for system services.

With this change each service gets a session keyring that is specific to the
service and ceases to exist when the service is shut down. The session keyring
is not linked up with the user keyring and keys hence only search within the
session boundaries by default.

(This is useful in a later commit to store per-service material in the keyring,
for example the invocation ID)

(With input from David Howells)
src/basic/missing.h