summaryrefslogtreecommitdiff
path: root/lib/ntdb/test
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-06-19 12:38:33 +0930
committerRusty Russell <rusty@rustcorp.com.au>2012-06-19 05:38:06 +0200
commit89b0d5ac6cd7f2c47148a9ac87ce8d6aea40050b (patch)
tree7834c6c649151ccdfb1a8bd4a6e2fffa57354896 /lib/ntdb/test
parent7fae6c44e2ffd720af406d1e0b48c08007091aab (diff)
downloadsamba-89b0d5ac6cd7f2c47148a9ac87ce8d6aea40050b.tar.gz
samba-89b0d5ac6cd7f2c47148a9ac87ce8d6aea40050b.tar.bz2
samba-89b0d5ac6cd7f2c47148a9ac87ce8d6aea40050b.zip
ntdb: simply disallow NULL names.
TDB allows this for internal databases, but it's a bad idea, since the name is useful for logging. They're a hassle to deal with, and we'd just end up putting "unnamed" in there, so let the user deal with it. If they don't, they get an informative core dump. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/ntdb/test')
-rw-r--r--lib/ntdb/test/helprun-layout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ntdb/test/helprun-layout.c b/lib/ntdb/test/helprun-layout.c
index c8f1fd03c4..7f1f9f9d8e 100644
--- a/lib/ntdb/test/helprun-layout.c
+++ b/lib/ntdb/test/helprun-layout.c
@@ -313,7 +313,7 @@ struct ntdb_context *ntdb_layout_get(struct ntdb_layout *layout,
/* Fill with some weird pattern. */
memset(mem, 0x99, off);
/* Now populate our header, cribbing from a real NTDB header. */
- ntdb = ntdb_open(NULL, NTDB_INTERNAL, O_RDWR, 0, attr);
+ ntdb = ntdb_open("layout", NTDB_INTERNAL, O_RDWR, 0, attr);
memcpy(mem, ntdb->file->map_ptr, sizeof(struct ntdb_header));
/* Mug the ntdb we have to make it use this. */