Skip to content

Commit

Permalink
homectl: make sure we sent the full 8 bytes as flags
Browse files Browse the repository at this point in the history
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 systemd#31419 (comment).
  • Loading branch information
mrc0mmand committed Feb 20, 2024
1 parent ce3fa38 commit 460cc18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/home/homectl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 460cc18

Please sign in to comment.