summaryrefslogtreecommitdiff
path: root/auth
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2016-10-06 09:22:29 +0200
committerStefan Metzmacher <metze@samba.org>2016-12-20 13:52:09 +0100
commitd1ad71ef9f0fe9379eb396ee38909d28c7797ee9 (patch)
tree0f03ed629d824b006221795d5739975abe942504 /auth
parent59cc352ac6c5b763ae9cbf81fe367dd8769863d2 (diff)
downloadsamba-d1ad71ef9f0fe9379eb396ee38909d28c7797ee9.tar.gz
auth/credentials: Move function to free ccaches to the top
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'auth')
-rw-r--r--auth/credentials/credentials_krb5.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/auth/credentials/credentials_krb5.c b/auth/credentials/credentials_krb5.c
index 4c903f2dda4..493cfa60104 100644
--- a/auth/credentials/credentials_krb5.c
+++ b/auth/credentials/credentials_krb5.c
@@ -39,6 +39,21 @@ static void cli_credentials_invalidate_client_gss_creds(
struct cli_credentials *cred,
enum credentials_obtained obtained);
+/* Free a memory ccache */
+static int free_mccache(struct ccache_container *ccc)
+{
+ krb5_cc_destroy(ccc->smb_krb5_context->krb5_context, ccc->ccache);
+
+ return 0;
+}
+
+/* Free a disk-based ccache */
+static int free_dccache(struct ccache_container *ccc) {
+ krb5_cc_close(ccc->smb_krb5_context->krb5_context, ccc->ccache);
+
+ return 0;
+}
+
_PUBLIC_ int cli_credentials_get_krb5_context(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
struct smb_krb5_context **smb_krb5_context)
@@ -122,21 +137,6 @@ static int cli_credentials_set_from_ccache(struct cli_credentials *cred,
return 0;
}
-/* Free a memory ccache */
-static int free_mccache(struct ccache_container *ccc)
-{
- krb5_cc_destroy(ccc->smb_krb5_context->krb5_context, ccc->ccache);
-
- return 0;
-}
-
-/* Free a disk-based ccache */
-static int free_dccache(struct ccache_container *ccc) {
- krb5_cc_close(ccc->smb_krb5_context->krb5_context, ccc->ccache);
-
- return 0;
-}
-
_PUBLIC_ int cli_credentials_set_ccache(struct cli_credentials *cred,
struct loadparm_context *lp_ctx,
const char *name,