Commit: 0920e0b63b806c8ed4839271048dd4924ed02b2b

tridge at tridge at
Fri Nov 27 22:32:23 MST 2009

Hi Kamen,

 > Actually the bug you've fixed with this commit is not a bug - it was 
 > intended to work that way on purpose :).

it was a bug I think :-)

 > My aim was to make it work as follows:
 > 1. If LDB_URL is set in environment, then test uses this url and 
 >    temporary LDB used for testing is not deleted after test is done.
 >    This way we can exam data in LDB if anything goes wrong and we
 >    need to review data used for testing.

it is far too dangerous. The environment variable LDB_URL is the
standard environment variable used by the ldb tools to avoid using the
-H option. It is not uncommon for someone to set this to point at a
real LDB. In my case I had it pointed at my sam.ldb, which meant that
running "make test" not only failed, it also corrupted by sam database.

 > Could we just use another name for the environment variable used?

no, please don't use an environment variable for this sort of thing.

If you want to have a way to override the location of this test ldb,
then use lp_parm_string() and then pass the location using the
--option command line option. To see some examples of this, try:

  git grep lp_parm_string source4/torture/

for example, you could have:

  ldb_url = lp_parm_string(tctx->lp_ctx, NULL, "drstest", "ldb_url");

and then set it with:

  --option drstest:ldb_url=foo.ldb

Cheers, Tridge

More information about the samba-technical mailing list