[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [OpenAFS-devel] Re: MEMORY credential cache interop between Heimdal and MIT?
>> - I don't see how to do locking of the mmap()'d region in a reasonable
>> manner. My issue with Sys V semaphores is that they don't clean themselves
>> up. I could use a shared descriptor to coordinate access ... but that
>> gets back to all of the other problems with shared descriptors. I imagine
>> you could come up with some scheme, but I think it would be a bit hinky
>> and not cover all of the corner cases.
>
>Right, so use POSIX semaphores instead.
Ah, I was not aware of them. Looks like they'd work just fine.
>The only real difference between the mmap idea and the descriptor-inheritance
>ccache that it appears you've already written is that this one requires an
>extra step (mmap) but then makes accessing the credentials a little simpler
>(since you can just walk through memory instead of having to read/parse a file).
Well, in my implementation the credential cache server ends up storing
the credentials in memory cache, so that isn't an issue. What ended up
being tedious to write is the actual RPC between the clients and the
credential cache server. Using mmap() might have made that easier.
--Ken