policycoreutils/chcat: Add a fallback in case os.getlogin() returns nothing

Some teminal emulators (like the latest version of gnome-terminal) are
not setting entries in the utmp file, this leads getlogin() to return an
empty string.

Fallback to the name of the user running the chcat process.
1 file changed