Re: [Exim] command in programquery returns 127

Góra strony
Delete this message
Reply to this message
Autor: Dale Amon
Data:  
Dla: exim-users
CC: Christian Vogel, Dale Amon
Temat: Re: [Exim] command in programquery returns 127
On Mon, Jul 05, 2004 at 10:57:02AM +0100, Philip Hazel wrote:
> On Fri, 2 Jul 2004, Christian Vogel wrote:
>
> > you could add one line before the _exit() to get a clue
> > why it failed:
> >
> >         log_write(0,LOG_MAIN,"child_open_uid(\"%s\") failed: %s",
> >                 argv[0],strerror(errno));

> >
> > maybe that would also be a good idea for the regular exim-distribution?
> > Or is this a stupid idea? (it is not tested by me).
>
> I'm afraid it's a stupid idea, because it won't work. :-)
>
> The reason is that the process is not running as root or the exim user
> at this point. Therefore, it cannot write to the log file.
>
> Actually, that is not quite true. If the log file has been previously
> opened, then it will be able to write to it, but you can't rely on the
> log file being open.


What I had to do was pull your child_open_uid() out
into a test program of my own and put in file writes
after it changed the fileno's around.

I've found a reason but not a solution to my problem.
Debian sets exim4 to user.group of Debian-exim.Debian-exim,
and loses the capability to set the gid it appears. I've
got a query into the packager about it.

--
------------------------------------------------------
   Dale Amon     amon@???    +44-7802-188325
       International linux systems consultancy
     Hardware & software system design, security
    and networking, systems programming and Admin
          "Have Laptop, Will Travel"
------------------------------------------------------