need to update cursor
authorJohn Kohl <jtkohl@mit.edu>
Fri, 31 Aug 1990 14:16:02 +0000 (14:16 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Fri, 31 Aug 1990 14:16:02 +0000 (14:16 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1068 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/keytab/file/ktf_next.c

index 9ec84876ae94eb1468c69f4db3ba60376154a63f..2d9e05ceb8269f2eff61a1868b5ccb9c1bbd0819 100644 (file)
@@ -25,16 +25,17 @@ krb5_error_code
 krb5_ktfile_get_next(id, entry, cursor)
 krb5_keytab id;
 krb5_keytab_entry *entry;
-krb5_kt_cursor cursor;
+krb5_kt_cursor *cursor;
 {
-    long fileoff = *(long *)cursor;
+    long *fileoff = (long *)cursor;
     krb5_keytab_entry *cur_entry;
     krb5_error_code kerror;
 
-    if (fseek(KTFILEP(id), fileoff, 0) == -1)
+    if (fseek(KTFILEP(id), *fileoff, 0) == -1)
        return KRB5_KT_END;
     if (kerror = krb5_ktfileint_read_entry(id, &cur_entry))
        return kerror;
+    *fileoff = ftell(KTFILEP(id));
     *entry = *cur_entry;
     xfree(cur_entry);
     return 0;