diff options
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/secrets.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 8d08d90dcf..71db81c0e4 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -140,13 +140,16 @@ void *secrets_fetch(const char *key, size_t *size) */ bool secrets_store(const char *key, const void *data, size_t size) { + NTSTATUS status; + if (!secrets_init()) { return false; } - return dbwrap_trans_store(db_ctx, string_tdb_data(key), - make_tdb_data((const uint8 *)data, size), - TDB_REPLACE) == 0; + status = dbwrap_trans_store(db_ctx, string_tdb_data(key), + make_tdb_data((const uint8 *)data, size), + TDB_REPLACE); + return NT_STATUS_IS_OK(status); } |