From: Laurent Bigonville <bigon@debian.org>
To: selinux@tycho.nsa.gov
Subject: chcat is using getlogin() function that sometimes returns null/empty string
Date: Mon, 7 Dec 2015 19:01:53 +0100 [thread overview]
Message-ID: <5665C991.4030606@debian.org> (raw)
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
next reply other threads:[~2015-12-07 18:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 18:01 Laurent Bigonville [this message]
2015-12-07 19:57 ` chcat is using getlogin() function that sometimes returns null/empty string Stephen Smalley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5665C991.4030606@debian.org \
--to=bigon@debian.org \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.