last known msgbuf_write vs EOF fix (by krw@)
Make sure the correct errno is reported by warn* or err* and not
the errno of an intervening cleanup operation like close/unlink/etc.

Diff from Doug Hogan (doug (at) acyclic.org)
Use getlogin() to determine real user name where possible.
Commit by millert@, OK guenther@ deraadt@