Bugtraq mailing list archives

Re: SunOS 5.5 mailtool - stupid .forward symlink tricks


From: casper () holland Sun COM (Casper Dik)
Date: Mon, 24 Jun 1996 12:18:45 +0200


On Thu, 30 May 1996, Neil Readwin wrote:

The SunOS 5.5 mailtool seems to follow symlinks when enabling the vacation
feature, so if you

        ln -s /var/mail/luser ~/.forward

and then enable vacation it copies /var/mail/luser to ~/.forward and
appends "|/usr/bin/vacation me" to it (and moves the symlink to
~/.forward..BACKUP - I'm not sure if you can do any damage using that
and I no longer have a 5.5 machine handy to check it). Neil.

When I did this 5.5 mailtool just died with a segv leaving .forward and
.forward..BACKUP there as symlinks. Sometimes .forward is there but is
a zero length file. Race condition?

This is on a newly installed Ultra 1 140 running 5.5. Did I miss
something?

Yeah, you should make you rmailbox mode 660, group mail, for this trick to work.


The workaround is chmod 600 /var/mail/*.  The files need not be group writable.
If you also make "keep" the default in /etc/mail/mailx.rc, then there should
be no problem with mailboxes reverting back to the default 660 mode.

(Needless to say that the bug in mailtool needs to be fixed anyway)

Casper



Current thread: