On Tue, 3 Jan 2006, I wrote:
> On Sat, 24 Dec 2005, Stanislaw Halik wrote:
>
> > a while ago I made a patch, causing Exim to set resource limits (via a
> > login_cap(3) library functions) when running a pipe transport.
>
> > I'd be very grateful for any comments about the patch.
>
> I will take a look in due course, but it probably won't be for a couple
> of weeks at the earliest.
Well, I'm afraid it took longer than that, but here I am eventually.
The patch itself looks small and reasonable, but you have put it in the
wrong place. Exim changes uid and gid for a number of different reasons,
not only for running a pipe transport. The correct place would be inside
the pipe transport, or if privilege is needed, in a setup function for
the pipe transport (which does not currently have a setup function).
Another problem is that the functions you have used (login_cap,
login_getpwclass, setclassresources) all appear to be BSD-specific. They
don't exist in Linux or Solaris. They exist in FreeBSD - I don't know if
they exist in OpenBSD or NetBSD.
I suppose a compile-time flag such as HAVE_LOGIN_CAP could be invented,
and set for FreeBSD, and then a new option could be made available
to enable this functionality in the pipe transport. I will put this on
the WishList.
Anybody else on this list care to comment? Is this a feature that many
(FreeBSD) users want?
Philip
--
Philip Hazel University of Cambridge Computing Service,
ph10@??? Cambridge, England. Phone: +44 1223 334714.