auth: Add cli_credentials_ccache_get()
authorAndreas Schneider <asn@samba.org>
Thu, 6 Oct 2016 14:32:16 +0000 (16:32 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Feb 2019 12:39:20 +0000 (13:39 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
auth/credentials/credentials.h
auth/credentials/credentials_krb5.c

index 5a5bbb2c3bd1d5d2df443d5c76460b7d16b0f423..4159c65a964a30a6f8d98d9ac442f2edb1fb0eec 100644 (file)
@@ -169,6 +169,7 @@ bool cli_credentials_ccache_init(struct cli_credentials *cred,
 bool cli_credentials_ccache_reinit(struct cli_credentials *cred,
                                   struct loadparm_context *lp_ctx);
 bool cli_credentials_ccache_destroy(struct cli_credentials *cred);
+struct ccache_container *cli_credentials_ccache_get(struct cli_credentials *cred);
 NTSTATUS cli_credentials_set_stored_principal(struct cli_credentials *cred,
                                              struct loadparm_context *lp_ctx,
                                              const char *serviceprincipal);
index 46a7b05fe682ada1f3435bb9ea6cfa0ca7de65a8..b48a9d30741faa5f9f90096773cf658260367d98 100644 (file)
@@ -402,6 +402,18 @@ _PUBLIC_ bool cli_credentials_ccache_reinit(struct cli_credentials *cred,
        return ok;
 }
 
+/**
+ * @brief Get the credential cache containter
+ *
+ * @param[in]  cred     The cli_credentials to get the ccache from.
+ *
+ * @return A pointer to the credential cache containter or NULL on error.
+ */
+_PUBLIC_ struct ccache_container *cli_credentials_ccache_get(struct cli_credentials *cred)
+{
+       return cred->krb5_ccache;
+}
+
 static int cli_credentials_set_from_ccache(struct cli_credentials *cred, 
                                           struct ccache_container *ccache,
                                           enum credentials_obtained obtained,