Add krb5_storage_truncate

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24226 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-01-11 21:39:41 +00:00
parent c85a02340e
commit a54887f054
4 changed files with 52 additions and 0 deletions

View File

@@ -60,6 +60,12 @@ fd_seek(krb5_storage * sp, off_t offset, int whence)
return lseek(FD(sp), offset, whence);
}
static off_t
fd_trunc(krb5_storage * sp, off_t offset)
{
return ftruncate(FD(sp), offset);
}
static void
fd_free(krb5_storage * sp)
{
@@ -93,6 +99,7 @@ krb5_storage_from_fd(int fd)
sp->fetch = fd_fetch;
sp->store = fd_store;
sp->seek = fd_seek;
sp->trunc = fd_trunc;
sp->free = fd_free;
return sp;
}