[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-535-g2170a81

Stefan Metzmacher metze at samba.org
Fri Feb 6 11:13:54 GMT 2009


The branch, master has been updated
       via  2170a810ed16043c6292eb3e39437a8cf96a8be6 (commit)
      from  1609dbaf88a22bcab75fa490ec632d846a1b5f5a (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 2170a810ed16043c6292eb3e39437a8cf96a8be6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Feb 6 12:10:23 2009 +0100

    s4:pyregistry: fix crash bugs introduced by e5a6eadd8214b56da34f733318a0fecaebbe5ef5
    
    The registry api uses wild casts in the returned types, so we can't check
    the talloc name against the type used in the public api...
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source4/lib/registry/pyregistry.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/registry/pyregistry.c b/source4/lib/registry/pyregistry.c
index 9ebd136..30becbb 100644
--- a/source4/lib/registry/pyregistry.c
+++ b/source4/lib/registry/pyregistry.c
@@ -36,8 +36,9 @@ PyAPI_DATA(PyTypeObject) PyRegistry;
 PyAPI_DATA(PyTypeObject) PyHiveKey;
 
 /*#define PyRegistryKey_AsRegistryKey(obj) py_talloc_get_type(obj, struct registry_key)*/
-#define PyRegistry_AsRegistryContext(obj) py_talloc_get_type(obj, struct registry_context)
-#define PyHiveKey_AsHiveKey(obj) py_talloc_get_type(obj, struct hive_key)
+#define PyRegistry_AsRegistryContext(obj) ((struct registry_context *)py_talloc_get_ptr(obj))
+#define PyHiveKey_AsHiveKey(obj) ((struct hive_key*)py_talloc_get_ptr(obj))
+
 
 static PyObject *py_get_predefined_key_by_name(PyObject *self, PyObject *args)
 {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list