+static int session_start_scope(Session *s) {
+ int r = 0;
+
+ assert(s);
+ assert(s->user);
+ assert(s->user->slice);
+
+ if (!s->scope) {
+ _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+ _cleanup_free_ char *description = NULL;
+ char *scope = NULL; //, *job = NULL;
+
+ description = strjoin("Session ", s->id, " of user ", s->user->name, NULL);
+ if (!description)
+ return log_oom();
+
+ scope = strjoin("session-", s->id, ".scope", NULL);
+ if (!scope)
+ return log_oom();
+
+/// elogind : Do not try to use dbus to call systemd
+#if 0
+ r = manager_start_scope(s->manager, scope, s->leader, s->user->slice, description, "logind.service", "systemd-user-sessions.service", &error, &job);
+#endif // 0
+ if (r < 0) {
+ log_error("Failed to start session scope %s: %s %s",
+ scope, bus_error_message(&error, r), error.name);
+ free(scope);
+ return r;
+ } else {
+ s->scope = scope;
+/// elogind does not support scope jobs
+#if 0
+ free(s->scope_job);
+ s->scope_job = job;
+#endif // 0
+ }
+ }
+
+ if (s->scope)
+ hashmap_put(s->manager->session_units, s->scope, s);
+
+ return 0;
+}
+