Merge lp:~pitti/ubiquity/only-ubiquity-crashes into lp:ubiquity

Proposed by Martin Pitt on 2012-01-24
Status: Merged
Merged at revision: 5128
Proposed branch: lp:~pitti/ubiquity/only-ubiquity-crashes
Merge into: lp:ubiquity
Diff against target: 0 lines
To merge this branch: bzr merge lp:~pitti/ubiquity/only-ubiquity-crashes
Reviewer Review Type Date Requested Status
Ubuntu Installer Team 2012-01-24 Pending
Review via email: mp+89916@code.launchpad.net

Description of the Change

I tested this with deliberately introducing a piece of broken code (None+3) in
the gtk_ui.py constructor. This brings up the "ubiquity has crashed blabla"
dialog just fine now.

Please note that for some reason os.setgid(os.getegid()) and the same for uid
does not work for some reason, so I had to use setres[ug]id().

This also adds an (IMHO missing) sys.exit(1) in the case that apport-gtk is
present. Without this, ubiquity would just continue to run on after an error,
which is a matter of luck at best, and could even be dangerous in the worst
case.

To post a comment you must log in.
Evan (ev) wrote :

Did you not use misc.drop_all_privileges for a reason? Other than that, it looks fine.

Martin Pitt (pitti) wrote :

The only reason was my ignorance that it exists :) Works fine, thanks for pointing this out.

5129. By Martin Pitt on 2012-01-24

use misc.drop_all_privileges() instead

Preview Diff

Empty

Subscribers

People subscribed via source and target branches

to status/vote changes: