summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Kohl <jtkohl@mit.edu>1990-08-31 14:16:02 +0000
committerJohn Kohl <jtkohl@mit.edu>1990-08-31 14:16:02 +0000
commit56633d2ffc21ceedbdbfba94960f84fa0442b5fb (patch)
tree0affc13834700acbade44f3eb18d8063eac2c47e
parentf6200d5820dbd24ac1b54f00fe14eb7def7cc36f (diff)
downloadkrb5-56633d2ffc21ceedbdbfba94960f84fa0442b5fb.tar.gz
krb5-56633d2ffc21ceedbdbfba94960f84fa0442b5fb.tar.xz
krb5-56633d2ffc21ceedbdbfba94960f84fa0442b5fb.zip
need to update cursor
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1068 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/lib/krb5/keytab/file/ktf_next.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/krb5/keytab/file/ktf_next.c b/src/lib/krb5/keytab/file/ktf_next.c
index 9ec84876a..2d9e05ceb 100644
--- a/src/lib/krb5/keytab/file/ktf_next.c
+++ b/src/lib/krb5/keytab/file/ktf_next.c
@@ -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;