auth/credentials: Move function to free ccaches to the top
authorAndreas Schneider <asn@samba.org>
Thu, 6 Oct 2016 07:22:29 +0000 (09:22 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 20 Dec 2016 12:52:09 +0000 (13:52 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
auth/credentials/credentials_krb5.c

index 4c903f2dda431f41b417f0c5ad8db6023254b5be..493cfa60104a46f511c4cd5f5df7f49d556c7a3f 100644 (file)
@@ -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,