Ubuntu Pastebin

Paste from serge at Wed, 2 Mar 2016 04:59:36 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
diff -Nru systemd-shim-9/debian/changelog systemd-shim-9/debian/changelog
--- systemd-shim-9/debian/changelog	2015-06-08 17:56:49.000000000 -0700
+++ systemd-shim-9/debian/changelog	2016-03-01 20:58:51.000000000 -0800
@@ -1,3 +1,12 @@
+systemd-shim (9-1bzr4ubuntu1) xenial; urgency=medium
+
+  * debian/patches/dont-override-release-agent.patch: do not override an
+    existing release agent.  If one is defined, something is going on that
+    we don't know about, and we risk stopping user sessions immediately on
+    login (preventing logins).
+
+ -- Serge Hallyn <serge.hallyn@ubuntu.com>  Tue, 01 Mar 2016 20:57:52 -0800
+
 systemd-shim (9-1bzr4) wily; urgency=medium
 
   * debian/patches/lp1390120.patch
diff -Nru systemd-shim-9/debian/control systemd-shim-9/debian/control
--- systemd-shim-9/debian/control	2015-05-18 07:59:16.000000000 -0700
+++ systemd-shim-9/debian/control	2016-03-01 20:58:56.000000000 -0800
@@ -1,7 +1,8 @@
 Source: systemd-shim
 Section: admin
 Priority: extra
-Maintainer: Steve Langasek <vorlon@debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Steve Langasek <vorlon@debian.org>
 Uploaders: Martin Pitt <mpitt@debian.org>
 Build-Depends: debhelper (>= 9), dh-autoreconf, libglib2.0-dev, systemd
 Standards-Version: 3.9.6
diff -Nru systemd-shim-9/debian/patches/dont-override-release-agent.patch systemd-shim-9/debian/patches/dont-override-release-agent.patch
--- systemd-shim-9/debian/patches/dont-override-release-agent.patch	1969-12-31 16:00:00.000000000 -0800
+++ systemd-shim-9/debian/patches/dont-override-release-agent.patch	2016-03-01 20:57:33.000000000 -0800
@@ -0,0 +1,37 @@
+Description: don't override an existing release agent
+ If someone else has already installed a release agent, do not
+ override it with our own.
+ Without this, if libpam-cgfs is installed to run after pam-systemd,
+ then user sessions are stopped as soon as libpam-cgfs moves the
+ user session to a new cgroup.
+Author: Serge Hallyn <serge.hallyn@ubuntu.com>
+
+Index: systemd-shim-9/src/cgmanager.c
+===================================================================
+--- systemd-shim-9.orig/src/cgmanager.c
++++ systemd-shim-9/src/cgmanager.c
+@@ -163,8 +163,24 @@ cgmanager_remove (const gchar *path)
+ void
+ cgmanager_move_self (void)
+ {
++  GVariant *reply;
++  gchar *str;
++
+   cgmanager_call ("MovePidAbs", g_variant_new ("(ssi)", "all", "/", getpid ()), G_VARIANT_TYPE_UNIT, NULL);
+ 
++  int need_agent = 1;
++  if (cgmanager_call ("GetValue", g_variant_new ("(sss)", "systemd", "/", "release_agent"), G_VARIANT_TYPE ("(s)"), &reply))
++  {
++          g_variant_get(reply, "(s)", &str);
++          g_variant_unref(reply);
++          g_warning("str is %d\n", strlen(str));
++          need_agent = strlen(str) < 1;
++          g_free(str);
++  }
++
++  if (!need_agent)
++          return;
++
+   /* install our systemd cgroup release handler */
+   g_debug ("Installing cgroup release handler " LIBEXECDIR "/systemd-shim-cgroup-release-agent");
+   cgmanager_call ("SetValue",
diff -Nru systemd-shim-9/debian/patches/series systemd-shim-9/debian/patches/series
--- systemd-shim-9/debian/patches/series	2015-05-18 07:59:16.000000000 -0700
+++ systemd-shim-9/debian/patches/series	2016-03-01 20:54:31.000000000 -0800
@@ -1 +1,2 @@
 lp1390120.patch
+dont-override-release-agent.patch
Download as text