1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-06 08:23:50 +03:00

r7777: allow for overriding the location of the sam databasein the ldap server, using

ldapsrv:samdb option. This allows the following:

          sam database=ldap://localhost
          ldapsrv:samdb=tdb:///home/tridge/samba/samba4/prefix/private/sam.ldb

which allows us to test putting the sam on an ldap server using our
own ldap server. This is a great stress test for the ldap code.
This commit is contained in:
Andrew Tridgell
2005-06-20 04:59:10 +00:00
committed by Gerald (Jerry) Carter
parent 9fa21b2458
commit 40948ba384
3 changed files with 27 additions and 13 deletions

View File

@@ -255,3 +255,17 @@ NTSTATUS ldapsrv_do_call(struct ldapsrv_call *call)
return ldapsrv_unwilling(call, 2);
}
}
/*
connect to the sam database
*/
struct ldb_context *ldapsrv_sam_connect(struct ldapsrv_call *call)
{
const char *url;
url = lp_parm_string(-1, "ldapsrv", "samdb");
if (url) {
return ldb_wrap_connect(call, url, 0, NULL);
}
return samdb_connect(call);
}