From: Frantisek Sumsal Date: Tue, 20 Feb 2024 21:38:42 +0000 (+0100) Subject: homectl: make sure we sent the full 8 bytes as flags X-Git-Tag: v256-rc1~793 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f0dbbd7584f6caa898c60e63bca15a354f3857d;p=thirdparty%2Fsystemd.git 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. --- 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);