1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00

homed: fix parameter names on D-Bus methods

These arguments contain UserRecord structures serialized to JSON,
however only the "secret" part of it, not a whole user record. We do
this since the secret part is conceptually part of the user record and
in some contexts we need a user record in full with both secret and
non-secret part, and in others just the secret and in other just the
non-secret part, but we want to keep this in memory in the same logic.

Hence, let's rename the arguments where we expect a user record
consisting only of the secret part to "secret".
This commit is contained in:
Lennart Poettering 2020-05-12 09:02:47 +02:00
parent 671fee1873
commit 55842c7326
3 changed files with 40 additions and 40 deletions

View File

@ -65,30 +65,30 @@ node /org/freedesktop/home1 {
out o bus_path);
ListHomes(out a(susussso) home_areas);
ActivateHome(in s user_name,
in s user_record);
in s secret);
DeactivateHome(in s user_name);
RegisterHome(in s home_record);
RegisterHome(in s user_record);
UnregisterHome(in s user_name);
CreateHome(in s home_record);
CreateHome(in s user_record);
RealizeHome(in s user_name,
in s user_record);
in s secret);
RemoveHome(in s user_name);
FixateHome(in s user_name,
in s user_record);
in s secret);
AuthenticateHome(in s user_name,
in s user_record);
in s secret);
UpdateHome(in s user_record);
ResizeHome(in s user_name,
in t size,
in s user_record);
in s secret);
ChangePasswordHome(in s user_name,
in s new_user_record,
in s old_user_record);
in s new_secret,
in s old_secret);
LockHome(in s user_name);
UnlockHome(in s user_name,
in s user_record);
in s secret);
AcquireHome(in s user_name,
in s user_record,
in s secret,
in b please_suspend,
out h send_fd);
RefHome(in s user_name,
@ -229,21 +229,21 @@ node /org/freedesktop/home1 {
node /org/freedesktop/home1/home {
interface org.freedesktop.home1.Home {
methods:
Activate(in s user_record);
Activate(in s secret);
Deactivate();
Unregister();
Realize(in s user_record);
Realize(in s secret);
Remove();
Fixate(in s user_record);
Authenticate(in s user_record);
Fixate(in s secret);
Authenticate(in s secret);
Update(in s user_record);
Resize(in t size,
in s user_record);
ChangePassword(in s new_user_record,
in s old_user_record);
in s secret);
ChangePassword(in s new_secret,
in s old_secret);
Lock();
Unlock(in s user_record);
Acquire(in s user_record,
Unlock(in s secret);
Acquire(in s secret,
in b please_suspend,
out h send_fd);
Ref(in b please_suspend,

View File

@ -798,7 +798,7 @@ const sd_bus_vtable home_vtable[] = {
SD_BUS_METHOD_WITH_NAMES("Activate",
"s",
SD_BUS_PARAM(user_record),
SD_BUS_PARAM(secret),
NULL,,
bus_home_method_activate,
SD_BUS_VTABLE_SENSITIVE),
@ -806,7 +806,7 @@ const sd_bus_vtable home_vtable[] = {
SD_BUS_METHOD("Unregister", NULL, NULL, bus_home_method_unregister, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD_WITH_NAMES("Realize",
"s",
SD_BUS_PARAM(user_record),
SD_BUS_PARAM(secret),
NULL,,
bus_home_method_realize,
SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE),
@ -814,13 +814,13 @@ const sd_bus_vtable home_vtable[] = {
SD_BUS_METHOD("Remove", NULL, NULL, bus_home_method_remove, SD_BUS_VTABLE_UNPRIVILEGED),
SD_BUS_METHOD_WITH_NAMES("Fixate",
"s",
SD_BUS_PARAM(user_record),
SD_BUS_PARAM(secret),
NULL,,
bus_home_method_fixate,
SD_BUS_VTABLE_SENSITIVE),
SD_BUS_METHOD_WITH_NAMES("Authenticate",
"s",
SD_BUS_PARAM(user_record),
SD_BUS_PARAM(secret),
NULL,,
bus_home_method_authenticate,
SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE),
@ -833,27 +833,27 @@ const sd_bus_vtable home_vtable[] = {
SD_BUS_METHOD_WITH_NAMES("Resize",
"ts",
SD_BUS_PARAM(size)
SD_BUS_PARAM(user_record),
SD_BUS_PARAM(secret),
NULL,,
bus_home_method_resize,
SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE),
SD_BUS_METHOD_WITH_NAMES("ChangePassword",
"ss",
SD_BUS_PARAM(new_user_record)
SD_BUS_PARAM(old_user_record),
SD_BUS_PARAM(new_secret)
SD_BUS_PARAM(old_secret),
NULL,,
bus_home_method_change_password,
SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE),
SD_BUS_METHOD("Lock", NULL, NULL, bus_home_method_lock, 0),
SD_BUS_METHOD_WITH_NAMES("Unlock",
"s",
SD_BUS_PARAM(user_record),
SD_BUS_PARAM(secret),
NULL,,
bus_home_method_unlock,
SD_BUS_VTABLE_SENSITIVE),
SD_BUS_METHOD_WITH_NAMES("Acquire",
"sb",
SD_BUS_PARAM(user_record)
SD_BUS_PARAM(secret)
SD_BUS_PARAM(please_suspend),
"h",
SD_BUS_PARAM(send_fd),

View File

@ -661,7 +661,7 @@ static const sd_bus_vtable manager_vtable[] = {
SD_BUS_METHOD_WITH_NAMES("ActivateHome",
"ss",
SD_BUS_PARAM(user_name)
SD_BUS_PARAM(user_record),
SD_BUS_PARAM(secret),
NULL,,
method_activate_home,
SD_BUS_VTABLE_SENSITIVE),
@ -675,7 +675,7 @@ static const sd_bus_vtable manager_vtable[] = {
/* Add the JSON record to homed, but don't create actual $HOME */
SD_BUS_METHOD_WITH_NAMES("RegisterHome",
"s",
SD_BUS_PARAM(home_record),
SD_BUS_PARAM(user_record),
NULL,,
method_register_home,
SD_BUS_VTABLE_UNPRIVILEGED),
@ -691,7 +691,7 @@ static const sd_bus_vtable manager_vtable[] = {
/* Add JSON record, and create $HOME for it */
SD_BUS_METHOD_WITH_NAMES("CreateHome",
"s",
SD_BUS_PARAM(home_record),
SD_BUS_PARAM(user_record),
NULL,,
method_create_home,
SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE),
@ -700,7 +700,7 @@ static const sd_bus_vtable manager_vtable[] = {
SD_BUS_METHOD_WITH_NAMES("RealizeHome",
"ss",
SD_BUS_PARAM(user_name)
SD_BUS_PARAM(user_record),
SD_BUS_PARAM(secret),
NULL,,
method_realize_home,
SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE),
@ -717,7 +717,7 @@ static const sd_bus_vtable manager_vtable[] = {
SD_BUS_METHOD_WITH_NAMES("FixateHome",
"ss",
SD_BUS_PARAM(user_name)
SD_BUS_PARAM(user_record),
SD_BUS_PARAM(secret),
NULL,,
method_fixate_home,
SD_BUS_VTABLE_SENSITIVE),
@ -726,7 +726,7 @@ static const sd_bus_vtable manager_vtable[] = {
SD_BUS_METHOD_WITH_NAMES("AuthenticateHome",
"ss",
SD_BUS_PARAM(user_name)
SD_BUS_PARAM(user_record),
SD_BUS_PARAM(secret),
NULL,,
method_authenticate_home,
SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE),
@ -743,7 +743,7 @@ static const sd_bus_vtable manager_vtable[] = {
"sts",
SD_BUS_PARAM(user_name)
SD_BUS_PARAM(size)
SD_BUS_PARAM(user_record),
SD_BUS_PARAM(secret),
NULL,,
method_resize_home,
SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE),
@ -751,8 +751,8 @@ static const sd_bus_vtable manager_vtable[] = {
SD_BUS_METHOD_WITH_NAMES("ChangePasswordHome",
"sss",
SD_BUS_PARAM(user_name)
SD_BUS_PARAM(new_user_record)
SD_BUS_PARAM(old_user_record),
SD_BUS_PARAM(new_secret)
SD_BUS_PARAM(old_secret),
NULL,,
method_change_password_home,
SD_BUS_VTABLE_UNPRIVILEGED|SD_BUS_VTABLE_SENSITIVE),
@ -769,7 +769,7 @@ static const sd_bus_vtable manager_vtable[] = {
SD_BUS_METHOD_WITH_NAMES("UnlockHome",
"ss",
SD_BUS_PARAM(user_name)
SD_BUS_PARAM(user_record),
SD_BUS_PARAM(secret),
NULL,,
method_unlock_home,
SD_BUS_VTABLE_SENSITIVE),
@ -784,7 +784,7 @@ static const sd_bus_vtable manager_vtable[] = {
SD_BUS_METHOD_WITH_NAMES("AcquireHome",
"ssb",
SD_BUS_PARAM(user_name)
SD_BUS_PARAM(user_record)
SD_BUS_PARAM(secret)
SD_BUS_PARAM(please_suspend),
"h",
SD_BUS_PARAM(send_fd),