1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

kdc: Mark KDC sam.ldb as not to use ldb_wrap cache

This will ensure that the time which will be is passed in an opaque is
not used by other parts of Samba

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
This commit is contained in:
Andrew Bartlett 2024-05-30 11:43:04 +12:00
parent e178f6b0e9
commit fe61009002

View File

@ -4037,7 +4037,10 @@ NTSTATUS samba_kdc_setup_db_ctx(TALLOC_CTX *mem_ctx, struct samba_kdc_base_conte
/* /*
* Caller is responsible for lifetimes. In reality * Caller is responsible for lifetimes. In reality
* the whole thing is destroyed before leaving the * the whole thing is destroyed before leaving the
* function the samdb was passed into * function the samdb was passed into.
*
* We assume this DB is created from python and so
* can't be in the ldb_wrap cache.
*/ */
kdc_db_ctx->samdb = base_ctx->samdb; kdc_db_ctx->samdb = base_ctx->samdb;
} else { } else {
@ -4054,7 +4057,7 @@ NTSTATUS samba_kdc_setup_db_ctx(TALLOC_CTX *mem_ctx, struct samba_kdc_base_conte
base_ctx->lp_ctx, base_ctx->lp_ctx,
session_info, session_info,
NULL, NULL,
0); SAMBA_LDB_WRAP_CONNECT_FLAG_NO_SHARE_CONTEXT);
if (kdc_db_ctx->samdb == NULL) { if (kdc_db_ctx->samdb == NULL) {
DBG_WARNING("Cannot open samdb for KDC backend!\n"); DBG_WARNING("Cannot open samdb for KDC backend!\n");
talloc_free(kdc_db_ctx); talloc_free(kdc_db_ctx);