1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

85 Commits

Author SHA1 Message Date
Jelmer Vernooij
5548d3d41e Add missing dependencies for com_err. 2010-10-05 00:38:35 +02:00
Matthieu Patou
9dcad792b6 pyldb: test return code before trying to talloc_steal
Otherwise you can have an error on the talloc_steal as the req can have
been not talloced yet
2010-10-04 19:42:19 +00:00
Andrew Tridgell
c95c3863df pyldb: expose PyLdbDn_FromDn()
This is needed by the dsdb python interface

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-09 21:39:24 +10:00
Matthieu Patou
e2d575ee80 python-ldb: allow ldb_rename to take optional control(s) 2010-09-05 12:29:20 +04:00
Andrew Tridgell
d55b19b56a pyldb: do type checking on the list form of ldb add
Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
2010-08-22 14:57:34 +10:00
Kamen Mazdrashki
8deae13313 s4-pyldb: Use ldb_msg_difference() in py_ldb_msg_diff()
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-19 17:33:34 +10:00
Andrew Bartlett
3e8dba1703 s4:pyldb whitespace fix 2010-07-15 22:08:22 +10:00
Andrew Bartlett
fcdf619b36 s4:pyldb Fix memory handling for ldb_message_element
The problem here is that we need to use the array, not the individual
message element as the memory context.

Andrew Bartlett
2010-07-15 22:08:22 +10:00
Matthieu Patou
b67a71f00b ldb: allow ldb_sequence_number to be called in python
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-15 22:08:20 +10:00
Matthias Dieter Wallnöfer
d7ad7eed24 ldb:pyldb.c - introduce a "mem_ctx" also on "py_ldb_search"
To prevent memory leaks
2010-06-20 18:52:27 +02:00
Matthias Dieter Wallnöfer
00bf608481 ldb:pyldb.c - some cleanups and adequations also in "py_ldb_modify" and "py_ldb_rename"
To make them consistent.
2010-06-20 18:52:26 +02:00
Matthias Dieter Wallnöfer
ca34ffaaac ldb:python bindings - some small cleanup & improvements in "py_ldb_add"
Also to make it similar to "py_ldb_delete".
2010-06-19 17:53:21 +02:00
Matthias Dieter Wallnöfer
2aeea4bb4d ldb:python bindings - let also "py_ldb_delete" support controls 2010-06-19 17:53:20 +02:00
Matthias Dieter Wallnöfer
99c9e358c5 ldb:pyldb.c - we cannot use "ldb_dn_compare" if both message DNs are NULL in "py_ldb_msg_compare"
Discovered by the testcase.
2010-06-07 21:26:33 +02:00
Matthieu Patou
e2061095b5 s4:ldb python bindings - implement comparison on Python LDB Message objects
Coauthors: Jelmer Vernooij, Matthias Dieter Wallnöfer
2010-06-07 11:58:29 +02:00
Jelmer Vernooij
41cdac9c3e pyldb: Remove duplicate copy of function. 2010-05-31 20:45:14 +02:00
Jelmer Vernooij
cc6e2b8a81 s4-python: Fix formatting, import of FLG_NOSYNC. 2010-04-08 23:20:36 +02:00
Matthias Dieter Wallnöfer
baf81a0e08 LDB:python bindings - also empty LDB message elements should have a python representation
Bug found by ekacnet (see technical mailing list).
2010-04-07 20:40:06 +02:00
Jelmer Vernooij
099fc00b60 Add C-based Samba-specific subclass of Ldb. 2010-04-06 13:12:43 +02:00
Andrew Tridgell
9ba0d105cc s4-pyldb: null terminate string ldb message elements from python
We need to eventually get rid of ldb_msg_find_attr_as_string() (or add
a mem_ctx to it), but meanwhile we have too many places that break if
we don't add a nul to the end of ldb msg strings from python.
2010-02-12 01:08:11 +11:00
Jelmer Vernooij
5b9e98a382 provision/pyldb: Avoid linking in static python ldb module. 2009-12-21 23:40:12 +01:00
Andrew Bartlett
2fd831407d s4:ldb Provide bindings for ldb_transaction_prepare_commit() 2009-11-27 16:05:04 +11:00
Nadezhda Ivanova
a760f169f4 Some changes to allow processing of ldap controls on modify requests.
ldap_backend used to filter out ldap controls on modify. Also, modified
python binding for ldap_modify to allow writing tests for such controls.
2009-11-20 13:22:38 +02:00
Matthias Dieter Wallnöfer
cc080742bd ldb:python bindings - add a context on "py_ldb_delete"
So the converted DN will be freed after usage.
2009-11-15 14:26:41 +01:00
Matthias Dieter Wallnöfer
4c79fbfbe5 ldb:python bindings - make the intention by Jelmer ("int" vs. "enum") more clear 2009-10-27 19:11:15 +01:00
Matthias Dieter Wallnöfer
aa46400cb2 Revert "ldb python bindungs - better use the "enum ldb_scope" for the search scope rather than "int""
This reverts commit 4f8826ff7f.

Jelmer pointed out that the "enum"s don't work so well in combination with python.
2009-10-27 19:07:53 +01:00
Matthias Dieter Wallnöfer
4f8826ff7f ldb python bindungs - better use the "enum ldb_scope" for the search scope rather than "int" 2009-10-23 14:26:41 +02:00
Andrew Tridgell
3050f83288 s4-python: we need to include Python.h first
If we don't include Python.h first then we get a pile of warnings due
to broken redefines of XOPEN_SOURCE in the Python includes.
2009-10-23 16:23:01 +11:00
Andrew Tridgell
c45a81ecf3 s4-pyldb: fixed 64 bit issues
The python argument parse functions take standard C types, not enums
and time_t. This broken the python interface on PPC.
2009-10-19 21:36:41 +11:00
Matthieu Patou
977a0aa273 pythonbindings: allow add() to have an array of controls as second parameter 2009-10-02 12:45:00 +02:00
Matthias Dieter Wallnöfer
c173c1beb1 s4:pyldb - Wrong error type (found only after the push) 2009-10-01 14:02:59 +02:00
Matthias Dieter Wallnöfer
54ea150f36 s4:ldb_msg_diff - Fixes up possible memory leaks and the python binding of it 2009-10-01 13:59:02 +02:00
Matthias Dieter Wallnöfer
ad549072aa s4:pyldb - Fixed the return value in "py_ldb_msg_diff"
The case distinction shouldn't be needed also when "diff" is NULL.
"PyLdbMessage_FromMessage" works with "NULL" arguments.
2009-09-30 16:01:17 +02:00
Matthieu Patou
9a9202e7bd pythonbindings: allow add() to have an array of controls as second parameter
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-09-26 01:31:38 +02:00
Jelmer Vernooij
667b825d18 pyldb: Don't segfault when invalid type is specified to Dn.get().
(#6722)
2009-09-14 17:03:30 +02:00
Andrew Bartlett
425386ff61 s4:ldb Add ldb_ldif_write_string() and python wrappers
This allows us to turn a python LdbMessage back into a string.

Andrew Bartlett
2009-08-26 15:59:00 +10:00
Andrew Bartlett
3ed33813bb s4:ldb Add hooks to get/set the flags on a ldb_message_element
Also add tests to prove that we got this correct, and correct the
existing tests which used the wrong constants.

Andrew Bartlett
2009-08-26 15:07:50 +10:00
Andrew Bartlett
7234a24f82 s4:ldb Add python binding and test for ldb_msg_diff() 2009-08-24 20:24:18 +10:00
Andrew Bartlett
e71ce2f9e3 s4:ldb Python requires that a 'compare' handler return -1, 0 or 1 2009-08-21 17:51:52 +10:00
Matthias Dieter Wallnöfer
faedda0455 s4:ldb python bindings: Handle the parameters of the connect call in the right way 2009-08-17 11:58:38 +02:00
Jelmer Vernooij
46bd2271b2 pyldb: Fix reference counting on ldb_message_elements, add extra type
check.
2009-08-05 03:44:25 +02:00
Andrew Bartlett
3e3f64f05f s4:ldb initialise e->values[i].length before use in python bindings 2009-08-05 10:35:45 +10:00
Jelmer Vernooij
15d73317ea pyldb: Properly keep copies of Python string contents, rather than
relying on reference leaks :-)
2009-08-04 00:18:42 +02:00
Jelmer Vernooij
bb944dcf64 pyldb: Raise proper exception when attempting to assign a string to a dn
attribute.
2009-08-03 18:15:16 +02:00
Jelmer Vernooij
d356669492 Remove pyldb_util and simply duplicate the 5-line function it contains,
rather than creating a separate shared library for it.
2009-07-18 16:11:21 +02:00
Andrew Bartlett
f45a9d63e5 s4:ldb Rework use of talloc and ldif objects in python wrapper
The talloc hirarchy here was a bit odd - we would both steal the
parsed ldif onto 'NULL', then reference it onto a python talloc
wrapper.

Now we just leave the reference, after we complete building the object.

Andrew Bartlett
2009-07-06 09:50:47 +10:00
Jelmer Vernooij
832b929dde pyldb: Fix three more (minor) memory leaks. 2009-06-17 20:45:40 +02:00
Jelmer Vernooij
4d2baca7be pyldb: Fix memory leak in Dn.get_parent(). 2009-06-17 20:45:39 +02:00
Jelmer Vernooij
0c3769e181 pyldb: Fix memory leak in Dn.concat. 2009-06-17 20:45:39 +02:00
Jelmer Vernooij
a61e11468a pyldb: Fix another memory leak and reference counting error. 2009-06-17 20:45:39 +02:00