On 12/07/2015 01:01 PM, Laurent Bigonville wrote:
Hi,

So apparently gnome-terminal developers have decided to stop updating
utmp[0] file and this is breaking chcat -Ll with the following error:

Traceback (most recent call last):
   File "/usr/bin/chcat", line 409, in <module>
     sys.exit(listusercats(cmds))
   File "/usr/bin/chcat", line 352, in listusercats
     users.append(os.getlogin())
OSError: [Errno 2] No such file or directory

getlogin(3) manpage suggest to rely on the LOGNAME environment variable,
so maybe chcat should fallback to this if getlogin() is not returning
anything?

Cheers,

Laurent Bigonville

[0] https://bugzilla.gnome.org/show_bug.cgi?id=747046

Maybe just use:
pwd.getpwuid(os.getuid()).pw_name



_______________________________________________
Selinux mailing list
Selinux@tycho.nsa.gov
To unsubscribe, send email to selinux-le...@tycho.nsa.gov.
To get help, send an email containing "help" to selinux-requ...@tycho.nsa.gov.

Reply via email to