ldb_tdb: Make sure max_key_length != 0 requires a GUID index mode
authorGary Lockyer <gary@catalyst.net.nz>
Tue, 6 Mar 2018 02:27:51 +0000 (15:27 +1300)
committerStefan Metzmacher <metze@samba.org>
Thu, 12 Apr 2018 13:05:29 +0000 (15:05 +0200)
commitb6c4e692d8c49e640d089ee14b45af8782c63d50
tree46b7802b300ae4d94437c86387a7f2bb121012f7
parent5b3c994ef48dbaeab75f50efc0ad3ad601f3dfe6
ldb_tdb: Make sure max_key_length != 0 requires a GUID index mode

We need to enforce the GUID index mode so end-users do not get a supprise
in mid-operation and we enforce a max key length of 511 so that the
index key trunctation is done correctly.

Otherwise the DB will appear to work until a very long key (DN or index)
is used, after which it will be sad.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/ldb/ldb_tdb/ldb_tdb.c