1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

28 Commits

Author SHA1 Message Date
Stefan Metzmacher
aae9da9803 ldb:pyldb: add some const to PyObject_FromLdbValue()
PyString_FromStringAndSize() makes a copy of the value...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-05-02 01:19:19 +02:00
Matthias Dieter Wallnöfer
0c2fbe5a0c samba:python - Py_RETURN_NONE remove compatibility code for releases < 2.4
http://www.python.org/doc//current/c-api/none.html

Reviewed-By: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date(master): Thu Jan  9 16:27:47 CET 2014 on sn-devel-104
2014-01-09 16:27:47 +01:00
Volker Lendecke
cbb5c1ce39 pyldb: Fix CID 1034792 Dereference null return value
Add a NULL check

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-08-19 11:08:25 +12:00
Matthieu Patou
0602009b99 pyldb: decrement ref counters on py_results and quiet warnings
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Tue Aug  6 00:32:46 CEST 2013 on sn-devel-104
2013-08-06 00:32:46 +02:00
Andrew Bartlett
979215ad59 pyldb: Add bindings for ldb_dn_remove_base_components 2012-07-06 22:55:49 +10:00
Andrew Bartlett
8d99b398d9 pyldb: Fix dn concat operation to be the other way around
This now concatonates Dn(ldb, "cn=config") + Dn(ldb, "dc=samba,dc=org") as "cn=config,dc=samba,dc=org"

Andrew Bartlett
2012-07-06 22:45:33 +10:00
Andrew Bartlett
657af5a274 pyldb: Ensure that the ldb argument is really an ldb before we dereference 2012-06-11 11:44:07 +02:00
Jelmer Vernooij
ebe04fc652 pyldb: Fix some more long lines, fix formatting.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Fri Mar  2 05:26:56 CET 2012 on sn-devel-104
2012-03-02 05:26:56 +01:00
Jelmer Vernooij
e29a9f4af7 pyldb: Avoid using PyErr_LDB_ERROR_IS_ERR_RAISE where PyErr_SetLdbError suffices.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Mar  1 23:06:55 CET 2012 on sn-devel-104
2012-03-01 23:06:55 +01:00
Matthias Dieter Wallnöfer
1e46ccba5a LDB:pyldb.c - use always the case insensitive comparison for attribute names
We can make no assumptions about our users

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-02-13 09:49:12 +11:00
Matthieu Patou
f05edc0ecb pyldb: raise an exception if we can't add the attribute 2012-01-03 06:47:10 +01:00
Jelmer Vernooij
03e5f581ae pyldb: Add more docstrings.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Dec  8 22:08:49 CET 2011 on sn-devel-104
2011-12-08 22:08:49 +01:00
Andrew Tridgell
58457e6cd2 pyldb: enhanced get() method on msg object
get() now takes a default value and an idx, allowing for much easier
usage

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-11-10 14:24:21 +11:00
Jelmer Vernooij
21be155af8 pyldb: Remove duplicate definition of SYNTAX_DN. 2011-11-02 18:35:38 +01:00
Matthias Dieter Wallnöfer
21d053d120 ldb:pyldb.c - py_ldb_* modification calls - error string shouldn't be set here
As discussed with Jelmer, we shouldn't be setting a generic LDB error string
only for the Python bindings alone. This should be done in "ldb_request"
and "ldb_wait" - the common place for all possible LDB access mechanisms.

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-10-11 08:42:07 +02:00
Jelmer Vernooij
6589f1712f pyldb: Drop unnecessary dependency on pytalloc-util.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Sep 18 17:23:40 CEST 2011 on sn-devel-104
2011-09-18 17:23:40 +02:00
Matthias Dieter Wallnöfer
3a759e0375 ldb:pyldb.c - "py_ldb_rename" remove superflous "ldb" pointer
Reviewed-by: Jelmer

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Tue Sep 13 18:11:18 CEST 2011 on sn-devel-104
2011-09-13 18:11:18 +02:00
Matthias Dieter Wallnöfer
e3213bb4d0 ldb:pyldb.c - point out that "PyLdbResult_AsResult" does not convert everything
Reviewed-by: Jelmer
2011-09-11 17:32:58 +02:00
Andrew Tridgell
8ab3c843b1 pyldb: added OID_COMPARATOR constants
This also changes the other constants to remove the LDB_ prefix, which
is redundent

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-01 15:23:09 +10:00
Andrew Tridgell
4655a5bf7c pyldb: fixed a warning
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-25 07:39:37 +10:00
Matthias Dieter Wallnöfer
87b482a89e ldb - two cosmetic fixes
@ldb.h: Removes an invalid comment line
@pyldb.c: Fixes indentation
2011-08-19 19:31:03 +02:00
Stefan Metzmacher
a5fdf05d6c pyldb: fix uninitialized memory bug in PyArg_ParseTuple() argument
"s#", &str, &len) required 'len' as 'int' not as 'Py_ssize_t'.
With Py_ssize_t the 2nd half of a 64bit Py_ssize_t, will be
uninitialized as 'int' is only 32bit.

metze
2011-08-08 16:45:27 +02:00
Jelmer Vernooij
fdff105854 pyldb: Consistently use pyldb_ prefix. 2011-08-07 17:08:56 +02:00
Andrew Tridgell
a7f3545b82 pyldb: return a copy of key constant DNs via python interface
this prevents an easy coding error where the caller modifies one of
the key DNs for the database, by using an add_child function or
similar

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-03 14:25:38 +10:00
Andrew Tridgell
7ce4aca029 pyldb: added binary_encode() and binary_decode() methods
this gives access to RFC2254 encoding from python

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>
2011-07-29 18:17:44 +10:00
Andrew Tridgell
a36af1a501 pyldb: use dn.is_child_of() instead of dn.compare_base()
the compare_base() C API doesn't really fit well in python, as it
returns 0 for true. Better to have a boolean function for the python
interface.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-07-21 11:44:36 +10:00
Matthieu Patou
521556ceed ldb-python: add a function to Dn object to compare the Dn with a base DN 2011-07-21 11:44:34 +10:00
Andrew Bartlett
8420a36dc7 ldb: make ldb a top level library for Samba 4.0
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-05 17:24:47 +10:00