diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-04-17 09:36:09 +0200 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-04-17 09:36:09 +0200 |
commit | 30b9c37420100c98df1a538673d508e46517accf (patch) | |
tree | 33ccf13461371c1281a0fc707e66a814a3bc88e9 /source4/scripting/python | |
parent | 4bbaf36f6fd85c9d07a16320ad58d7a6ad43fd6c (diff) | |
parent | baad7a7e56e2b0f24885e01672cd9bdc6667a6a8 (diff) | |
download | samba-30b9c37420100c98df1a538673d508e46517accf.tar.gz samba-30b9c37420100c98df1a538673d508e46517accf.tar.bz2 samba-30b9c37420100c98df1a538673d508e46517accf.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
Conflicts:
source/ntvfs/ntvfs_generic.c
(This used to be commit a626a9c69cb2c07c8de69dcfe45361f86d6de58d)
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/pyrpc.h | 5 | ||||
-rw-r--r-- | source4/scripting/python/pytalloc.c | 4 | ||||
-rw-r--r-- | source4/scripting/python/samba/provision.py | 7 | ||||
-rw-r--r-- | source4/scripting/python/samba/tests/dcerpc/unix.py | 2 | ||||
-rw-r--r-- | source4/scripting/python/uuidmodule.c | 4 |
5 files changed, 15 insertions, 7 deletions
diff --git a/source4/scripting/python/pyrpc.h b/source4/scripting/python/pyrpc.h index f4d0f37c39..93d583c10a 100644 --- a/source4/scripting/python/pyrpc.h +++ b/source4/scripting/python/pyrpc.h @@ -17,6 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#ifndef _PYRPC_H_ +#define _PYRPC_H_ + #define PY_CHECK_TYPE(type, var, fail) \ if (!type ## _Check(var)) {\ PyErr_Format(PyExc_TypeError, "Expected type %s", type ## _Type.tp_name); \ @@ -32,3 +35,5 @@ #ifndef PyAPI_DATA # define PyAPI_DATA(RTYPE) extern RTYPE #endif + +#endif /* _PYRPC_H_ */ diff --git a/source4/scripting/python/pytalloc.c b/source4/scripting/python/pytalloc.c index d8d3efe69c..aa0ae9bf90 100644 --- a/source4/scripting/python/pytalloc.c +++ b/source4/scripting/python/pytalloc.c @@ -39,7 +39,7 @@ PyObject *py_talloc_import_ex(PyTypeObject *py_type, TALLOC_CTX *mem_ctx, PyObject *py_talloc_default_repr(PyObject *py_obj) { py_talloc_Object *obj = (py_talloc_Object *)py_obj; + PyTypeObject *type = (PyTypeObject*)PyObject_Type((PyObject *)obj); - return PyString_FromFormat("<talloc: %s>", - talloc_get_name(obj->talloc_ctx)); + return PyString_FromFormat("<%s>", type->tp_name); } diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index a8d188e7a3..0e8840646c 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -1166,6 +1166,7 @@ def provision_backend(setup_dir=None, message=None, "NETBIOSNAME": names.netbiosname, "DEFAULTSITE": DEFAULTSITE, "CONFIGDN": names.configdn, + "SERVERDN": names.serverdn }) setup_add_ldif(schemadb, setup_path("schema_samba4.ldif"), @@ -1241,9 +1242,9 @@ refint_attributes""" + refint_attributes + "\n"; setup_file(setup_path("modules.conf"), paths.modulesconf, {"REALM": names.realm}) - setup_db_config(setup_path, file, os.path.join(paths.ldapdir, "user")) - setup_db_config(setup_path, file, os.path.join(paths.ldapdir, "config")) - setup_db_config(setup_path, file, os.path.join(paths.ldapdir, "schema")) + setup_db_config(setup_path, os.path.join(paths.ldapdir, os.path.join("db", "user"))) + setup_db_config(setup_path, os.path.join(paths.ldapdir, os.path.join("db", "config"))) + setup_db_config(setup_path, os.path.join(paths.ldapdir, os.path.join("db", "schema"))) mapping = "schema-map-openldap-2.3" backend_schema = "backend-schema.schema" diff --git a/source4/scripting/python/samba/tests/dcerpc/unix.py b/source4/scripting/python/samba/tests/dcerpc/unix.py index bfddfdc7ec..43978ac9dc 100644 --- a/source4/scripting/python/samba/tests/dcerpc/unix.py +++ b/source4/scripting/python/samba/tests/dcerpc/unix.py @@ -27,6 +27,8 @@ class UnixinfoTests(RpcInterfaceTestCase): def test_getpwuid(self): infos = self.conn.GetPWUid(range(512)) self.assertEquals(512, len(infos)) + self.assertEquals("", infos[0].shell) + self.assertEquals("", infos[0].homedir) def test_gidtosid(self): self.conn.GidToSid(1000) diff --git a/source4/scripting/python/uuidmodule.c b/source4/scripting/python/uuidmodule.c index cd9a1cb4d5..18cfb6ce32 100644 --- a/source4/scripting/python/uuidmodule.c +++ b/source4/scripting/python/uuidmodule.c @@ -27,7 +27,7 @@ static PyObject *uuid_random(PyObject *self, PyObject *args) PyObject *pyobj; char *str; - if (!PyArg_ParseTuple(args, (char *)"")) + if (!PyArg_ParseTuple(args, "")) return NULL; guid = GUID_random(); @@ -52,7 +52,7 @@ static PyMethodDef methods[] = { void inituuid(void) { - PyObject *mod = Py_InitModule3((char *)"uuid", methods, "UUID helper routines"); + PyObject *mod = Py_InitModule3("uuid", methods, "UUID helper routines"); if (mod == NULL) return; } |