On Mon, Feb 1, 2016 at 5:13 PM, Jérémie Courrèges-Anglas <[email protected]> wrote: > Gleydson Soares <[email protected]> writes: > >> Hi Landry, >> >> On Sun, Jan 31, 2016 at 09:39:52AM +0100, Landry Breuil wrote: >>> Hi, >>> >>> i'm tinkering with ldapd and writing regress tests for it, and to >>> allow running independent instances (with separate port/control >>> socket/etc) i needed to add the possibility to specify an alternative >>> datadir, which was so far #defined in the code. >>> Patch is pretty simple and works fine, i'm open to suggestions of course >>> on a better wording for the manpage and option choose (i went for -r..) >>> okays welcome too ! >> >> slight tweak, >> looks like it is missing a chdir(3) to check failure if an >> invalid(nonexistent) >> datadir was passed to optarg. >> >> I just added these lines in ldapd.c: >> 159 if (datadir && chdir(datadir)) >> 160 err(1, "chdir"); > > Hum, while a check would be nicer, I prefer when daemons stick to /.
It is. ldape() will take care right afterwards.
