postinst chown can fail

Bug #796422 reported by Dustin Kirkland 
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
byobu (Ubuntu)
Fix Released
High
Dustin Kirkland 
Lucid
Fix Released
High
Dustin Kirkland 
Maverick
Fix Released
High
Dustin Kirkland 
Natty
Fix Released
High
Dustin Kirkland 
Oneiric
Fix Released
High
Dustin Kirkland 

Bug Description

Binary package hint: byobu

<elmo> 16:46:26> Setting up byobu (2.68-0ubuntu1.1) ...
<elmo> 16:46:26> chown: invalid user: `asac'
<elmo> 16:46:33> thanks kirkland :-P

This needs to be handled more gracefully.

====================
SRU
 - Impact: Upgrading users could experience a problem with Byobu's postinst, which touches a flag in each users' screen run directory. If a user's name has changed since their screen run directory was created at boot, then Byobu's chown procedure might fail. This is perhaps more likely to happen on long running uptime servers.
 - How addressed: The chown command used in Byobu's postinst was ugly and naive. Instead, use chown --reference against the parent directory. Also, || true this command, as it's hardly essential to the package upgrade.
 - How to reproduce: Create a test user, "foo". As user foo, start a byobu session. Exit that session. Rename user "foo" to "bar". Note that /var/run/S-foo still exists. Upgrade byobu. Byobu's postinst will touch /var/run/S-foo/byobu.reload-required, and try to chown it to "foo", except "foo" does not exist.
 - Regression potential: Patch is trivial, clean, regression potential is negligible.
 - Minimal patch: http://paste.ubuntu.com/625633/
====================

Changed in byobu (Ubuntu Oneiric):
status: New → In Progress
Changed in byobu (Ubuntu Natty):
status: New → Triaged
Changed in byobu (Ubuntu Maverick):
status: New → Triaged
Changed in byobu (Ubuntu Lucid):
status: New → Triaged
importance: Undecided → High
Changed in byobu (Ubuntu Maverick):
importance: Undecided → High
Changed in byobu (Ubuntu Natty):
importance: Undecided → High
Changed in byobu (Ubuntu Oneiric):
importance: Undecided → High
Changed in byobu (Ubuntu Lucid):
assignee: nobody → Dustin Kirkland (kirkland)
Changed in byobu (Ubuntu Maverick):
assignee: nobody → Dustin Kirkland (kirkland)
Changed in byobu (Ubuntu Natty):
assignee: nobody → Dustin Kirkland (kirkland)
Changed in byobu (Ubuntu Oneiric):
assignee: nobody → Dustin Kirkland (kirkland)
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 4.11-0ubuntu1

---------------
byobu (4.11-0ubuntu1) oneiric; urgency=low

  [ Dustin Kirkland ]
  * debian/postinst: LP: #796422
    - handle ownerships of the reload profile flag more gracefully

  [ Ahmed El-Mahmoudy ]
  * usr/share/byobu/keybindings/screen-escape-keys: LP: #796134
    - fix refresh keybinding (missing eval)
 -- Dustin Kirkland <email address hidden> Sat, 11 Jun 2011 09:42:07 -0400

Changed in byobu (Ubuntu Oneiric):
status: Fix Committed → Fix Released
description: updated
Changed in byobu (Ubuntu Lucid):
status: Triaged → Fix Committed
Changed in byobu (Ubuntu Maverick):
status: Triaged → Fix Committed
Changed in byobu (Ubuntu Natty):
status: Triaged → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted byobu into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted byobu into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted byobu into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Revision history for this message
C de-Avillez (hggdh2) wrote :

Verified on Natty, no issues. Marking verification-done-natty

tags: added: verification-done-natty
Revision history for this message
James Troup (elmo) wrote :

This just caused another lucid upgrade to blow its brains out. I enabled lucid-proposed and installed byobu from there and that worked fine. Marking verification-done-lucid

tags: added: verification-done-lucid
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Thanks, James.

SRU Team: Can we please get these published to -updates ASAP?

tags: added: verification-done
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 3.33-0ubuntu1.1

---------------
byobu (3.33-0ubuntu1.1) natty-proposed; urgency=low

  * debian/postinst:
    - fix chown of reload-required flag, which might otherwise fail,
      and break package upgrades, LP: #796422
 -- Dustin Kirkland <email address hidden> Sun, 12 Jun 2011 23:34:58 -0500

Changed in byobu (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

I verified this on maverick as well.

tags: removed: verification-done-lucid verification-done-natty verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 3.5-0ubuntu1.1

---------------
byobu (3.5-0ubuntu1.1) maverick-proposed; urgency=low

  * debian/postinst:
    - fix chown of reload-required flag, which might otherwise fail,
      and break package upgrades, LP: #796422
 -- Dustin Kirkland <email address hidden> Sun, 12 Jun 2011 23:34:40 -0500

Changed in byobu (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 2.68-0ubuntu1.2

---------------
byobu (2.68-0ubuntu1.2) lucid-proposed; urgency=low

  * debian/postinst:
    - fix chown of reload-required flag, which might otherwise fail,
      and break package upgrades, LP: #796422
 -- Dustin Kirkland <email address hidden> Sun, 12 Jun 2011 23:33:20 -0500

Changed in byobu (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.