diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-19 12:38:33 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-06-19 05:38:06 +0200 |
commit | 89b0d5ac6cd7f2c47148a9ac87ce8d6aea40050b (patch) | |
tree | 7834c6c649151ccdfb1a8bd4a6e2fffa57354896 /lib/ntdb/ntdb.h | |
parent | 7fae6c44e2ffd720af406d1e0b48c08007091aab (diff) | |
download | samba-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/ntdb.h')
-rw-r--r-- | lib/ntdb/ntdb.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/ntdb/ntdb.h b/lib/ntdb/ntdb.h index f2b80023cd..1a011fddf5 100644 --- a/lib/ntdb/ntdb.h +++ b/lib/ntdb/ntdb.h @@ -89,7 +89,7 @@ typedef struct TDB_DATA NTDB_DATA; /** * ntdb_open - open a database file - * @name: the file name (can be NULL if flags contains NTDB_INTERNAL) + * @name: the file name (or database name if flags contains NTDB_INTERNAL) * @ntdb_flags: options for this database * @open_flags: flags argument for ntdb's open() call. * @mode: mode argument for ntdb's open() call. @@ -680,8 +680,7 @@ void ntdb_unset_attribute(struct ntdb_context *ntdb, * ntdb_name - get the name of a ntdb * @ntdb: the ntdb context returned from ntdb_open() * - * This returns a copy of the name string, made at ntdb_open() time. If that - * argument was NULL (possible for a NTDB_INTERNAL db) this will return NULL. + * This returns a copy of the name string, made at ntdb_open() time. * * This is mostly useful for logging. */ |