[alt.hackers] biff replacement

mkwan@csadfa.cs.adfa.oz.au (Matthew Kwan) (03/30/91)

Due to a security hole showing up in the SunOS biff/comsat program,
our fascist sysadmin (Hi Mike!) shut it down. Now, biff is an
essential part of the programming environment, so I decided to
write my own (by modifying my program which exploited the hole
in the first place).

The idea is to recv from the biff udp port, and get messages of
the form user-id@offset whenever mail arrives. Unfortunately I
soon found out that the port can only be read with root permission.

BUT .. the recv function will wait on the port even though it
doesn't have read permissions. It will return with an error
only when a message arrives.

SO .. it was a fairly simple matter to check each time a biff
message arrived whether my /usr/spool/mail entry had been
updated. If so, print out the first few lines of the last
message.

It isn't perfect, but it allows me to function fairly normally -
i.e. I don't have to compulsively check my mail every few seconds.

----------------------------------------------------------------
Matthew Kwan
	- The man with no .signature