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