1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-26 23:33:15 +03:00

r12227: I realised that I wasn't yet seeing authenticated LDAP for the ldb

backend.

The idea is that every time we open an LDB, we can provide a
session_info and/or credentials.  This would allow any ldb to be remote
to LDAP.  We should also support provisioning to a authenticated ldap
server.

(They are separate so we can say authenticate as foo for remote, but
here we just want a token of SYSTEM).

Andrew Bartlett
This commit is contained in:
Andrew Bartlett
2005-12-14 07:22:25 +00:00
committed by Gerald (Jerry) Carter
parent 57ea480c24
commit ae2f3a64ee
16 changed files with 113 additions and 43 deletions

View File

@@ -62,15 +62,12 @@ NTSTATUS sldb_Init(struct ldapsrv_partition *partition, struct ldapsrv_connectio
url = lp_parm_string(-1, "ldapsrv", "samdb");
if (url) {
ldb = ldb_wrap_connect(mem_ctx, url, 0, NULL);
ldb = ldb_wrap_connect(mem_ctx, url, conn->session_info,
NULL, 0, NULL);
if (ldb == NULL) {
talloc_free(mem_ctx);
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
if (ldb_set_opaque(ldb, "sessionInfo", conn->session_info)) {
talloc_free(mem_ctx);
return NT_STATUS_NO_MEMORY;
}
talloc_steal(partition, ldb);
partition->private = ldb;
talloc_free(mem_ctx);