[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unlink without check in lib/krb5/fcache.c in fcc_initialize



2003-01-29, sze keltezéssel Love ezt írta:
> Balazs GAL <balsa@rit.bme.hu> writes:
> 
> > Hi!
> >
> > I think it is potentialy dangerous to call
> > unlink in fcc_initialize without any check. Why not call
> > the erase_file function in lib/krb5/fcache.c?
> 
> I'm reading mit-krb5-1.2.6, and it does unlinks the file too.
> 
> the macro MAYBE_OPEN uses krb5_fcc_open_file, krb5_fcc_open_file will do
> that if FCC_OPEN_AND_ERASE is set.

a 
krc = krb5_cc_resolve(context, v5_path, &ccache);
if (krc == KRB5_SUCCESS) {
      krc = krb5_cc_initialize(context, ccache,
                               stash->v5_creds.client);
}
semms, that doesn't unlink it. So I think the default value of
data->mode is FCC_OPEN_RDWR.
 
> Why do you think it would be dangerous ?

Sorry sorry , I was tired. It isn't.

balsa