Comment 21 for bug 286529

Revision history for this message
Even Nedberg (nedberg) wrote : Re: Should not be able to restrict first user

No, it did not work. Here is the error:
  File "/usr/share/python-support/timekpr/timekpr-gui.py", line 585, in
<module>
    timekprGUI()
  File "/usr/share/python-support/timekpr/timekpr-gui.py", line 150, in
__init__
    if isnormal(userinfo[0]):
  File "/usr/share/python-support/timekpr/timekpr-gui.py", line 70, in
isnormal
    if username == getlogin(): return False
OSError: [Errno 22] Invalid argument

Sorry, I don't have time to do more testing right now. I had to do some changes (import os.getlogin() among other things). So bzr pull before you do anything more!

I also found this:
http://bugs.python.org/issue678077

stating that os.getlogin() is not good! I tried pwd.getpwuid(os.getuid())[0], but that returned 'root' as user...