summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/tools/ldbrename.c
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-02-01 20:26:12 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-02-09 18:59:19 +0100
commit5e06b21cc1553606efaeae03504e91d811793085 (patch)
tree97d05890620044039ec8bd7d7f38e0c85ffa14d4 /source4/lib/ldb/tools/ldbrename.c
parent22f4030c303224ecc7ee28b0b93d80d27869a4a0 (diff)
downloadsamba-5e06b21cc1553606efaeae03504e91d811793085.tar.gz
samba-5e06b21cc1553606efaeae03504e91d811793085.tar.bz2
samba-5e06b21cc1553606efaeae03504e91d811793085.zip
ldb:tools - always check if ldb connection has been estabilished
Otherwise return "LDB_ERR_OPERATIONS_ERROR".
Diffstat (limited to 'source4/lib/ldb/tools/ldbrename.c')
-rw-r--r--source4/lib/ldb/tools/ldbrename.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/ldb/tools/ldbrename.c b/source4/lib/ldb/tools/ldbrename.c
index e4087f42b8..518358c9a3 100644
--- a/source4/lib/ldb/tools/ldbrename.c
+++ b/source4/lib/ldb/tools/ldbrename.c
@@ -54,6 +54,9 @@ int main(int argc, const char **argv)
TALLOC_CTX *mem_ctx = talloc_new(NULL);
ldb = ldb_init(mem_ctx, NULL);
+ if (ldb == NULL) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
options = ldb_cmdline_process(ldb, argc, argv, usage);