It was:
- setting the euid from the real groupid (yow!)
- not recovering it's setuid permissions when cleaning the utmp file.
I've left in some diagnostic code for "shouldn't happen" cases.
they're not necessary. RXVT's handling of /etc/utmp is blatantly idiotic
under FreeBSD but at least it's not a security hole anymore.
Obtained from: Marc Ewing (marc@redhat.com) from BUGTRAQ mailing list.