Subject: Bug#4354: movemail doesn't work

From: Ian Jackson <[email-masked]>
Date: Sun, 1 Sep 96 17:08 BST

Mark W. Eichin writes ("Bug#4354: movemail doesn't work"):
...
> As shipped, it *was* installed setuid root + setgid mail... could you
> check your installation and verify, and perhaps be more specific about
> movemail's complaint?  Also include the actual modes of your
> /var/spool/mail directory, and an indication of what you're using to
> invoke movemail. 

Why does movemail need to be setuid root ?!

> % ar p /p/a1/debian/mirror/binary/editors/emacs_19.31-2.deb data.tar.gz | tar tzvf - | grep movemail
> -rwsr-sr-x root/mail     14516 1996-06-03 00:05 usr/lib/emacs/19.31/i386-debian-linux/movemail

You mean:
 dpkg --fsys-tarfile .../editors/emacs_19.31-2.deb |tar tzvf - |grep movemail
or even, since you just wanted it listed:
 dpkg --contents .../editors/emacs_19.31-2.deb |grep movemail

The `ar' format is a piece of internal knowledge which you shouldn't
need to make use of.

Ian.

---

From: [email-masked] (Mark W. Eichin)
Date: 01 Sep 1996 17:50:38 -0400

> Why does movemail need to be setuid root ?!

Well, the package as I inherited had the following in debian.rules:

	# movemail is installed setuid so that POP can work.  (This is
	# safe.)
	chmod u+s  \
	  debian-tmp/usr/lib/emacs/$(v)/$(t)/movemail

I suspect this has to do with using movemail locally on a machine
which is also a pop server, but I haven't verified that. (The emacs
build "blessmail" process will only make it setgid mail.)  Anyone else
remember?

> dpkg --fsys-tarfile .../editors/emacs_19.31-2.deb |tar tzvf - |grep movemail

Nope, doesn't work.  Ahh -- it's tar tvf, not tar tzvf.

> dpkg --contents .../editors/emacs_19.31-2.deb |grep movemail

Ah, indeed.  For some reason I thought it didn't give the modes, but I
was probably confusing it with --listfiles, which doesn't.

Still haven't heard from the original reporter what, if anything,
explains why his movemail wasn't installed properly...

---

From: Ian Jackson <[email-masked]>
Date: Mon, 2 Sep 96 00:31 BST

Mark W. Eichin writes ("Re: Bug#4354: movemail doesn't work"):
> [Ian:]
...
...
> build "blessmail" process will only make it setgid mail.)  Anyone else

This sounds doubtful to me ..

...
> explains why his movemail wasn't installed properly...

He wasn't the guy on linux-security who unsetuidded everything and
said none of his users had complained ... ? :-)

Ian.

---

From: [email-masked] (Michael Shields)
Date: Mon, 2 Sep 1996 01:25:12 -0400

> Michael Shields <[email-masked]> writes:
> > Package: emacs
> > Version: 19.31-2
> > 
> > movemail complains about not being able to write a temp file in
> > /var/spool/mail.
> > 
> > One fix might be to make it setgid mail, iff the code is written to be
> > sufficiently paranoid.
> 
> movemail's complaint?

Ack -- I'm embarassed.  VM found another movemail in my path, a broken
one, and used that instead.

But this seem to have exposed a real bug: why *is* the real movemail
suid root?
-- 
Shields, CrossLink.