summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/ldbrename.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-11-27 14:18:39 +1100
committerAndrew Tridgell <tridge@samba.org>2009-11-27 16:05:06 +1100
commit7ea485a1d20c1bf41926ebb4b0ae8f37a2d909f7 (patch)
treeefd3f120d51f52cd4f7af9440660acfe19b32702 /source4/lib/ldb/tools/ldbrename.c
parentd3d7ca8eeab13c00705188102855525a21dd5345 (diff)
downloadsamba-7ea485a1d20c1bf41926ebb4b0ae8f37a2d909f7.tar.gz
samba-7ea485a1d20c1bf41926ebb4b0ae8f37a2d909f7.tar.bz2
samba-7ea485a1d20c1bf41926ebb4b0ae8f37a2d909f7.zip
s4-ldb: better to test for valid arguments in ldb library than commandline
We were testing for valid DNs in ldbrename in the command line tool. This hid a bug in the ldb library where we caught a bad DN in the objectclass module rather than in the main ldb code. It is better to do validation of the DNs passed on the command line in the library code, as this gives us more consistent error handling between the programming APIs for ldb and the command line.
Diffstat (limited to 'source4/lib/ldb/tools/ldbrename.c')
-rw-r--r--source4/lib/ldb/tools/ldbrename.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/source4/lib/ldb/tools/ldbrename.c b/source4/lib/ldb/tools/ldbrename.c
index fcae766a20..bfccacc206 100644
--- a/source4/lib/ldb/tools/ldbrename.c
+++ b/source4/lib/ldb/tools/ldbrename.c
@@ -63,15 +63,6 @@ int main(int argc, const char **argv)
dn1 = ldb_dn_new(ldb, ldb, options->argv[0]);
dn2 = ldb_dn_new(ldb, ldb, options->argv[1]);
- if ( ! ldb_dn_validate(dn1)) {
- printf("Invalid DN1: %s\n", options->argv[0]);
- return -1;
- }
- if ( ! ldb_dn_validate(dn2)) {
- printf("Invalid DN2: %s\n", options->argv[1]);
- return -1;
- }
-
ret = ldb_rename(ldb, dn1, dn2);
if (ret == 0) {
printf("Renamed 1 record\n");