Language page crashes in only-installable mode

Bug #647792 reported by Mario Limonciello on 2010-09-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: ubiquity

This is an oem install that included a preseed for showing only the installable languages on the oem page. I'm finding that if the apt cache hasn't been loaded before the page gets loaded, it will crash.

The attached logs show that crash.

This can also be reproduced with this simple python script if the apt cache hasn't yet been loaded:
import sys
sys.path.insert(0, '/usr/lib/ubiquity')
from ubiquity import misc
misc.drop_privileges()
import apt
apt.cache.Cache()

This is the (cropped) return from that script:
  File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 88, in __init__
    self.open(progress)
  File "/usr/lib/python2.6/dist-packages/apt/cache.py", line 126, in open
    self._cache = apt_pkg.Cache(progress)
SystemError: E:Could not open file /var/cache/apt/pkgcache.bin - open (13: Permission denied), E:Failed to truncate file - ftruncate (9: Bad file descriptor), E:The package lists or status file could not be parsed or opened.

Making a minor modification, it will work however:
import sys
sys.path.insert(0, '/usr/lib/ubiquity')
from ubiquity import misc
misc.drop_all_privileges()
import apt
apt.cache.Cache()

drop_privileges is applied to ubiquity when first loaded, so it's effective on all pages. The primary difference between those two methods is that drop_all_privileges will set the euid/egid as well as real uid/gid while drop_privileges only sets the euid/egid.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: ubiquity 2.4.1
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic i686
Architecture: i386
Date: Sat Sep 25 22:32:08 2010
DistributionChannelDescriptor:
 # This is a distribution channel descriptor
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-dell-maverick-une-20100925-0
InstallationMedia: Ubuntu 10.10 "Maverick" - Build i386 LIVE Binary 20100925-01:44
ProcEnviron:
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubiquity

Mario Limonciello (superm1) wrote :
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.4.2

---------------
ubiquity (2.4.2) maverick; urgency=low

  [ Jonathon Riddell ]
  * gui/qt/stepLanguage.ui: nicer icons and better layout on
    language page (LP: #628808)

  [ Mario Limonciello ]
  * Set the LANG before running oem-config-remove.
  * Prevent a crash of debconf-communicate when removing oem-config.
    (LP: #641478)
  * Raise privileges when running the language page in only-installable
    mode. (LP: #647792)
  * Automatic update of included source packages: flash-kernel
    2.28ubuntu10.

  [ Evan Dandrea ]
  * Don't let Jockey's automatic driver installation failing cause the
    entire prepare page to fail.
  * Make sure $LANGUAGE gets set in the parallel debconf child process,
    so that we get translated descriptions (LP: #646109).
  * Set the effective UID in regain_privileges_save so we don't try to
    setgroups([]) as a regular user (LP: #646827).

  [ Didier Roche ]
  * depends on latest libindicator-dev for ABI change (LP: #637692, #647739)
 -- Mario Limonciello <email address hidden> Sat, 25 Sep 2010 18:24:06 -0500

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

Other bug subscribers