added problems that Saber should hav reported the last time.
authorBarry Jaspan <bjaspan@mit.edu>
Fri, 19 Jan 1990 18:10:29 +0000 (18:10 +0000)
committerBarry Jaspan <bjaspan@mit.edu>
Fri, 19 Jan 1990 18:10:29 +0000 (18:10 +0000)
I mean, FIXED problems that Saber should have reported.
I'm tired.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@151 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/ccache/file/fcc_destry.c
src/lib/krb5/ccache/file/fcc_gprin.c

index 659f689839dded0555a2446ee72b54eec2650eef..52c91538c4b87937c18bb6271572ae063d031b14 100644 (file)
@@ -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;
 }
index 4f8e7d61ad72bd61557235526c522f90e1b64186..c4dc97a0960161aa96abcb47848c628958685b2c 100644 (file)
@@ -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;
 }