From: Andrew Bartlett Date: Mon, 9 Apr 2018 09:15:25 +0000 (+1200) Subject: dsdb: Allow search before init() call in encrypted_secrets X-Git-Url: http://git.samba.org/?p=metze%2Fsamba%2Fwip.git;a=commitdiff_plain;h=a755c413c87155b8dd94d6938ae2ddbd1e328403 dsdb: Allow search before init() call in encrypted_secrets Simply do not decrypt anything until the init call is run. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13379 Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- diff --git a/source4/dsdb/samdb/ldb_modules/encrypted_secrets.c b/source4/dsdb/samdb/ldb_modules/encrypted_secrets.c index 87ec9e4eb539..ef69bb0831c9 100644 --- a/source4/dsdb/samdb/ldb_modules/encrypted_secrets.c +++ b/source4/dsdb/samdb/ldb_modules/encrypted_secrets.c @@ -1365,7 +1365,7 @@ static int es_search_post_process(struct ldb_module *module, /* * Decrypt any encrypted secret attributes */ - if (data->encrypt_secrets) { + if (data && data->encrypt_secrets) { int err = decrypt_secret_attributes(ldb, msg, data); if (err != LDB_SUCCESS) { return err;