pidl:Samba4/Client: don't mix rpc and application NTSTATUS errors anymore for the new bindings

Andrew Bartlett abartlet at samba.org
Tue Apr 6 02:52:32 MDT 2010


On Tue, 2010-04-06 at 10:42 +0200, Stefan (metze) Metzmacher wrote:

> What about this:
> 
> If the function defined in IDL returns NTSTATUS, WERROR or some other
> defined type, then we do something like this:
> 
> if (NT_STATUS_IS_OK(status) && !NT_STATUS_IS_OK(r.out.result)) {
> 	status = NT_STATUS_RPC_NOT_RPC_ERROR;
> }
> 
> So that returned NTSTATUS from a stub function will only return
> NT_STATUS_OK, if both status codes are OK.
> 
> This way we would avoid magic mapping and still make sure callers only
> have to check one variable, if they only care about success and failure.

I think I understand - will that be the same error we currently use, or
something else?  Also, can we we have the current mapping for these
cases, or do you have some reason to avoid that?

> Advanced callers would also be able to disable this behavior by setting
> a flag on the dcerpc_binding_handle.

Good.

> Does that sound ok for you?

This is exactly the kind of thing what I was hoping for. 

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Cisco Inc.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100406/6bae8afd/attachment.pgp>


More information about the samba-technical mailing list