Revert "tdbtool: fix off-by-one error in argument length. (bug #2344)"
authorMichael Adam <obnox@samba.org>
Wed, 9 Jul 2008 11:02:54 +0000 (13:02 +0200)
committerMichael Adam <obnox@samba.org>
Wed, 9 Jul 2008 11:02:54 +0000 (13:02 +0200)
commit3992c8e3a38d925d0b9f4989099ef86fbe917305
tree51f9e402367f3e4e98944b6524b103e2fb61d5e2
parentdd781951fb9acc556f1bd6760b72151a7c359a9f
Revert "tdbtool: fix off-by-one error in argument length. (bug #2344)"

This reverts commit dd781951fb9acc556f1bd6760b72151a7c359a9f.

This fix is not valid:

1. convert_string() is not only used for key strings but also for data.

2. Some databases use string_tdb_data() i.e. non-null-terminated strings
   as keynames and others (like the one I was using), use
   string_term_tdb_data(), i.e. zero-terminated key strings.

After discussion with Metze, the easiest (and proper way) to
handle this is to specify key names as "keyname\0" for databases
which use string_term_tdb_data().

Sorry for the noise...

Michael
source/tdb/tools/tdbtool.c