]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/login/logind-dbus.c
logind: use SD_BUS_ERROR_ACCESS_DENIED
[thirdparty/systemd.git] / src / login / logind-dbus.c
index 5fdf28ced07a43722357b719eb9d5f3ccdc6225f..a657b6ece3f5e7fe44c4fb154d86a03182612bc9 100644 (file)
@@ -1191,7 +1191,8 @@ static int method_release_session(sd_bus_message *message, void *userdata, sd_bu
                 return r;
 
         if (session != sender_session)
-                return sd_bus_error_set(error, BUS_ERROR_NOT_IN_CONTROL, "You are not in control of this session");
+                return sd_bus_error_set(error, SD_BUS_ERROR_ACCESS_DENIED,
+                                        "Refused to release session, since it doesn't match the one of the client");
 
         r = session_release(session);
         if (r < 0)