]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
homed: fix parameter names on D-Bus methods
authorLennart Poettering <lennart@poettering.net>
Tue, 12 May 2020 07:02:47 +0000 (09:02 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 12 May 2020 09:06:46 +0000 (11:06 +0200)
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".

man/org.freedesktop.home1.xml
src/home/homed-home-bus.c
src/home/homed-manager-bus.c

index cb1e3a182ecf7e2e7710ac02c8e53c7727eaf578..3f1094595a97eab70c13aac3ca7ea0e63a84165a 100644 (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,
index af2ddce330b09db62a4a14fb671f8b16f20de14d..6be361a5aace96b4847e288c4b78a78b428e7ae2 100644 (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),
index 6306e12d394abc511e3805dd8af0f7676ac2eee6..ce6919a1a7f01cd098d54dbf9e27cbec6eae9184 100644 (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),