summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-04-04 02:01:47 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-04-06 13:12:43 +0200
commite9c3f2ef13f62eb583bd7c5dfb6b94a0a8a0fc4f (patch)
tree98fa5618f4983c8ffb2ec39a585c305ce1af70fe /source4/scripting/python
parentae9761349904ac9c4c2745018903d8c2fcc2abf1 (diff)
downloadsamba-e9c3f2ef13f62eb583bd7c5dfb6b94a0a8a0fc4f.tar.gz
samba-e9c3f2ef13f62eb583bd7c5dfb6b94a0a8a0fc4f.tar.bz2
samba-e9c3f2ef13f62eb583bd7c5dfb6b94a0a8a0fc4f.zip
s4-python: Move ldb_set_utf8_casefold to pyldb-samba.
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/pyglue.c18
-rw-r--r--source4/scripting/python/samba/__init__.py14
2 files changed, 3 insertions, 29 deletions
diff --git a/source4/scripting/python/pyglue.c b/source4/scripting/python/pyglue.c
index 0aee9c3ea3..8a4d6d0723 100644
--- a/source4/scripting/python/pyglue.c
+++ b/source4/scripting/python/pyglue.c
@@ -138,21 +138,6 @@ static PyObject *py_ldb_set_session_info(PyObject *self, PyObject *args)
Py_RETURN_NONE;
}
-static PyObject *py_ldb_set_utf8_casefold(PyObject *self, PyObject *args)
-{
- PyObject *py_ldb;
- struct ldb_context *ldb;
-
- if (!PyArg_ParseTuple(args, "O", &py_ldb))
- return NULL;
-
- PyErr_LDB_OR_RAISE(py_ldb, ldb);
-
- ldb_set_utf8_fns(ldb, NULL, wrap_casefold);
-
- Py_RETURN_NONE;
-}
-
static PyObject *py_samdb_set_domain_sid(PyLdbObject *self, PyObject *args)
{
PyObject *py_ldb, *py_sid;
@@ -506,9 +491,6 @@ static PyMethodDef py_misc_methods[] = {
{ "ldb_register_samba_handlers", (PyCFunction)py_ldb_register_samba_handlers, METH_VARARGS,
"ldb_register_samba_handlers(ldb)\n"
"Register Samba-specific LDB modules and schemas." },
- { "ldb_set_utf8_casefold", (PyCFunction)py_ldb_set_utf8_casefold, METH_VARARGS,
- "ldb_set_utf8_casefold(ldb)\n"
- "Set the right Samba casefolding function for UTF8 charset." },
{ "dsdb_set_ntds_invocation_id", (PyCFunction)py_dsdb_set_ntds_invocation_id, METH_VARARGS,
NULL },
{ "dsdb_set_global_schema", (PyCFunction)py_dsdb_set_global_schema, METH_VARARGS,
diff --git a/source4/scripting/python/samba/__init__.py b/source4/scripting/python/samba/__init__.py
index 64ad6470f2..796654bbb7 100644
--- a/source4/scripting/python/samba/__init__.py
+++ b/source4/scripting/python/samba/__init__.py
@@ -44,9 +44,9 @@ else:
import ldb
import dsdb
import glue
-from samba._ldb import Ldb
+from samba._ldb import Ldb as _Ldb
-class Ldb(Ldb):
+class Ldb(_Ldb):
"""Simple Samba-specific LDB subclass that takes care
of setting up the modules dir, credentials pointers, etc.
@@ -97,7 +97,7 @@ class Ldb(Ldb):
print text
#self.set_debug(msg)
- glue.ldb_set_utf8_casefold(self)
+ self.set_utf8_casefold()
# Allow admins to force non-sync ldb for all databases
if lp is not None:
@@ -308,14 +308,6 @@ class Ldb(Ldb):
"Get the server site name"
return dsdb.samdb_server_site_name(self)
- def set_opaque_integer(self, name, value):
- """Set an integer as an opaque (a flag or other value) value on the database
-
- :param name: The name for the opaque value
- :param value: The integer value
- """
- dsdb.dsdb_set_opaque_integer(self, name, value)
-
def substitute_var(text, values):
"""substitute strings of the form ${NAME} in str, replacing