librpc/spoolss fixes for Samba 4

Fábio Ramon framon at monzeu.eti.br
Tue Dec 27 05:49:20 MST 2011


Hi,

I'm coding some bugs fixes for the Samba4 python version of librpc spoolss
and I would like to share it. I also would like to discuss a minor feature
in python error handler. Is someone working in this component?

I'm sending six patches. The last three contains changes that I really
don't know the Samba way to code it.

[PATCH 4/6] librpc/spoolss: Fix undefined security_descriptor
The C Preprocessor understand that block, but PIDL Compiler don't,
generating incorrect code. After rename all ocurrences
from spoolss_security_descriptor to security_descriptor, I tried to remove
the cpp_quote define, but the source3 failed to compile.

Other way to fix it is changing pidl/lib/Parse/Pidl/Samba4/Python.pm: sub
use_type_variable in the same way that is done for dom_sid structure. See
the FIXME at that function.


[PATCH 5/6] pidl: Supports converting string_array type
I decided to put the funcions on that file because of
existing PyString_FromStringOrNULL.


[PATCH 6/6] pidl: Add error information on Python Exception
Can this feature break the Samba Python API?


Just a background:

I have been developing a software (bunch of scripts) to manage, automate
and delegate some tasks related to print queues on a Linux Print Server
with Windows Clients environment since 2008. Due to restriction of my
company, the software was build using RHEL 5 + Samba 3.0 + Python bindings.
At that time, I had to fix some minor SegFault bugs despite having seen
that the python bindings were so deprecated and that it would be removed
from source code.

Now, since RHEL 6 comes with Samba 3.5 and since Samba 3.0 rpclient
protocol does not talk to Samba 3.5,  I'm migrating the software to Samba 4.


Regards,

--
Fábio Ramon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s4-librpc-Add-spoolss-python-module-to-build-script.patch
Type: text/x-patch
Size: 1017 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20111227/dc2ce28f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-librpc-spoolss-Fix-undeclared-security-constants.patch
Type: text/x-patch
Size: 1379 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20111227/dc2ce28f/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-pidl-Fix-pointer-reference-while-accessing-an-array-.patch
Type: text/x-patch
Size: 2184 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20111227/dc2ce28f/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-librpc-spoolss-Fix-undefined-security_descriptor.patch
Type: text/x-patch
Size: 2613 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20111227/dc2ce28f/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-pidl-Supports-converting-string_array-type.patch
Type: text/x-patch
Size: 3363 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20111227/dc2ce28f/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-pidl-Add-error-information-on-Python-Exception.patch
Type: text/x-patch
Size: 2217 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20111227/dc2ce28f/attachment-0005.bin>


More information about the samba-technical mailing list