diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-10-27 05:31:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:45:19 -0500 |
commit | e5445967bc2c33b17060b465ac218c2427ceb761 (patch) | |
tree | 4e4d9c1255ee30592626c9ea8cd460ba5ce66772 /source4 | |
parent | 040add3d07135c2e5b384944e72deed1f381f901 (diff) | |
download | samba-e5445967bc2c33b17060b465ac218c2427ceb761.tar.gz samba-e5445967bc2c33b17060b465ac218c2427ceb761.tar.bz2 samba-e5445967bc2c33b17060b465ac218c2427ceb761.zip |
r11316: Kill off a bit more of the old secrets system...
Andrew Bartlett
(This used to be commit c46ef43224ce0384297ffe1934f9ff0a00a4be45)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/passdb/secrets.c | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/source4/passdb/secrets.c b/source4/passdb/secrets.c index 9ebc836acf..5797007975 100644 --- a/source4/passdb/secrets.c +++ b/source4/passdb/secrets.c @@ -50,7 +50,7 @@ static void get_rand_seed(int *new_seed) /* close the secrets database */ void secrets_shutdown(void) { - talloc_free(tdb); + talloc_free(tdb); } /* open up the secrets database */ @@ -87,40 +87,6 @@ BOOL secrets_init(void) return True; } -/* read a entry from the secrets database - the caller must free the result - if size is non-null then the size of the entry is put in there - */ -static void *secrets_fetch(const char *key, size_t *size) -{ - TDB_DATA kbuf, dbuf; - secrets_init(); - if (!tdb) - return NULL; - kbuf.dptr = (uint8_t *)strdup(key); - kbuf.dsize = strlen(key); - dbuf = tdb_fetch(tdb->tdb, kbuf); - if (size) - *size = dbuf.dsize; - free(kbuf.dptr); - return dbuf.dptr; -} - -/************************************************************************ - Routine to fetch the plaintext machine account password for a realm -the password is assumed to be a null terminated ascii string -************************************************************************/ -char *secrets_fetch_machine_password(const char *domain) -{ - char *key; - char *ret; - asprintf(&key, "%s/%s", SECRETS_MACHINE_PASSWORD, domain); - strupper(key); - ret = (char *)secrets_fetch(key, NULL); - free(key); - return ret; -} - - /* connect to the schannel ldb */ |