summaryrefslogtreecommitdiffstats
path: root/src/home/homed-home-bus.c
diff options
context:
space:
mode:
authorAdrian Vovk <adrianvovk@gmail.com>2024-02-01 17:43:48 +0100
committerLuca Boccassi <bluca@debian.org>2024-03-23 02:05:13 +0100
commit5ec87d577f92effe27a62e965e02a6f9a40f81cc (patch)
treed0984780f9c9358ad21eaac19c3c9a6a8527df49 /src/home/homed-home-bus.c
parenthomework: Always upload volume key to keyring (diff)
downloadsystemd-5ec87d577f92effe27a62e965e02a6f9a40f81cc.tar.xz
systemd-5ec87d577f92effe27a62e965e02a6f9a40f81cc.zip
homework: Accept volume key from keyring
This bypasses authentication (i.e. user_record_authenticate) if the volume key was loaded from the keyring and no secret section is provided. This also changes Update() and Resize() to always try and load the volume key from the keyring. This makes the secret section optional for these methods while still letting them function (as long as the home area is active)
Diffstat (limited to 'src/home/homed-home-bus.c')
-rw-r--r--src/home/homed-home-bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/home/homed-home-bus.c b/src/home/homed-home-bus.c
index 624cbdb3d3..dd3603efa7 100644
--- a/src/home/homed-home-bus.c
+++ b/src/home/homed-home-bus.c
@@ -473,7 +473,7 @@ int bus_home_method_update(
assert(message);
- r = bus_message_read_home_record(message, USER_RECORD_REQUIRE_REGULAR|USER_RECORD_REQUIRE_SECRET|USER_RECORD_ALLOW_PRIVILEGED|USER_RECORD_ALLOW_PER_MACHINE|USER_RECORD_ALLOW_SIGNATURE|USER_RECORD_PERMISSIVE, &hr, error);
+ r = bus_message_read_home_record(message, USER_RECORD_REQUIRE_REGULAR|USER_RECORD_ALLOW_SECRET|USER_RECORD_ALLOW_PRIVILEGED|USER_RECORD_ALLOW_PER_MACHINE|USER_RECORD_ALLOW_SIGNATURE|USER_RECORD_PERMISSIVE, &hr, error);
if (r < 0)
return r;
@@ -521,7 +521,7 @@ int bus_home_method_resize(
if (r == 0)
return 1; /* Will call us back */
- r = home_resize(h, sz, secret, /* automatic= */ false, error);
+ r = home_resize(h, sz, secret, error);
if (r < 0)
return r;