[SCM] Samba Shared Repository - branch master updated -
c81de641cd9a114ca47242fa1fd56eef19e86505
Jelmer Vernooij
jelmer at samba.org
Wed Jan 7 21:41:08 GMT 2009
The branch, master has been updated
via c81de641cd9a114ca47242fa1fd56eef19e86505 (commit)
via f4735b71807dee7b89fca3ac6f679663ebc22d76 (commit)
from 66fa21ef73464188f5cb20e5fc96c5aa35d434b6 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit c81de641cd9a114ca47242fa1fd56eef19e86505
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed Jan 7 22:40:49 2009 +0100
Display lsa string contents.
commit f4735b71807dee7b89fca3ac6f679663ebc22d76
Author: Jelmer Vernooij <jelmer at samba.org>
Date: Wed Jan 7 22:40:13 2009 +0100
Set proper python exception when running out of memory.
-----------------------------------------------------------------------
Summary of changes:
source4/librpc/rpc/pyrpc.c | 8 ++++++--
source4/scripting/python/examples/samr.py | 7 +++++--
2 files changed, 11 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c
index 9863a6a..b841fda 100644
--- a/source4/librpc/rpc/pyrpc.c
+++ b/source4/librpc/rpc/pyrpc.c
@@ -38,12 +38,16 @@ static PyObject *py_dcerpc_run_function(dcerpc_InterfaceObject *iface, struct Py
}
mem_ctx = talloc_new(NULL);
- if (mem_ctx == NULL)
+ if (mem_ctx == NULL) {
+ PyErr_NoMemory();
return NULL;
+ }
r = talloc_zero_size(mem_ctx, md->table->calls[md->opnum].struct_size);
- if (r == NULL)
+ if (r == NULL) {
+ PyErr_NoMemory();
return NULL;
+ }
if (!md->pack_in_data(args, kwargs, r)) {
talloc_free(mem_ctx);
diff --git a/source4/scripting/python/examples/samr.py b/source4/scripting/python/examples/samr.py
index 1f2afbe..b3ea117 100755
--- a/source4/scripting/python/examples/samr.py
+++ b/source4/scripting/python/examples/samr.py
@@ -26,6 +26,9 @@ sys.path.insert(0, "bin/python")
from samba.dcerpc import samr, security, lsa
+def display_lsa_string(str):
+ return str.string
+
def FillUserInfo(samr, dom_handle, users, level):
"""fill a user array with user information from samrQueryUserInfo"""
for i in range(len(users)):
@@ -86,9 +89,9 @@ def test_EnumDomains(samr, handle):
domains = toArray(samr.EnumDomains(handle, 0, -1))
print "Found %d domains" % len(domains)
for idx, domain in domains:
- print "\t%s (%d)" % (domain, idx)
+ print "\t%s (%d)" % (display_lsa_string(domain), idx)
for idx, domain in domains:
- print "Testing domain %s" % domain
+ print "Testing domain %s" % display_lsa_string(domain)
sid = samr.LookupDomain(handle, domain)
dom_handle = test_OpenDomain(samr, handle, sid)
test_domain_ops(samr, dom_handle)
--
Samba Shared Repository
More information about the samba-cvs
mailing list