pyrpc: Add warning about abuse of py_return_ndr_struct()
authorAndrew Bartlett <abartlet@samba.org>
Mon, 7 Mar 2016 22:16:27 +0000 (11:16 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 8 Mar 2016 00:58:25 +0000 (01:58 +0100)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
source4/librpc/rpc/pyrpc_util.c

index 226c884d3ef4826ddba8bde54973d29ea54bab79..6b9bf9b40a49a89f888c4d72e8a5f0aa582b6cbb 100644 (file)
@@ -349,6 +349,9 @@ void PyErr_SetDCERPCStatus(struct dcerpc_pipe *p, NTSTATUS status)
 
   r_ctx is the context that is a parent of r. It will be referenced by
   the resulting python object
+
+  This MUST only be used by objects that are based on pytalloc_Object
+  otherwise it will cause crazy segfaults.
  */
 PyObject *py_return_ndr_struct(const char *module_name, const char *type_name,
                               TALLOC_CTX *r_ctx, void *r)