John Peacock wrote:
> David Sparks wrote:
>
>> I'm not a daemontools expert, is this expected?
>
>
> Yes. The documentation for setuidgid:
>
> <http://cr.yp.to/daemontools/setuidgid.html>
>
> doesn't mention anything about resetting ENV variables (and DJB would
> say something if it did).
>
> I don't like removing the existing code to bias things towards using the
> getpwuid() call. Rather, I would just set $HOME to whatever you want it
> to be before you call setuidgid (because the existing ENV values are
> preserved).
Gotcha.
> I would also be interested in knowing what code is trying to use
> $HOME/tmp and how you got qpsmptd to work without using tcpserver (or
> running the forkserver variant).
I'm using the high_perf branch ... it doesn't seem to need tcpserver.
The tmp part comes from this in lib/Qpsmtpd.pm:
sub spool_dir {
my $self = shift;
unless ( $spool_dir ) { # first time through
$self->log(LOGINFO, "Initializing spool_dir");
$spool_dir = $self->config('spool_dir')
|| Qpsmtpd::Utils::tildeexp('~/tmp/');
Looking at that snippet it now occurs to me that I should've set
spool_dir in a config file somewhere and avoided this altogether.
Cheers,
ds