1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/lib/ldb
Andrew Bartlett b8aa05525e ldb: ensure that ldbedit operates like ldbmodify: set DONT_CREATE_DB
ldb* tools, when passed a raw filename assume tdb://

By default, ldb_tdb will call tdb with O_CREAT.

TDB, when passed O_CREAT and a not-tdb file, will wipe the file.

This means that if you run ldbedit <path to mdb-format-ldb file> the file
will be wiped, which is unexpected.  I noticed this while trying to
corrupt a sam.ldb backend file (for testing), but instead I wiped it!

Ideally tdb would not do that, but the behaviour has been this way for
decades.  Ideally ldb would have had a "create db" command, but this
has been the job of ldbadd for over a decade.

So this just blunts the knife for ldbedit.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2020-03-02 02:47:30 +00:00
..
ABI ldb: change the version to 2.2.0 for Samba 4.13 2020-02-26 23:11:39 +00:00
common lib ldb common: Fix memory leak 2020-01-15 19:58:41 +00:00
docs
examples
include ldb: Change pack format defines to enum 2019-08-20 03:40:29 +00:00
ldb_key_value ldb: Add mem_ctx argument to ldb_kv_index_key() 2020-02-28 03:08:46 +00:00
ldb_ldap ldb_ldap: use ldb_msg API to add elements 2019-05-10 01:15:18 +00:00
ldb_ldb ldb: Add MDB support to ldb:// 2018-05-23 02:27:12 +02:00
ldb_map ldb_map: check a return value (CID 241354) 2019-05-09 22:39:27 +00:00
ldb_mdb lib ldb ldb_mdb: Pass the lmdb map size as an ldb option 2019-07-02 02:23:09 +00:00
ldb_sqlite3 CVE-2018-1140 ldb: Check for ldb_dn_get_casefold() failure in ldb_sqlite 2018-08-14 13:57:15 +02:00
ldb_tdb lib ldb key value backends: Add nested txn support 2019-06-21 04:27:12 +00:00
man Spelling fixes s/overrided/overridden/ 2019-04-02 01:12:11 +00:00
modules ldb modules: paged_search checks control is not NULL (CID 241355) 2019-05-09 22:39:27 +00:00
nssldb
tests ldb: Add tests aimed at the SCOPE_ONELEVEL bug in particular 2020-02-25 10:38:34 +00:00
tools ldb: ensure that ldbedit operates like ldbmodify: set DONT_CREATE_DB 2020-03-02 02:47:30 +00:00
web
_ldb_text.py ldb/tests/_ldb_text: remove unused imports 2018-10-25 21:45:55 +02:00
configure build: Move python detection back into waf (instead of in configure and Makefile) 2018-12-14 14:40:19 +01:00
Doxyfile
examples.dox
ldb.pc.in
mainpage.dox
Makefile Search for location of waf script 2019-02-26 10:39:24 +01:00
pyldb_util.c pyldb: rename pyldb_Dn_AsDn() to pyldb_Dn_AS_DN() 2019-07-10 04:32:13 +00:00
pyldb-util.pc.in lib/ldb: Enable use of a python3 pyldb-util system library 2017-03-10 07:31:10 +01:00
pyldb.c pyldb: ldb.register_module() checks arguments a little bit 2019-07-10 04:32:13 +00:00
pyldb.h pyldb: rename pyldb_Dn_AsDn() to pyldb_Dn_AS_DN() 2019-07-10 04:32:13 +00:00
README_gcov.txt
wscript ldb: change the version to 2.2.0 for Samba 4.13 2020-02-26 23:11:39 +00:00