summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2001-12-03 04:15:26 +0000
committerTim Potter <tpot@samba.org>2001-12-03 04:15:26 +0000
commit25ea74978f4ef8ae8c605e6ba559b2e57fccd407 (patch)
treedeca098025f4b0bde889955a6c7c0a1cda6ac0a8
parent7f9fe00d35e0d4d8cd08a740d95558b43f1a52e5 (diff)
downloadsamba-25ea74978f4ef8ae8c605e6ba559b2e57fccd407.tar.gz
samba-25ea74978f4ef8ae8c605e6ba559b2e57fccd407.tar.bz2
samba-25ea74978f4ef8ae8c605e6ba559b2e57fccd407.zip
Don't display any data if tdb_fetch() failed in the tdbtool "fetch"
command. (This used to be commit a1cf70ab65058258e56ffcff5b28087b29425b1c)
-rw-r--r--source3/tdb/tdbtool.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/tdb/tdbtool.c b/source3/tdb/tdbtool.c
index 4198d12418..31ecd17a0c 100644
--- a/source3/tdb/tdbtool.c
+++ b/source3/tdb/tdbtool.c
@@ -253,7 +253,10 @@ static void show_tdb(void)
key.dsize = strlen(k)+1;
dbuf = tdb_fetch(tdb, key);
- if (!dbuf.dptr) terror("fetch failed");
+ if (!dbuf.dptr) {
+ terror("fetch failed");
+ return;
+ }
/* printf("%s : %*.*s\n", k, (int)dbuf.dsize, (int)dbuf.dsize, dbuf.dptr); */
print_rec(tdb, key, dbuf, NULL);
}