[Samba] Re: python bindings api
tpot at samba.org
Thu May 22 23:31:17 GMT 2003
On Wed, May 21, 2003 at 05:48:11PM -0500, Brett A. Funderburg wrote:
> secdesc = cnn.query_secdesc(fnum)
> Which raises the error:
> prs_mem_get: reading data of size 2 would overrun buffer.
> Failed to parse secdesc
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> RuntimeError: query_secdesc failed
This looks like a problem in Samba's unmarshalling of security
descriptors. I'd be interested in seeing a debug level 10 log of what
is happening here. Add 'debug level = 10' to your smb.conf file to
> - What are the valid values for FLAGS in the nt_create_andx api?
There are several places to look for this information. The CIFS
technical reference document at:
or the source for Samba, or the source for ethereal. I'm afraid the
protocol isn't terribly well documented. Your best bet would be the
> - Why does 'query_secdesc' fail with a RuntimeError?
Probably a bug in Samba.
> - Am I using the api correctly; is this the correct order to call the
> api for querying the secdesc of a file?
I think your code above is correct.
> The example code doesn't help much in this regard.
As an historical note, the python smb module is more of an experiment that
anything particularly useful at the moment. I was initially using it to
write some tests for a security descriptor project I was working on.
I've only implemented the bare minimum number of calls required to get
and set security descriptors on a file share.
More information about the samba