anitazha / rpms / systemd

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