naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
923a60
From cd37b8d217cc240074f8ff77f1986551f6c8834a Mon Sep 17 00:00:00 2001
923a60
From: Lukas Nykryn <lnykryn@redhat.com>
923a60
Date: Fri, 14 Nov 2014 17:32:10 +0100
923a60
Subject: [PATCH] remove user@.service
923a60
923a60
Conflicts:
923a60
	Makefile.am
923a60
---
923a60
 Makefile.am             |  2 --
923a60
 src/login/logind-user.c | 38 --------------------------------------
923a60
 2 files changed, 40 deletions(-)
923a60
923a60
diff --git a/Makefile.am b/Makefile.am
923a60
index bf04d31840..75459f74d3 100644
923a60
--- a/Makefile.am
923a60
+++ b/Makefile.am
923a60
@@ -535,7 +535,6 @@ nodist_systemunit_DATA = \
923a60
 	units/systemd-sysctl.service \
923a60
 	units/emergency.service \
923a60
 	units/rescue.service \
923a60
-	units/user@.service \
923a60
 	units/systemd-suspend.service \
923a60
 	units/systemd-halt.service \
923a60
 	units/systemd-poweroff.service \
923a60
@@ -597,7 +596,6 @@ EXTRA_DIST += \
923a60
 	units/systemd-fsck@.service.in \
923a60
 	units/systemd-fsck-root.service.in \
923a60
 	units/systemd-machine-id-commit.service.in \
923a60
-	units/user@.service.m4.in \
923a60
 	units/debug-shell.service.in \
923a60
 	units/systemd-suspend.service.in \
923a60
 	units/quotaon.service.in \
923a60
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
923a60
index f4c4490e8f..97eb4feca9 100644
923a60
--- a/src/login/logind-user.c
923a60
+++ b/src/login/logind-user.c
923a60
@@ -399,39 +399,6 @@ static int user_start_slice(User *u) {
923a60
         return 0;
923a60
 }
923a60
 
923a60
-static int user_start_service(User *u) {
923a60
-        _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
923a60
-        char *job;
923a60
-        int r;
923a60
-
923a60
-        assert(u);
923a60
-
923a60
-        if (!u->service) {
923a60
-                char lu[DECIMAL_STR_MAX(uid_t) + 1], *service;
923a60
-                sprintf(lu, UID_FMT, u->uid);
923a60
-
923a60
-                service = unit_name_build("user", lu, ".service");
923a60
-                if (!service)
923a60
-                        return log_oom();
923a60
-
923a60
-                r = manager_start_unit(u->manager, service, &error, &job;;
923a60
-                if (r < 0) {
923a60
-                        log_error("Failed to start user service: %s", bus_error_message(&error, r));
923a60
-                        free(service);
923a60
-                } else {
923a60
-                        u->service = service;
923a60
-
923a60
-                        free(u->service_job);
923a60
-                        u->service_job = job;
923a60
-                }
923a60
-        }
923a60
-
923a60
-        if (u->service)
923a60
-                hashmap_put(u->manager->user_units, u->service, u);
923a60
-
923a60
-        return 0;
923a60
-}
923a60
-
923a60
 int user_start(User *u) {
923a60
         int r;
923a60
 
923a60
@@ -452,11 +419,6 @@ int user_start(User *u) {
923a60
         if (r < 0)
923a60
                 return r;
923a60
 
923a60
-        /* Spawn user systemd */
923a60
-        r = user_start_service(u);
923a60
-        if (r < 0)
923a60
-                return r;
923a60
-
923a60
         if (!dual_timestamp_is_set(&u->timestamp))
923a60
                 dual_timestamp_get(&u->timestamp);
923a60