diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-02-01 20:26:12 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2011-02-09 18:59:19 +0100 |
commit | 5e06b21cc1553606efaeae03504e91d811793085 (patch) | |
tree | 97d05890620044039ec8bd7d7f38e0c85ffa14d4 /source4/lib/ldb/tools/ldbrename.c | |
parent | 22f4030c303224ecc7ee28b0b93d80d27869a4a0 (diff) | |
download | samba-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.c | 3 |
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); |