dsdb encrypted_secrets: Allow "ldb:// and "mdb://" in file path
authorGary Lockyer <gary@catalyst.net.nz>
Mon, 15 Oct 2018 03:02:40 +0000 (16:02 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 19 Oct 2018 07:34:46 +0000 (09:34 +0200)
commit7b59cd74f9f75d85b91c6ca517d0243e7f6bd2e1
tree8e70f2dbf707d0a955d405d8d14b18c1c9c5701a
parente1eee614ca8a3f0f5609a3d9d8ce7ae926de1f9e
dsdb encrypted_secrets: Allow "ldb:// and "mdb://" in file path

Correctly handle "ldb://" and "mdb://" schemes in the file path when
determining the path for the encrypted secrets key file.

When creating a new user and specifying the local file path of the
sam.ldb DB, it was possible to create an account that you could not
login with. The path for the key file was incorrectly calculated
for the "ldb://" and "mdb://" schemes, the scheme was not stripped from
the path and the subsequent open of the key file failed.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13653

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Oct 19 09:34:46 CEST 2018 on sn-devel-144
selftest/knownfail.d/bug13653 [deleted file]
source4/dsdb/samdb/ldb_modules/encrypted_secrets.c