[SUMMARY] Mailtool overwriting /dev/null !!

From: David Foster (foster@blinky.ucsd.edu)
Date: Thu Oct 07 1999 - 13:24:35 CDT

Problem was that the Solaris mailtool program was removing/overwriting /dev/null.
Original question is included below.

Special thanks to John Nield who nailed it. My problem was the line:


in my .mailrc file, which had been added automatically when my account was created
(I recently changed jobs). I have to admit I'm a bit embarrassed for not coming
up with this myself.

I never before realized that a normal user can delete /dev/null! This seems
problematic to say the least!

Other suggestions, all great, were (1) use truss to trace the system calls
leading to /dev/null getting deleted...this surely would have implicated the
dead.letter mechanism; (2) check for dead.letter files sym linked to /dev/null.

Thanks to:

"John Nield" <jnield@impole.com>
Jochen Bern <bern@penthesilea.uni-trier.de>
James Cannon <JCannon@calmit.unl.edu>

Dave Foster

> Platform:
> Server: Ultra 60, Solaris 2.6 fully patched
> Client: Sparc 10, SunOS 4.1.4 fully patched
> Problem:
> When I run Sun's mailtool program (as normal user) remotely on *any* of
> our Solaris 2.6 servers, /dev/null gets overwritten or deleted, presumably by
> sendmail (since this would require root permission). The client is always
> a Sparc10 with SunOS 4.1.4.
> This results in the following error from mailtool:
> fill_fd: disconnect: cannot open /dev/null: No such file or directory
> And of course no /dev/null breaks a LOT of other things!
> I'm not sure if it's related, but I have seen this message which seems
> related to a problem with the X server on the client side:
> XView warning: Object 0x157170, Already in fullscreen by another client.
> Fullscreen Failed. (Fullscreen package)
> Could not put up alert to request confirmation of following operation:
> The current mail box has been changed
> Do you wish to save the changes?
> Proceeding by assuming that this operation was NOT confirmed
> Also, in case it may matter, my mailfile is in my home directory, which
> has been mounted by the automounter in an NIS environment. Mailtool is
> started with:
> mailtool -Mf /home/foster/.mail/.mbox
> As I am writing this message using mailtool, /dev/null has been
> overwritten by the beginning of this message! So it seems related
> to the dead.letter backups somehow, but the dead.letter file has
> not been created.
> The link for /dev/null before it gets zapped seems correct:
> lrwxrwxrwx 1 root other 27 Oct 5 11:02
> /dev/null -> ../devices/pseudo/mm@0:null
> Plea:
> Has anyone else seen this very strange problem? Can anyone suggest
> free GUI alternatives to mailtool?
> Thanks, summary to follow.
> Dave Foster

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:26 CDT