On Fri, Nov 30, 2001 at 09:43:56AM -0700, Tren Blackburn wrote:
> If you notice though, you call vchkpw from tcpserver with flags that set
> it's UID and GID, so you're not running vchkpw as root at all, tcpserver is
> invoked as root and then switches to the UID and GID specified
> (vpopmail.vchkpw in this case)

Of course what you are saying is impossible since vchkpw makes
open-smtp owned by root (see my original message at the end).

I do have to start tcpserver as root since I popauthenticate
from /etc/passwd as well:

# cat /var/service/qmail-pop3d/run
#! /bin/bash
exec 2>&1

CDB="/var/service/qmail-pop3d/tcprules.cdb"
#CHKPASS="/bin/checkpassword"
CHKPASS="/home/vpopmail/bin/vchkpw"
HOST="$(head -1 /var/qmail/control/me)"
PATH=/var/qmail/bin:/command:/usr/local/bin:/bin:/usr/bin:/usr/sbin; export PATH
PORT="pop-3"
SOFTLIMIT="softlimit -m 3000000"
TCPSERVER="tcpserver -v -c40 -UX -x$CDB 0 $PORT"
USER="root"
COMMAND="qmail-popup $HOST $CHKPASS qmail-pop3d Maildir"

exec envuidgid $USER \
$SOFTLIMIT \
$TCPSERVER \
$COMMAND

My point is that vchkpw and clearopensmtp are not giving the same
ownership to open-smtp* although both are run as root.

Mate

> > -----Original Message-----
> > From: Mate Wierdl [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, November 29, 2001 2:06 PM
> > To: Vpopmail List
> > Subject: Re: location of open-smtp
> >
> >
> > On Thu, Nov 29, 2001 at 01:34:32PM -0600, Mate Wierdl wrote:
> > > Kind'a answering my own question: open-smtp is always put in
> > > ~vpopmail/etc.  Indeed, configure.in has
> > >
> > > open_smtp_cur="$vpopmaildir/etc/open-smtp"
> > > open_smtp_tmp="$vpopmaildir/etc/open-smtp.tmp"
> > > open_smtp_lok="$vpopmaildir/etc/open-smtp.lock"
> >
> > But they get root:root if tcpserver was running as root.  Hence if you
> > change later to running tcpserver as vpopmail, things get screwed.
> >
> > On the other hand, clearopensmtp (run by root!) changes the ownership
> > back to vpopmail:vchkpw on open-smtp.  Should not vchkpw and
> > clearopensmtp do the same thing as far as ownership is concerned?
> >
> > Mate
> >
> >
> >
> 

-- 
---
Mate Wierdl | Dept. of Math. Sciences | University of Memphis  

Reply via email to