[ale] Pine and the mail spool

ari myo at thy.dyn.ml.org
Sat Oct 3 03:14:23 EDT 1998


Hat (hackrat at psiu.ml.org) said this stuff:

> On Fri, 2 Oct 1998, ari wrote:
> 
> > make pine setgid-mail
> > 
> > chgrp mail pine (or chown root.mail pine)
> > chmod 2755 pine (or 2711, doesn't matter)
> 
> That allows you to use pine to look at anyone's 
> e-mail! You put a symlink to anyone's inbox in your
> ~/mail directory, and list folders.

not unless sendmail is erroneously (and dangerously) configured.

note that /var/spool/mail has owners/permissions of root.mail/775, but the
FILES INSIDE the directory have owners/permissions of
<user>.{mail|users}/600.  hence, pine can write to the directory, but no one
can read anyone's mail but his own.

It does, however, allow pine to create lock files in that directory.

> 
> That doesn't make the message go away and it allows people
> to use pine to do things they shouldn't be able to do.

yes, it does make the message "go away".  you can try it, if you like.  no one
can do anything that isn't intended, if configured properly.

> 
> Nor does is explain why the permissions below leave something
> vunerable.......

because it can't create a lock file.  any other program can change the mailbox
at the same time as pine because it can't lock the mailbox.


some people may in fact keep important things readable/writeable only to a
certain user AND mail... and these people won't want to use this method.  but
for most intents and purposes, it is really not insecure.  but it is the only
way to satisfy the permission failure which causes that message while keeping
ownership/permissions set to root.mail/775.

myself, i keep /var/spool/mail at 1777, and don't give any special permissions
to pine.  but i'm paranoid like that -- i keep all of 3 files globally
setuid-root on my system.  i don't expect others to be; especially not those
who don't wish to spend time reading FAQs.

ari


> 
> > > I used to have it the permissions/ownerships
> > > 
> > > drwxrwxr-x   2 root     mail
> > > 
> > > What is wrong with this and what makes this vunerable???
> 
> This is what I'm really wondering about! 
> 
> -Hat






More information about the Ale mailing list