summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore13
-rw-r--r--source4/lib/tdb/python/tdbdump.py12
2 files changed, 25 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 8af28d01af..7d87dbff53 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ autom4te.cache
*.x
*.hd
*.ho
+*.pyc
Makefile
configure
source/bin/*
@@ -179,3 +180,15 @@ source/lib/registry/tools/common.h
source/librpc/ndr/ndr_table.h
source/rpc_server/lsa/proto.h
source/torture/winbind/proto.h
+*~
+source/auth/auth_sam_reply.h
+source/auth/session_proto.h
+source/auth/system_session_proto.h
+source/dsdb/common/proto.h
+source/dsdb/schema/proto.h
+source/lib/crypto/test_proto.h
+source/lib/registry/tests/proto.h
+source/lib/util/apidocs
+source/lib/util/util_ldb.h
+source/libcli/ldap/ldap_ndr.h
+source/libcli/resolve/lp_proto.h
diff --git a/source4/lib/tdb/python/tdbdump.py b/source4/lib/tdb/python/tdbdump.py
new file mode 100644
index 0000000000..d759d771c8
--- /dev/null
+++ b/source4/lib/tdb/python/tdbdump.py
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+# Trivial reimplementation of tdbdump in Python
+
+import tdb, sys
+
+if len(sys.argv) < 2:
+ print "Usage: tdbdump.py <tdb-file>"
+ sys.exit(1)
+
+db = tdb.Tdb(sys.argv[1])
+for (k, v) in db.iteritems():
+ print "{\nkey(%d) = %r\ndata(%d) = %r\n}" % (len(k), k, len(v), v)