timekpr-gui fails to start if login.defs is corrupt/empty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
timekpr |
Fix Committed
|
Low
|
Unassigned |
Bug Description
Running Ubuntu 9.10 Gnome 2.28.1 timekpr 0.3.0
Empty login.defs file causes timekpr-gui.py to fail. Debug information is shown if run from CLI, but no indication of the cause is displayed and the app simply appears not to start if called from the menu.
It's taken me a little while to track the cause of my timekpr-gui problem down, and, when I did track it down to an empty /etc/login.defs file, I'm now struggling to work out how that happened... But..
/usr/share/
self.wTree = gtk.glade.
Traceback (most recent call last):
File "/usr/share/
timekprGUI()
File "/usr/share/
if isnormal(
File "/usr/share/
if uidminmax[0] < uidminmax[1]:
IndexError: list index out of range
If "uidminmax = re.compile(
login.defs shouldn't be empty, but if it is, the app should either work around the missing values or, fail gracefully with an error message or dialog.
Changed in timekpr: | |
assignee: | nobody → Savvas Radevic (medigeek) |
importance: | Undecided → Low |
status: | New → In Progress |
(@Even, your opinion please :) )
Steve, thanks for the bug report! are you using some other way to manage users, like libuser / libuser.conf ?
We will keep the current login.defs check, but as a default fallback option there are two solutions:
a) list all the users, real and system ones (and hence isnormal() will just return True on each call)
b) add default UID_MIN / MAX variables inside isnormal() -- but which values as default?
Do you happen to know the default value of UID_MIN / UID_MAX if they are not set in login.defs ?
I'm not really sure which one to go with though... :) I like (a), dirty, but less to tamper with