diff options
author | Sumit Bose <sbose@redhat.com> | 2014-11-17 17:39:38 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-12-02 20:02:14 +0100 |
commit | 802385896dc1c4e7b8bbd40dcfe3cd131f68e696 (patch) | |
tree | 2e0ac84c39446ef2e1752b4ce732635b6d0e8263 /src/providers/krb5/krb5_ccache.h | |
parent | e36226da4d7d0e8000a25ab310383318e00d58d1 (diff) | |
download | sssd-802385896dc1c4e7b8bbd40dcfe3cd131f68e696.tar.gz sssd-802385896dc1c4e7b8bbd40dcfe3cd131f68e696.tar.xz sssd-802385896dc1c4e7b8bbd40dcfe3cd131f68e696.zip |
krb5: add copy_ccache_into_memory()
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/providers/krb5/krb5_ccache.h')
-rw-r--r-- | src/providers/krb5/krb5_ccache.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/providers/krb5/krb5_ccache.h b/src/providers/krb5/krb5_ccache.h index e47df3665..f3928e644 100644 --- a/src/providers/krb5/krb5_ccache.h +++ b/src/providers/krb5/krb5_ccache.h @@ -53,4 +53,21 @@ errno_t safe_remove_old_ccache_file(const char *old_ccache, const char *new_ccache, uid_t uid, gid_t gid); +/** + * @brief Copy given ccache into a MEMORY ccache + * + * @param[in] mem_ctx Talloc memory context the new ccache name should be + * allocated on + * @param[in] kctx Kerberos context + * @param[in] ccache_file Name of existing ccache + * @param[out] _mem_name Name of the new MEMORY ccache + * + * In contrast to MEMORY keytabs MEMORY ccaches can and must be removed + * explicitly with krb5_cc_destroy() from the memory. Just calling + * krb5_cc_close() will keep the MEMORY ccache in memory even if there are no + * open handles for the given MEMORY ccache. + */ +krb5_error_code copy_ccache_into_memory(TALLOC_CTX *mem_ctx, krb5_context kctx, + const char *ccache_file, + char **_mem_name); #endif /* __KRB5_CCACHE_H__ */ |