Re: checkcdb-0.53 + single pop user setup

Chris Johnson <[email protected]> Mon, 2 Dec 2002 06:19:44 -0500
Newsgroups gmane.comp.djb.cdb,gmane.comp.djb.checkpassword
Message-ID <[email protected]>
On Mon, Dec 02, 2002 at 12:39:17PM +0200, [email protected] wrote:
> I'm having trouble getting the following setup to work.  In a
> nutshell, it works fine under uid=root and gid=root, but not as user
> qmailv, as executed via /service/qmail-pop3d/run. ie. the usual
> telnet 0 110 test works when run under root, and root successfully
> executes:

[...]
 
> #!/bin/sh
> 
> QVUID=`id -u qmailv`
> QVGID=`id -g qmailv`
> MAXPOP3=`head -1 /var/qmail/control/concurrencypop3d`
> 
> exec softlimit -m 2000000 tcpserver -v -R -H -l 0 -x \
> /etc/tcprules/pop3.cdb -c "$MAXPOP3" -u "$QVUID" -g "$QVGID" 0 \
> 110 /var/qmail/bin/qmail-popup localhost /usr/bin/checkcdb \
> /var/qmail/bin/qmail-pop3d inbox 2>&1

qmail-popup/checkcdb has to run as root. Once the user is authenticated,
checkcdb (or whatever checkpassword you're using) needs to switch to that
user's uid to execute qmail-pop3d, and only root can do that.

Chris