diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-05-03 13:24:10 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-05-03 07:37:07 +0200 |
commit | 56a5b7d09e0eed66690d87241ee71bca5048e2f8 (patch) | |
tree | 41c68c58ee7ee45d2866fcb72c8c12da21a0d102 /source4/param/secrets.c | |
parent | 2c32534d5ba5d009c48f377aa5aea8e77b4fa316 (diff) | |
download | samba-56a5b7d09e0eed66690d87241ee71bca5048e2f8.tar.gz samba-56a5b7d09e0eed66690d87241ee71bca5048e2f8.tar.bz2 samba-56a5b7d09e0eed66690d87241ee71bca5048e2f8.zip |
s4-param Rename secrets_init() -> randseed_init()
This only sets up the random number generator callback these days, so
use a different database for that.
(All secrets data in Samba4 is in secrets.ldb)
Andrew Bartlett
Diffstat (limited to 'source4/param/secrets.c')
-rw-r--r-- | source4/param/secrets.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/param/secrets.c b/source4/param/secrets.c index 70690a5e3b..0f3c1e36bb 100644 --- a/source4/param/secrets.c +++ b/source4/param/secrets.c @@ -49,22 +49,22 @@ static void get_rand_seed(struct tdb_wrap *secretsdb, int *new_seed) } /** - * open up the secrets database + * open up the randseed database and set the random number generator callback */ -struct tdb_wrap *secrets_init(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) +bool randseed_init(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) { char *fname; uint8_t dummy; struct tdb_wrap *tdb; - fname = lpcfg_private_path(mem_ctx, lp_ctx, "secrets.tdb"); + fname = lpcfg_private_path(mem_ctx, lp_ctx, "randseed.tdb"); tdb = tdb_wrap_open(mem_ctx, fname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); if (!tdb) { DEBUG(0,("Failed to open %s\n", fname)); talloc_free(fname); - return NULL; + return false; } talloc_free(fname); @@ -79,7 +79,7 @@ struct tdb_wrap *secrets_init(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_c /* Ensure that the reseed is done now, while we are root, etc */ generate_random_buffer(&dummy, sizeof(dummy)); - return tdb; + return true; } /** |