|
|
9fc0f6 |
From a76f607703911f314fea41148ef7c23fac20029d Mon Sep 17 00:00:00 2001
|
|
|
9fc0f6 |
From: Harald Hoyer <harald@redhat.com>
|
|
|
9fc0f6 |
Date: Wed, 30 Oct 2013 18:22:49 +0100
|
|
|
9fc0f6 |
Subject: [PATCH] remove user@.service
|
|
|
9fc0f6 |
|
|
|
9fc0f6 |
fixes rhbz#1019738
|
|
|
9fc0f6 |
---
|
|
|
9fc0f6 |
Makefile.am | 2 --
|
|
|
9fc0f6 |
src/login/logind-user.c | 42 ------------------------------------------
|
|
|
9fc0f6 |
2 files changed, 44 deletions(-)
|
|
|
9fc0f6 |
|
|
|
9fc0f6 |
diff --git a/Makefile.am b/Makefile.am
|
|
|
9fc0f6 |
index f4867d9..df63275 100644
|
|
|
9fc0f6 |
--- a/Makefile.am
|
|
|
9fc0f6 |
+++ b/Makefile.am
|
|
|
9fc0f6 |
@@ -437,7 +437,6 @@ nodist_systemunit_DATA = \
|
|
|
9fc0f6 |
units/systemd-sysctl.service \
|
|
|
9fc0f6 |
units/emergency.service \
|
|
|
9fc0f6 |
units/rescue.service \
|
|
|
9fc0f6 |
- units/user@.service \
|
|
|
9fc0f6 |
units/systemd-hibernate.service \
|
|
|
9fc0f6 |
units/systemd-hybrid-sleep.service \
|
|
|
9fc0f6 |
units/systemd-suspend.service \
|
|
|
9fc0f6 |
@@ -486,7 +485,6 @@ EXTRA_DIST += \
|
|
|
9fc0f6 |
units/user/systemd-exit.service.in \
|
|
|
9fc0f6 |
units/systemd-fsck@.service.in \
|
|
|
9fc0f6 |
units/systemd-fsck-root.service.in \
|
|
|
9fc0f6 |
- units/user@.service.in \
|
|
|
9fc0f6 |
units/systemd-udevd.service \
|
|
|
9fc0f6 |
units/systemd-udev-trigger.service \
|
|
|
9fc0f6 |
units/systemd-udev-settle.service \
|
|
|
9fc0f6 |
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
|
|
|
9fc0f6 |
index b87311c..8e7256b 100644
|
|
|
9fc0f6 |
--- a/src/login/logind-user.c
|
|
|
9fc0f6 |
+++ b/src/login/logind-user.c
|
|
|
9fc0f6 |
@@ -365,43 +365,6 @@ static int user_start_slice(User *u) {
|
|
|
9fc0f6 |
return 0;
|
|
|
9fc0f6 |
}
|
|
|
9fc0f6 |
|
|
|
9fc0f6 |
-static int user_start_service(User *u) {
|
|
|
9fc0f6 |
- DBusError error;
|
|
|
9fc0f6 |
- char *job;
|
|
|
9fc0f6 |
- int r;
|
|
|
9fc0f6 |
-
|
|
|
9fc0f6 |
- assert(u);
|
|
|
9fc0f6 |
-
|
|
|
9fc0f6 |
- dbus_error_init(&error);
|
|
|
9fc0f6 |
-
|
|
|
9fc0f6 |
- if (!u->service) {
|
|
|
9fc0f6 |
- char lu[DECIMAL_STR_MAX(unsigned long) + 1], *service;
|
|
|
9fc0f6 |
- sprintf(lu, "%lu", (unsigned long) u->uid);
|
|
|
9fc0f6 |
-
|
|
|
9fc0f6 |
- service = unit_name_build("user", lu, ".service");
|
|
|
9fc0f6 |
- if (!service)
|
|
|
9fc0f6 |
- return log_oom();
|
|
|
9fc0f6 |
-
|
|
|
9fc0f6 |
- r = manager_start_unit(u->manager, service, &error, &job;;
|
|
|
9fc0f6 |
- if (r < 0) {
|
|
|
9fc0f6 |
- log_error("Failed to start user service: %s", bus_error(&error, r));
|
|
|
9fc0f6 |
- dbus_error_free(&error);
|
|
|
9fc0f6 |
-
|
|
|
9fc0f6 |
- free(service);
|
|
|
9fc0f6 |
- } else {
|
|
|
9fc0f6 |
- u->service = service;
|
|
|
9fc0f6 |
-
|
|
|
9fc0f6 |
- free(u->service_job);
|
|
|
9fc0f6 |
- u->service_job = job;
|
|
|
9fc0f6 |
- }
|
|
|
9fc0f6 |
- }
|
|
|
9fc0f6 |
-
|
|
|
9fc0f6 |
- if (u->service)
|
|
|
9fc0f6 |
- hashmap_put(u->manager->user_units, u->service, u);
|
|
|
9fc0f6 |
-
|
|
|
9fc0f6 |
- return 0;
|
|
|
9fc0f6 |
-}
|
|
|
9fc0f6 |
-
|
|
|
9fc0f6 |
int user_start(User *u) {
|
|
|
9fc0f6 |
int r;
|
|
|
9fc0f6 |
|
|
|
9fc0f6 |
@@ -422,11 +385,6 @@ int user_start(User *u) {
|
|
|
9fc0f6 |
if (r < 0)
|
|
|
9fc0f6 |
return r;
|
|
|
9fc0f6 |
|
|
|
9fc0f6 |
- /* Spawn user systemd */
|
|
|
9fc0f6 |
- r = user_start_service(u);
|
|
|
9fc0f6 |
- if (r < 0)
|
|
|
9fc0f6 |
- return r;
|
|
|
9fc0f6 |
-
|
|
|
9fc0f6 |
if (!dual_timestamp_is_set(&u->timestamp))
|
|
|
9fc0f6 |
dual_timestamp_get(&u->timestamp);
|
|
|
9fc0f6 |
|