[syslog-ng] Patch for launch path bug in syslog-ng.h

Balazs Scheidler bazsi at balabit.hu
Fri Dec 17 10:16:02 CET 2010


On Mon, 2010-12-13 at 16:31 -0800, Matthew Hall wrote:
> On Mon, Dec 13, 2010 at 04:18:48PM -0800, Matthew Hall wrote:
> > --- /home/megahall/wrapper.c	2010-12-13 16:15:29.000000000 -0800
> > +++ syslog-ng-3.2.1/syslog-ng/wrapper.c	2010-12-13 16:14:21.000000000 -0800
> > @@ -45,6 +45,7 @@
> >      putenv(ldlibpath);
> >    }
> >  #endif
> > +  fprintf(stderr, "syslog-ng failed to launch because of XYZ\n");
> >    execv(PATH_SYSLOGNG, argv);
> >    return 127;
> >  }
> 
> Stupid mistake.
> 
> fprintf goes after execv.
> 
> You get the idea.
> 

Thanks for your reports, I've committed and pushed these patches. One of them 
(the libexec change) was also ported to 3.0 and 3.1 since this was broken 
in those releases too.

commit 7a714138c373ed1b1b1e38834d34f40b44505580
Author: Balazs Scheidler <bazsi at balabit.hu>
Date:   Fri Dec 17 10:14:07 2010 +0100

    wrapper: added proper error message if exec() returns an error
    
    In case the main syslog-ng binary is not found, print an error message to
    stderr before exiting with rc=127.
    
    Reported-By: Matthew Hall
    Signed-off-by: Balazs Scheidler <bazsi at balabit.hu>

commit 0ab449d5190b58d60dc7b2647a0ac7ca05ea9144
Author: Balazs Scheidler <bazsi at balabit.hu>
Date:   Fri Dec 17 10:10:26 2010 +0100

    configure: fixed the export of the libexecdir directory if overridden with a configure option
    
    Earlier, libexecdir was constructed in syslog-ng.h using the value of
    the PATH_PREFIX macro, exported by the configure script.
    
    This works OK as long as exec_prefix is not overridden on the
    configure command line.
    
    This patch only changes the instalation layout if exec_prefix is actually
    specified and it has only an effect if --enable-env-wrapper is also used.
    
    Reported-By: Matthew Hall
    Signed-off-by: Balazs Scheidler <bazsi at balabit.hu>


-- 
Bazsi



More information about the syslog-ng mailing list