diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-04-01 11:24:52 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:11:23 -0500 |
commit | 772f31797d22a8ef78e7257bbbd0cb36196af03a (patch) | |
tree | 800e3dcea7abd37e125e8738ed5085aa31ec88ac /testprogs/win32/rpcecho/README | |
parent | 7288298b65b4040d112f06def3c9836aba9ddbaf (diff) | |
download | samba-772f31797d22a8ef78e7257bbbd0cb36196af03a.tar.gz samba-772f31797d22a8ef78e7257bbbd0cb36196af03a.tar.bz2 samba-772f31797d22a8ef78e7257bbbd0cb36196af03a.zip |
r6165: fixed up the userinfo composite code. Fixes include:
- talloc should always be done in the right context. For example, when creating
the userinfo_state structure, place it inside the composite
structure, not directly on the pipe. If this isn't done then
correct cleanup can't happen on errors (as cleanup destroys the top
level composite context only)
- define private structures like userinfo_state in the userinfo.c
code, not in the public header
- only keep the parameters we need in the state structure. For
example, the domain_handle is only needed in the first call, so we
don't need to keep it around in the state structure, but the level is
needed in later calls, so we need to keep it
- always initialise [out,ref] parameters in RPC calls. The [ref] part
means that the call assumes the pointer it has been given is
valid. If you don't initialise it then you will get a segv on
recv. This is why the code was dying.
- don't use internal strucrure elements like the pipe
pipe->conn->pending outside of the internal rpc implementation. That
is an internal list, trying to use it from external code will cause crashes.
- rpc calls assume that rpc call strucrures remain valid for the
duration of the call. This means you need to keep the structures
(such as "struct samr_Close") in the userinfo_state strucrure,
otherwise it will go out of scope during the async processing
- need to remember to change c->state to SMBCLI_REQUEST_DONE when the
request has finished in the close handler, otherwise it will loop
forever trying to close
Mimir, please look at the diff carefully for more detailed info on the fixes
(This used to be commit 01ea1e7762e214e87e74d6f28d6efeb6cdea9736)
Diffstat (limited to 'testprogs/win32/rpcecho/README')
0 files changed, 0 insertions, 0 deletions