From 8f0dbbd7584f6caa898c60e63bca15a354f3857d Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Tue, 20 Feb 2024 22:38:42 +0100 Subject: [PATCH] homectl: make sure we sent the full 8 bytes as flags Otherwise weird stuff happens on the other side: [1217111.957263] testsuite-46.sh[61]: + homectl create test-user --disk-size=min --luks-discard=yes --image-path=/home/test-user.home --luks-pbkdf-type=pbkdf2 --luks-pbkdf-time-cost=1ms [1217112.598219] homectl[66]: Operation on home test-user failed: Provided flags are unsupported (0ad2578000000000). (taken from TEST-46-HOME run on armv7l) Fixes issue mentioned in https://github.com/systemd/systemd/pull/31419#issuecomment-1955117397. --- src/home/homectl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/home/homectl.c b/src/home/homectl.c index 3a839c73eaa..4afdff74c03 100644 --- a/src/home/homectl.c +++ b/src/home/homectl.c @@ -1481,7 +1481,7 @@ static int create_home_common(JsonVariant *input) { if (r < 0) return bus_log_create_error(r); - r = sd_bus_message_append(m, "t", 0); + r = sd_bus_message_append(m, "t", UINT64_C(0)); if (r < 0) return bus_log_create_error(r); @@ -1777,7 +1777,7 @@ static int update_home(int argc, char *argv[], void *userdata) { if (r < 0) return bus_log_create_error(r); - r = sd_bus_message_append(m, "t", 0); + r = sd_bus_message_append(m, "t", UINT64_C(0)); if (r < 0) return bus_log_create_error(r); -- 2.47.3