naccyde / rpms / systemd

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