Merge lp:~jamesodhunt/ubuntu/natty/upstart/fix-for-bug-767053 into lp:ubuntu/natty/upstart

Proposed by James Hunt
Status: Merged
Merged at revision: 1311
Proposed branch: lp:~jamesodhunt/ubuntu/natty/upstart/fix-for-bug-767053
Merge into: lp:ubuntu/natty/upstart
Diff against target: 130 lines (+35/-16)
6 files modified
ChangeLog (+6/-0)
NEWS (+6/-0)
configure.ac (+1/-1)
debian/changelog (+6/-0)
init/control.c (+10/-9)
po/upstart.pot (+6/-6)
To merge this branch: bzr merge lp:~jamesodhunt/ubuntu/natty/upstart/fix-for-bug-767053
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+58538@code.launchpad.net

Description of the change

* control_get_job_by_name: Fix to relax session rigidity for user
  sessions (allow user sessions to see into the global
  namespace for backwards compatability) (LP: #767053).

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2011-04-15 14:37:13 +0000
3+++ ChangeLog 2011-04-20 17:16:42 +0000
4@@ -1,3 +1,9 @@
5+2011-04-20 James Hunt <james.hunt@ubuntu.com>
6+
7+ * control_get_job_by_name: Fix to relax session rigidity for user
8+ sessions (allow user sessions to see into the global
9+ namespace for backwards compatability) (LP: #767053).
10+
11 2011-04-15 James Hunt <james.hunt@ubuntu.com>
12
13 * init/conf.c:
14
15=== modified file 'NEWS'
16--- NEWS 2011-04-15 14:37:13 +0000
17+++ NEWS 2011-04-20 17:16:42 +0000
18@@ -1,3 +1,9 @@
19+0.9.7 2011-04-20
20+
21+ * Fix for user sessions to retain backwards compatibility behaviour
22+ where a non-privileged user can enquire on jobs owned by the
23+ global namespace.
24+
25 0.9.6 2011-04-15
26
27 * Fix for nasty OOM scenario when an attempt is made to start
28
29=== modified file 'configure.ac'
30--- configure.ac 2011-04-15 14:37:13 +0000
31+++ configure.ac 2011-04-20 17:16:42 +0000
32@@ -1,7 +1,7 @@
33 # Process this file with autoconf to produce a configure script.
34
35 AC_PREREQ(2.61)
36-AC_INIT([upstart], [0.9.6], [upstart-devel@lists.ubuntu.com])
37+AC_INIT([upstart], [0.9.7], [upstart-devel@lists.ubuntu.com])
38 NIH_COPYRIGHT([[Copyright © 2011 Canonical Ltd.]])
39 AC_CONFIG_SRCDIR([init/main.c])
40 AC_CONFIG_MACRO_DIR([m4])
41
42=== modified file 'debian/changelog'
43--- debian/changelog 2011-04-20 16:37:10 +0000
44+++ debian/changelog 2011-04-20 17:16:42 +0000
45@@ -1,3 +1,9 @@
46+upstart (0.9.7-1) natty; urgency=low
47+
48+ * New upstream release 0.9.7: Important session fix (LP: #767053).
49+
50+ -- James Hunt <james.hunt@ubuntu.com> Wed, 20 Apr 2011 17:44:41 +0100
51+
52 upstart (0.9.6-1ubuntu1) natty; urgency=low
53
54 [ James Hunt ]
55
56=== modified file 'init/control.c'
57--- init/control.c 2011-04-06 16:35:39 +0000
58+++ init/control.c 2011-04-20 17:16:42 +0000
59@@ -419,20 +419,21 @@
60 /* Lookup the job */
61 class = (JobClass *)nih_hash_search (job_classes, name, NULL);
62
63- while (class && class->session != session) {
64- class = (JobClass *)nih_hash_search (job_classes, name, &class->entry);
65- }
66-
67- if (class && ! session)
68- class->session = session;
69-
70 while (class && (class->session != session)) {
71- if ((! class->session) && (! session->chroot))
72+
73+ /* Found a match in the global session which may be used
74+ * later if no matching user session job exists.
75+ */
76+ if ((! class->session) && (session && ! session->chroot))
77 global_class = class;
78+
79 class = (JobClass *)nih_hash_search (job_classes, name,
80- &class->entry);
81+ &class->entry);
82 }
83
84+ /* If no job with the given name exists in the appropriate
85+ * session, look in the global namespace (aka the NULL session).
86+ */
87 if (! class)
88 class = global_class;
89
90
91=== modified file 'po/upstart.pot'
92--- po/upstart.pot 2011-04-15 13:40:25 +0000
93+++ po/upstart.pot 2011-04-20 17:16:42 +0000
94@@ -6,9 +6,9 @@
95 #, fuzzy
96 msgid ""
97 msgstr ""
98-"Project-Id-Version: upstart 0.9.5\n"
99+"Project-Id-Version: upstart 0.9.6\n"
100 "Report-Msgid-Bugs-To: new@bugs.launchpad.net\n"
101-"POT-Creation-Date: 2011-04-15 12:11+0100\n"
102+"POT-Creation-Date: 2011-04-20 17:07+0100\n"
103 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
104 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
105 "Language-Team: LANGUAGE <LL@li.org>\n"
106@@ -67,21 +67,21 @@
107 msgid "Reloading configuration"
108 msgstr ""
109
110-#: init/control.c:412 init/control.c:565
111+#: init/control.c:412 init/control.c:566
112 msgid "Name may not be empty string"
113 msgstr ""
114
115-#: init/control.c:442
116+#: init/control.c:443
117 #, c-format
118 msgid "Unknown job: %s"
119 msgstr ""
120
121-#: init/control.c:573 init/job_class.c:579 init/job_class.c:778
122+#: init/control.c:574 init/job_class.c:579 init/job_class.c:778
123 #: init/job_class.c:908 init/job_class.c:1043
124 msgid "Env must be KEY=VALUE pairs"
125 msgstr ""
126
127-#: init/control.c:742
128+#: init/control.c:743
129 msgid "The log priority given was not recognised"
130 msgstr ""
131

Subscribers

People subscribed via source and target branches

to all changes: