Re: [Exim] Exim 4.10 on FreeBSD

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Igor Karpov
CC: exim-users
Assumpte: Re: [Exim] Exim 4.10 on FreeBSD
On Sat, 25 Jan 2003, Igor Karpov wrote:

> and here:
> ------
>         /* No need to re-exec */
>   queue_run(NULL, NULL, FALSE);
>   {
>    FILE *f =
>    fopen("/var/log/exim/queuelog","a");
>    fprintf(f, "Reached this point: queue_run(NULL, NULL, FALSE)\n");
>    fclose(f);
>   }
>   _exit(EXIT_SUCCESS);
> ------                                          }

>
> /var/log/exim/queuelog contains:
>
> Reached this point: daemon_sigalarm_seen
> Reached this point: daemon_sigalarm_seen
>
> So, the second checkpoint wasn't reached. If you need to print out some
> variables, let me know which ones.


But there is another branch in that code. If you are running a standard
configuration, the daemon won't be running as root. So it won't in fact
reach the second point. The code is like this:

        /* Re-exec if privilege has been given up */


        if (geteuid() != root_uid)
          {
          uschar opt[8];
          uschar *p = opt;


          *p++ = '-';
          *p++ = 'q';
          if (queue_2stage) *p++ = 'q';
          if (queue_run_first_delivery) *p++ = 'i';
          if (queue_run_force) *p++ = 'f';
          if (deliver_force_thaw) *p++ = 'f';
          if (queue_run_local) *p++ = 'l';
          *p = 0;


          (void)child_exec_exim(CEE_EXEC_PANIC, FALSE, NULL, TRUE, 1, opt);
          /* Control never returns here. */
          }


        /* No need to re-exec */


        queue_run(NULL, NULL, FALSE);
        _exit(EXIT_SUCCESS);


You should put your second checkpoint before the child_exec_exim() call,
because that will be the normal route.


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.