| Newsgroups |
gmane.comp.encryption.kerberos.heimdal.general |
| Message-ID |
<[email protected]> |
On Mon, Oct 03, 2011 at 01:46:31PM -0500, Nico Williams wrote:
> To be fair, Heimdal, MIT, and JGSS share the ccache and keytab file formats.
This a definitely good news. Well, it is what I assumed since I began to
use Kerberos (some time last millenium).
Then indeed it makes sense to use a common approach
to handle updates of the files. This would make it more reliable.
(Nevertheless, occational ccache misreading or corruption
is a lot less worrying than would be a lack of a common format.)
> However, I insist that it's perfectly feasible to expect a POSIX
> semantics filesystem on any Unix where one would use a file ccache
I do not mind. What is needed is "how to use the (Posix) file system
for the purpose".
creat()+write()+rename() yields "stale data unless the
cache is reopened" for a reader but does not need any locking;
lock()+truncate()/seek()+write()+unlock() is more complicated and can
lead to an inconsistent reader state. Locking is also a can of worms
itself (what if the writer stalls?).
So I would suggest going creat()+write()+rename(). A reader should
periodically re-open() to refresh its view if necessary. A random new
name makes it safe against name-based attacks.
The crucial thing (not that big actually?) is to document the/some
choice so that the implementors of any team, including future ones,
would have a reference and would be able to write compatible code.
> (does Rune have *any* examples of a Unix with no tmpfs and no UFS
> /var/tmp??), and that otherwise one ought to use CCAPI. One would
No, that was Harald's "side track" example. I am fine with relying
on the presence of some Posix-like writable file system.
Regards,
Rune