diff options
author | Günther Deschner <gd@samba.org> | 2009-10-27 14:59:25 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-10-28 12:37:38 +0100 |
commit | bda047afbc4188bce0538ad128bea000c9652388 (patch) | |
tree | 4aa9cc818119462f065b4d4608a48695e2df7397 /source3/passdb | |
parent | 7791d29c79e3bb7d4759ba9c31151d268df2d247 (diff) | |
download | samba-bda047afbc4188bce0538ad128bea000c9652388.tar.gz samba-bda047afbc4188bce0538ad128bea000c9652388.tar.xz samba-bda047afbc4188bce0538ad128bea000c9652388.zip |
s3-passdb: add secrets_delete_generic().
Guenther
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/secrets.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 29e0662396..01919b76ef 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -1211,6 +1211,22 @@ bool secrets_store_generic(const char *owner, const char *key, const char *secre return ret; } +bool secrets_delete_generic(const char *owner, const char *key) +{ + char *tdbkey = NULL; + bool ret; + + if (asprintf(&tdbkey, "SECRETS/GENERIC/%s/%s", owner, key) < 0) { + DEBUG(0, ("asprintf failed!\n")); + return False; + } + + ret = secrets_delete(tdbkey); + + SAFE_FREE(tdbkey); + return ret; +} + /******************************************************************* Find the ldap password. ******************************************************************/ |