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
Jelmer Vernooij
0c16676642
pyldb: Fix memory leak of LdbMessage's created from Python.
2009-06-17 20:45:38 +02:00
Jelmer Vernooij
d558d8ab94
pyldb: Fix two memory leaks of attribute lists.
2009-06-17 20:45:37 +02:00
Jelmer Vernooij
c3770f1dc0
pyldb: Fix segfault, freeing memory too early in search.
2009-06-17 20:45:37 +02:00
Jelmer Vernooij
2f27d0c762
pyldb: Support getting the parent of special DNs without segfaulting.
...
Found by: Андрей Григорьев <andrew@ei-grad.ru>
2009-06-17 20:45:37 +02:00
Volker Lendecke
b4d7607a52
Fix some nonempty blank lines
2009-06-06 10:42:55 +02:00
Jelmer Vernooij
6ace18904d
Fix more unresolved symbols.
2009-06-02 18:05:41 +02:00
Jelmer Vernooij
960b755315
pyldb: Let conversion to LDIF up to the user of the API rather than doing
...
it implicitly.
2009-03-21 02:19:25 +01:00
Jelmer Vernooij
de1e3e2cf0
Remove unnecessary duplication of string in memory.
2009-03-21 01:00:18 +01:00
zahari
4fff36f618
Setting nTSecurityDescriptor via LDAP fails
...
Fix for the problem was substitute talloc_strndup() with
talloc_memdup(), allocate 1 more character and put null character
('\0') in the extra place so data copied is null terminated.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-03-20 22:54:15 +01:00
Jelmer Vernooij
ee577ef0ee
Add more comments.
2009-03-20 22:52:57 +01:00
Jelmer Vernooij
722dc9eed3
pyldb: Improve exception message when a list is expected.
2009-03-20 00:33:43 +01:00
Stefan Metzmacher
1d22e0ecef
s4:pyldb: fix compiler warnings
...
metze
2009-02-05 17:48:11 +01:00