summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/ccache/file/fcc_destry.c4
-rw-r--r--src/lib/krb5/ccache/file/fcc_gprin.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/krb5/ccache/file/fcc_destry.c b/src/lib/krb5/ccache/file/fcc_destry.c
index 659f68983..52c91538c 100644
--- a/src/lib/krb5/ccache/file/fcc_destry.c
+++ b/src/lib/krb5/ccache/file/fcc_destry.c
@@ -31,7 +31,7 @@ krb5_error_code krb5_fcc_destroy(id)
struct stat buf;
unsigned long size;
char zeros[BUFSIZ];
- int ret;
+ int ret, i;
#ifdef OPENCLOSE
((krb5_fcc_data *) id->data)->fd = open(((krb5_fcc_data *) id->data)->
@@ -60,4 +60,6 @@ krb5_error_code krb5_fcc_destroy(id)
#ifdef OPENCLOSE
close(((krb5_fcc_data *) id->data)->fd);
#endif
+
+ return KRB5_OK;
}
diff --git a/src/lib/krb5/ccache/file/fcc_gprin.c b/src/lib/krb5/ccache/file/fcc_gprin.c
index 4f8e7d61a..c4dc97a09 100644
--- a/src/lib/krb5/ccache/file/fcc_gprin.c
+++ b/src/lib/krb5/ccache/file/fcc_gprin.c
@@ -35,6 +35,7 @@ krb5_fcc_get_principal(id, princ)
krb5_ccache id;
krb5_principal *princ;
{
+ krb5_error_code kret;
#ifdef OPENCLOSE
((krb5_fcc_data *) id->data)->fd = open(((krb5_fcc_data *) id->data)->
filename, O_RDONLY, 0);
@@ -44,7 +45,13 @@ krb5_fcc_get_principal(id, princ)
lseek(((krb5_fcc_data *) id->data)->fd, 0, L_SET);
#endif
- return (krb5_fcc_read_principal(princ));
+ kret = krb5_fcc_read_principal(id, princ);
+
+#ifdef OPENCLOSE
+ close(((krb5_fcc_data *) id->data)->fd);
+#endif
+
+ return kret;
}