storage tweaks
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10934 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -139,6 +139,7 @@ krb4_kt_start_seq_get_int (krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
c->sp = krb5_storage_from_fd(c->fd);
|
||||
krb5_storage_set_eof_code(c->sp, KRB5_KT_END);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -187,7 +188,7 @@ read_v4_entry (krb5_context context,
|
||||
krb5_free_principal (context, ed->entry.principal);
|
||||
return ret;
|
||||
}
|
||||
ret = c->sp->fetch(c->sp, key, 8);
|
||||
ret = krb5_storage_read(c->sp, key, 8);
|
||||
if (ret < 0) {
|
||||
krb5_free_principal(context, ed->entry.principal);
|
||||
return ret;
|
||||
@@ -274,7 +275,7 @@ krb4_store_keytab_entry(krb5_context context,
|
||||
ret = krb5_store_stringz(sp, instance);
|
||||
ret = krb5_store_stringz(sp, realm);
|
||||
ret = krb5_store_int8(sp, entry->vno);
|
||||
ret = (*sp->store)(sp, entry->keyblock.keyvalue.data, 8);
|
||||
ret = krb5_storage_write(sp, entry->keyblock.keyvalue.data, 8);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -301,6 +302,7 @@ krb4_kt_add_entry (krb5_context context,
|
||||
}
|
||||
}
|
||||
sp = krb5_storage_from_fd(fd);
|
||||
krb5_storage_set_eof_code(sp, KRB5_KT_END);
|
||||
if(sp == NULL) {
|
||||
close(fd);
|
||||
return ENOMEM;
|
||||
|
Reference in New Issue
Block a user