Re: Sharing a semaphore between users
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:d3e3645od2dfcbs5dcjh5aohclr7ghabn5@4ax.com...
If the error is still related to security, I'm not sure the
SECURITY_ATTRIBUTES is correct. I'm no expert at this at all,
****
This is amazing. I've spent years avoiding learning about security, but
this prompted me
to try again. How many weeks did it take you to discover this, or is
there someplace it
is deducible without reading the massively complex security docs?
It was several years ago, but I think it took a day or two. I used google
to piece together a solution that gave the desired SECURITY_ATTRIBUTES,
starting with the previously known (to me) SECURITY_WORLD_SID_AUTHORITY. I
tried to learn about the intermediate Sid, EXPLICIT_ACCESS (ACE), ACL,
SECURITY_DESCRIPTOR, but to this day don't know the theory behind those
structures or why so many of them exist. I think there is a book or two
that may cover these well, but after getting this code to work I've not
needed to figure it out anymore.
This is massively more complex than the first example; I'm not sure I
could even create
the logical path by which these functions and values were assembled into
this sequence. Is
there any reasonable reference to how these can be created?
It's not that complicated - you start with one data structure and use it in
the next one. Proceed linearly until you end up with the structure accepted
by the API you need. It looks hard because there are so many unfamiliar
structures and types in so short a space!
I'd like to add something like this to my Systems Programming course,
since I talk about
the \Global technique, but it is so completely incomprehensible that I'm
not sure I can
safely talk about it. But before I even bother to try to understand it, I
wanted to know
if you would give me permission to use this code. If you want, I would be
happy to put
your name in as the creator. But it looks like it would take me several
days to make
sense of this insofar as trying to explain it. (I already have another
blog post in with
a reference to the creator, for integrity levels, but it is hard to
explain. This is
orders of magnitude more complex!) It's a question of whether or not I
have to decode
this far enough to explain it...
Thanks for asking, but I thought any code that is published here is by
definition in the public domain. Of course, please use it however you like.
Maybe one of these days you'll refer to me as someone who had some
interesting stories to tell.... ;)
-- David