libmsrpc registry key handle suggestions

Gerald (Jerry) Carter jerry at
Thu Jul 14 17:57:50 GMT 2005

Hash: SHA1

Chris Nicholls wrote:
| So i started working on figuring out what
| functionality to provide and how it would
| work (keeping the server handle in the back of my mind).
| I decided to start with the winreg pipe, and a small
| question has  arisen, that is how to deal with
| multiple registry key handles (ie if you open a registry
| key, and then open a subkey of that key then there are
| 2 open registry key handles).  At first I wanted to
| keep as much  data as possible in the MsRpcServerHandle
| and not force the user to worry about it.

This actually blurs the the distinction between the
server handle and the application data handle (e.g.
a registry key).  A handle should be an opaque data
structure that represents and object.

The server handle should contain the necessary data
to send rpc requests.  For example, the client
connection structure, table of tids to named pipes, etc...

| 2. Force the developer to manage their own open
| key handles
|    - This is probably the most straightforward
| approach for everyone.  The developer has to worry
| about the specific key handles, but they are open to
| do whatever they like with them.

This is preferable to me since it scales and allows
the application to deal with specific keys, users,
etc...  It also matches the rpc api better.  The
application handles correspond to the POLICY_HND*
in the rpc interface and the server handle actually
represents the underlying named pipe connections.

cheers, jerry
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -


More information about the samba-technical mailing list