Op 19/08/2013 om 10:14:40 -0400, schreef Wietse Venema:
> Leo Baltus:
> > However, I did notice that postfix exec()'s new processes using the
> > path to the binaries it got from 
> >         'PATH=symlink_to_postfix/sbin postfix start' 
> > instead of compile-time arguments DEF_COMMAND_DIR DEF_DAEMON_DIR etc.
> 
> The Postfix master(8) daemon executes programs with pathnames
> that are derived from the $daemon_directory value.
> 

Where $daemon_directory defaults to DEF_DAEMON_DIR? 
DEF_DAEMON_DIR is set compile time should be constant.

I set it to e.g. /software/postfix-2.10.1/libexec

> master_ent.c:    serv->path = concatenate(var_daemon_dir, "/", command, (char 
> *) 0);
> master_spawn.c: execvp(serv->path, serv->args->argv);
> 
> The kernel resolves the pathname each time Postfix invokes execvp().
> 
> > I may have been playing with symlink_to_postfix while hunting this down.
> 
> If you swap symlinks, then the result of execvp() will change.
> 

But that would imply that postfix uses a runtime value ($PATH?).

I used to think it would use /software/postfix-2.10.1/libexec untill a
new version comes along and that master would start using 
/software/postfix-x.y/libexec

-- 
Leo Baltus, internetbeheerder                         /\
NPO ICT Internet Services                            /NPO/\
Sumatralaan 45, 1217 GP Hilversum, Filmcentrum, west \  /\/
serviced...@omroep.nl, 035-6773555                    \/

Reply via email to