procmail
[Top] [All Lists]

Re: Why is softlink / hardlink "BOGUS" ?

1996-05-27 13:51:04
Jan Vicherek <honza(_at_)ied(_dot_)com> writes:
Second, I came up with the following patch. It allows me not to use
~root/.procmailrc for shared /var/spool/mail on local net. So now I
have /var/spool/mail/root -> /filesystem/local/to/machines/root_mailbox

and I'm also being able to do the backup my way, having hardlinks to
the mailboxes... oh well... 

if you see a hazard that could happen and cause a crash or data loss
due to my changes (in my setup : hosts A,B,C,D share /var/spool/mail
on host C, but all have the root's (and only root's) mailbox on their
local filesystem (under /filesystem/local/to/machines/root_mailbox).
Usetrs share /home/ dir from host C as well.)
then please let me know.

This a) should be controllable on a per-recipe basis; b) should default
to off; and c) is almost certainly a security hole: you are no longer
certain that procmail is writing to the file specified, as it could be
a symlink anywhere.  If the 'foo' account doesn't have a mailbox in
/var/spool/mail then someone could just say "ln -s ~foo/.rhosts
/var/spool/mail/foo"  Then do:

procmail -f $USER -d foo <<EOF

+ +
EOF

Followed by "rlogin -l foo localhost", no?

Is creating ~root/.procmailrc so difficult that this is better?

Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>