Samba 4 libnet_join and RPC-JOIN torture test
Rafal Szczesniak
mimir at samba.org
Tue Sep 13 13:52:19 GMT 2005
On Tue, Sep 13, 2005 at 07:51:31AM +0200, Stefan (metze) Metzmacher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> using the standard macro, we loose the error string here, so I would propose to use a libnet
> specific macro here,
>
> #define LIBNET_NOT_OK_RETURN(status, tmp_mem, error) do {\
> if (!NT_STATUS_IS_OK(status)) {
> r->out.error_string = talloc_asprintf error;
> talloc_free(tmp_mem);
> return status;
> }
> } while(0)
what specifically does this tmp_mem do here ?
> and use it like this:
>
> status = dcerpc_lsa_OpenPolicy2(c.out.dcerpc_pipe, tmp_ctx, &lsa_open_policy);
> LIBNET_NOT_OK_RETURN(status, tmp_ctx,(mem_ctx,
> "lsa_OpenPolicy2 failed: %s",
> nt_errstr(status)));
>
> abartlet, mimir: happy with such libnet specific macros?
Looks quite fine at the first glance and I can check it in. The only thing
I'm not clear about is tmp_ctx. Is it just function's memory context that
we destroy here, as the function itself fails ?
cheers,
--
Rafal Szczesniak
Samba Team member http://www.samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20050913/264fec3e/attachment.bin
More information about the samba-technical
mailing list