pretend that empty files are non-existant
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9273 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -336,12 +336,17 @@ init_fcc (krb5_context context,
|
|||||||
int fd;
|
int fd;
|
||||||
int8_t pvno, tag;
|
int8_t pvno, tag;
|
||||||
krb5_storage *sp;
|
krb5_storage *sp;
|
||||||
|
krb5_error_code ret;
|
||||||
|
|
||||||
fd = open(fcache->filename, O_RDONLY | O_BINARY);
|
fd = open(fcache->filename, O_RDONLY | O_BINARY);
|
||||||
if(fd < 0)
|
if(fd < 0)
|
||||||
return errno;
|
return errno;
|
||||||
sp = krb5_storage_from_fd(fd);
|
sp = krb5_storage_from_fd(fd);
|
||||||
krb5_ret_int8(sp, &pvno);
|
ret = krb5_ret_int8(sp, &pvno);
|
||||||
|
if(ret == KRB5_CC_END)
|
||||||
|
return ENOENT;
|
||||||
|
if(ret)
|
||||||
|
return ret;
|
||||||
if(pvno != 5) {
|
if(pvno != 5) {
|
||||||
krb5_storage_free(sp);
|
krb5_storage_free(sp);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
Reference in New Issue
Block a user