chcat is using getlogin() function that sometimes returns null/empty string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.



[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux