MCC crashed in populate_user_ids with IndexError

Bug #231065 reported by Dozch
14
Affects Status Importance Assigned to Milestone
mythbuntu-control-centre (Ubuntu)
Fix Released
Undecided
Mario Limonciello
Hardy
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: mythbuntu-control-centre

I found out that I had an empty line in my /etc/passwd file, I am not sure if that is officially possible. Anyway, then in the core.py file (see apport report) the code falls over because 'fields' doesn't contain any values:

        def populate_user_ids(self):
            """Returns all valid user id's for autostart"""
            self.user_count=0
            in_f=open("/etc/passwd")
            for line in in_f:
                fields = string.split(line,":")
[l148] id=int(fields[2])

ProblemType: Crash
Architecture: amd64
Date: Fri May 16 22:49:36 2008
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/share/mythbuntu-control-centre/bin/mythbuntu-control-centre
InterpreterPath: /usr/bin/python2.5
NonfreeKernelModules: nvidia
Package: mythbuntu-control-centre 0.27-0ubuntu1
PackageArchitecture: all
ProcCmdline: python /usr/share/mythbuntu-control-centre/bin/mythbuntu-control-centre
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
 LANG=en_AU.UTF-8
 SHELL=/bin/bash
PythonArgs: ['/usr/share/mythbuntu-control-centre/bin/mythbuntu-control-centre']
SourcePackage: mythbuntu-control-centre
Title: mythbuntu-control-centre crashed with IndexError in populate_user_ids()
Uname: Linux 2.6.24-16-generic x86_64
UserGroups:

Revision history for this message
Dozch (dozch) wrote :
Revision history for this message
Mario Limonciello (superm1) wrote :

bzr revno 230

Changed in mythbuntu-control-centre:
assignee: nobody → superm1
status: New → Fix Committed
Revision history for this message
laga (laga) wrote :

Please find the debdiff which fixes this issue attached to bug #241402 (bug_241402_0.28-0ubuntu1~hardy2_to_0.28-0ubuntu1+hardy1-second_try.diff).

TEST CASE: Add empty line to your /etc/passwd, start MCC and watch it fall over. After applying the patch, it should start just fine. *CAUTION* messing with your /etc/passwd can result in a broken system! Do not try this unless you really know what you're doing!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythbuntu-control-centre - 0.30-0ubuntu1

---------------
mythbuntu-control-centre (0.30-0ubuntu1) intrepid; urgency=low

  [ Mario Limonciello ]
  * Don't bail out on empty lines in /etc/passwd. (LP: #231065)

  [ Nick Ellery ]
  * MythbuntuControlCentre/tab_system_roles.glade:
     - Fix a spelling mistake (Deskop -> Desktop) (LP: #257754).
  * MythbuntuControlCentre/tab_advanced.glade:
     - Fix a spelling mistake (Mangement -> Management) (LP: #257864).

  [ Siegfried-Angel Gevatter Pujals ]
  * mythbuntu-control-centre.1:
    - Fix an incorrect sentence ("mythbuntu-control-centre is by Mario").
    - Metion that it is a graphical utility.

 -- Mario Limonciello <email address hidden> Mon, 15 Sep 2008 00:58:39 -0500

Changed in mythbuntu-control-centre:
status: Fix Committed → Fix Released
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

Version 0.28-0ubuntu1+hardy1 fixes the problem for me.

Changed in mythbuntu-control-centre:
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

Copied to hardy-updates.

Changed in mythbuntu-control-centre:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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