Observation/Question on use of NTSTATUS in the Samba4 code base

Krishna Ganugapati krishnag at centeris.com
Wed Apr 4 01:47:55 GMT 2007


Thank you.

One other question, if I may.

Do you plan to support acf files? Especially,  the notion of
explicit/implicit/and automatic binding handles?

And an associated general understanding question... my RPC wire
semantics are very rusty.

>From your analysis, given that explicit binding handles have to be
passed as a parameter to each procedure, have you found any instances
where the binding has been through explicit handles?

More specifically, in your experience, have you see a specific pattern
where the runtime uses an implicit handle versus when the application
passes its explicit handle for each function. I would expect that the
runtime uses the implicit handle in a consistent pattern on the wire.


----begin-side-bar----
One thing I find interesting is the Samr calls start with an handle open
SamrConnect(,..,.., [out,ref] policy_handle *handle).

Given that the NetAPIs (which wrapper the Samr calls) are basically
stateless calls, why would the Samr calls need a context handle (I'm
wildly speculating that policy_handle is an RPC application context
handle - correct me if I'm wrong)

I guess the general reason is to maintain the access rights after you do
a security descriptor check the first time.  But then that information
needs to be communicated back to the calling client which would need to
pass it in as a parameter -- which the NetAPIs don't provide??
---end-side-bar------


Also, does Samba4 plan to support acf files?

Thanks
Krishna

-----Original Message-----
From: tridge at samba.org [mailto:tridge at samba.org] 
Sent: Tuesday, April 03, 2007 6:16 PM
To: Andrew Bartlett
Cc: Krishna Ganugapati; samba-technical at samba.org
Subject: Re: Observation/Question on use of NTSTATUS in the Samba4 code
base

Krishna,

 > No, SAMR is NTSTATUS.  Others are WERROR, but it is still a minority,
 > and it is the historically less implemented pipes (other key NTSTATUS
 > pipes include NETLOGON and LSA).

Just to expand a bit on Andrew's answer, I've noticed in the past that
for some Win32 calls, the user API uses WERROR, but the underlying
call on the network uses NTSTATUS. So it is possible that you have
seen calls that are WERROR in the documemtation, but which are
NTSTATUS from the point of view of Samba (where we deal with the
underlying network calls).

Cheers, Tridge


More information about the samba-technical mailing list