Merge lp:~shnatsel/unattended-upgrades/plymouth-message-fix into lp:~ubuntu-core-dev/unattended-upgrades/ubuntu

Proposed by Sergey "Shnatsel" Davidoff
Status: Work in progress
Proposed branch: lp:~shnatsel/unattended-upgrades/plymouth-message-fix
Merge into: lp:~ubuntu-core-dev/unattended-upgrades/ubuntu
Diff against target: 14 lines (+4/-0)
1 file modified
debian/postinst (+4/-0)
To merge this branch: bzr merge lp:~shnatsel/unattended-upgrades/plymouth-message-fix
Reviewer Review Type Date Requested Status
Sergey "Shnatsel" Davidoff (community) Disapprove
Colin Watson Needs Information
Review via email: mp+44484@code.launchpad.net

Description of the change

Partially fixed sending messages to Plymouth (race condition still not handled)

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

Thanks for your suggestion.

I'm thoroughly confused about this. Making this script setuid is definitely not going to be allowed - it should just be started with the proper privileges in the first place. However, as far as I can tell, all the code paths that start unattended-upgrade-shutdown do so as root, and plymouthd explicitly refuses messages from non-root users. So I don't quite understand what's going on here, and how dropping to a non-root user might help.

review: Needs Information
Revision history for this message
Vish (vish) wrote :

Sergey "Shnatsel" Davidoff: Pls update the branch, push changes to this branch and comment on the merge *here*. That's usually how review/comment works for branches.
Colin is not subscribed to the bug(i dont see any other team subscriptions where he would be notified either), so he would not be aware of the changes you have made if you comment on the bug alone..

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

Vish, thank you very much for your help!
I've tested this all again and now everything works even without the SUID and changing the owner to daemon.
It used to work for me in X11 Plymouth renderer if I started Plymouth daemon as root and passed messages to it, also as root, but it didn't work on shutdown. I chowned it to daemon and added suid bit, and the messages appeared on shutdown too. I switched permissions back and it still works... I'm totally confused with all those Upstart and Plymouth permissions now.

review: Disapprove

Unmerged revisions

154. By Sergey "Shnatsel" Davidoff

fixed sending messages to Plymouth (except for race condition)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/postinst'
2--- debian/postinst 2010-11-18 08:34:41 +0000
3+++ debian/postinst 2010-12-22 16:37:00 +0000
4@@ -33,6 +33,10 @@
5 ucf --three-way --debconf-ok "$NEWFILE" "$CONFIG"
6 ucfr unattended-upgrades "$CONFIG"
7 fi
8+
9+ # Fix sending messages to Plymouth
10+ chown daemon:daemon /usr/share/unattended-upgrades/unattended-upgrade-shutdown
11+ chmod u+s /usr/share/unattended-upgrades/unattended-upgrade-shutdown
12
13 # Recover from incorrect init.d script header in versions < 0.64
14 if dpkg --compare-versions "$2" lt "0.64" \

Subscribers

People subscribed via source and target branches