If version is not FVNO_4, do not seek forwar a random stack value.
authorEzra Peisach <epeisach@mit.edu>
Thu, 15 Feb 1996 20:07:29 +0000 (20:07 +0000)
committerEzra Peisach <epeisach@mit.edu>
Thu, 15 Feb 1996 20:07:29 +0000 (20:07 +0000)
Also check resturn status of lseek.

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

src/lib/krb5/ccache/file/ChangeLog
src/lib/krb5/ccache/file/fcc_skip.c

index 2628c31e762c88848fafb14d0071f38f30a1dd0a..af8e13c20c32db58a5369e5eb858da758878b8fd 100644 (file)
@@ -1,7 +1,13 @@
+Thu Feb 15 14:55:56 1996  Ezra Peisach  <epeisach@kangaroo.mit.edu>
+
+       * fcc_skip.c (krb5_fcc_skip_header): If version is not FVNO_4, do not
+               seek forward a random stack value.
+
 Thu Feb  1 15:45:23 1996  Sam Hartman  <hartmans@tertius.mit.edu>
 
        * fcc_retrv.c (ktype_reasonable): removed.
-       (krb5_fcc_retrieve): Accept any enctype unless specific enctype is being matched.
+       (krb5_fcc_retrieve): Accept any enctype unless specific enctype is
+               being matched. 
 
 Wed Jan 24 21:36:34 1996  Sam Hartman  <hartmans@tertius.mit.edu>
 
index c54cfe389178cda88b3b013b86dcdde6e3602e11..2f51aeee50e0251f13ad28c2fae131acb283d1ce 100644 (file)
@@ -41,8 +41,9 @@ krb5_fcc_skip_header(context, id)
      if (data->version == KRB5_FCC_FVNO_4) {
         kret = krb5_fcc_read_ui_2(context, id, &fcc_flen);
         if (kret) return kret;
+        if(lseek(data->fd, fcc_flen, SEEK_CUR) < 0)
+                return errno;
      }
-     lseek(data->fd, fcc_flen, SEEK_CUR);
      return KRB5_OK;
 }