svn commit: samba r2560 - in branches/SAMBA_4_0/source: build/pidl
scripting/swig/torture
tpot at samba.org
tpot at samba.org
Thu Sep 23 03:32:46 GMT 2004
Author: tpot
Date: 2004-09-23 03:32:46 +0000 (Thu, 23 Sep 2004)
New Revision: 2560
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source&rev=2560&nolog=1
Log:
Don't require structure fields that have the pidl value() property
to be set. They can be if you want, but will be overwritten by the
pidl push code.
Modified:
branches/SAMBA_4_0/source/build/pidl/swig.pm
branches/SAMBA_4_0/source/scripting/swig/torture/samr.py
Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/swig.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/swig.pm 2004-09-23 03:26:14 UTC (rev 2559)
+++ branches/SAMBA_4_0/source/build/pidl/swig.pm 2004-09-23 03:32:46 UTC (rev 2560)
@@ -104,7 +104,11 @@
if ($e->{ARRAY_LEN}) {
$result .= ArrayFromPython($e, $prefix);
} else {
- $result .= "\ts->$prefix$e->{NAME} = $e->{TYPE}_from_python($obj, \"$e->{NAME}\");\n";
+ if (util::has_property($e, "value")) {
+ $result .= "\ts->$prefix$e->{NAME} = 0;\n";
+ } else {
+ $result .= "\ts->$prefix$e->{NAME} = $e->{TYPE}_from_python($obj, \"$e->{NAME}\");\n";
+ }
}
} else {
$result .= "\ts->$prefix$e->{NAME} = talloc(mem_ctx, sizeof($e->{TYPE}));\n";
Modified: branches/SAMBA_4_0/source/scripting/swig/torture/samr.py
===================================================================
--- branches/SAMBA_4_0/source/scripting/swig/torture/samr.py 2004-09-23 03:26:14 UTC (rev 2559)
+++ branches/SAMBA_4_0/source/scripting/swig/torture/samr.py 2004-09-23 03:32:46 UTC (rev 2560)
@@ -100,8 +100,6 @@
r = {}
r['handle'] = handle
r['name'] = {}
- r['name']['name_len'] = 0
- r['name']['name_size'] = 0
r['name']['name'] = domain
dcerpc.samr_GetDomPwInfo(pipe, r)
@@ -140,8 +138,6 @@
r['domain_handle'] = domain_handle
r['access_mask'] = 0x02000000
r['account_name'] = {}
- r['account_name']['name_len'] = 0
- r['account_name']['name_size'] = 0
r['account_name']['name'] = 'samrtorturemach$'
r['acct_flags'] = 0x0080 # WSTRUST
@@ -164,14 +160,14 @@
r['domain_handle'] = domain_handle
r['num_names'] = 1
r['names'] = []
- r['names'].append({'name_len': 0, 'name_size': 0, 'name': name})
+ r['names'].append({'name': name})
result = dcerpc.samr_LookupNames(pipe, r)
rid = result['rids']['ids'][0]
r['num_names'] = 2
- r['names'].append({'name_len': 0, 'name_size': 0, 'name': 'xxNONAMExx'})
+ r['names'].append({'name': 'xxNONAMExx'})
try:
@@ -242,12 +238,8 @@
r['info'] = {}
r['info']['info2'] = {}
r['info']['info2']['comment'] = {}
- r['info']['info2']['comment']['name_len'] = 0
- r['info']['info2']['comment']['name_size'] = 0
r['info']['info2']['comment']['name'] = 'hello'
r['info']['info2']['unknown'] = {}
- r['info']['info2']['unknown']['name_len'] = 0
- r['info']['info2']['unknown']['name_size'] = 0
r['info']['info2']['unknown']['name'] = None
r['info']['info2']['country_code'] = 0
r['info']['info2']['code_page'] = 0
@@ -297,8 +289,6 @@
r = {}
r['domain_handle'] = domain_handle
r['account_name'] = {}
- r['account_name']['name_len'] = 0
- r['account_name']['name_size'] = 0
r['account_name']['name'] = 'samrtorturetest'
r['access_mask'] = 0x02000000
@@ -360,8 +350,6 @@
r['level'] = 2
r['info'] = {}
r['info']['name'] = {}
- r['info']['name']['name_len'] = 0
- r['info']['name']['name_size'] = 0
r['info']['name']['name'] = 'hello'
dcerpc.samr_SetAliasInfo(pipe, r)
@@ -370,8 +358,6 @@
r['level'] = 3
r['info']['description'] = {}
- r['info']['description']['name_len'] = 0
- r['info']['description']['name_size'] = 0
r['info']['description']['name'] = 'this is a description'
dcerpc.samr_SetAliasInfo(pipe, r)
@@ -431,8 +417,6 @@
r = {}
r['domain_handle'] = domain_handle
r['aliasname'] = {}
- r['aliasname']['name_len'] = 0
- r['aliasname']['name_size'] = 0
r['aliasname']['name'] = alias_name
r['access_mask'] = 0x02000000
@@ -475,8 +459,6 @@
r = {}
r['domain_handle'] = domain_handle
r['name'] = {}
- r['name']['name_len'] = 0
- r['name']['name_size'] = 0
r['name']['name'] = 'samrtorturetestgroup'
r['access_mask'] = 0x02000000
@@ -651,8 +633,6 @@
r['domain_handle'] = domain_handle
r['level'] = levels[i]
r['name'] = {}
- r['name']['name_len'] = 0
- r['name']['name_size'] = 0
r['name']['name'] = 'samrtorturetest'
try:
@@ -682,8 +662,6 @@
r['domain_handle'] = domain_handle
r['level'] = levels[i]
r['name'] = {}
- r['name']['name_len'] = 0
- r['name']['name_size'] = 0
r['name']['name'] = 'samrtorturetest'
try:
@@ -832,8 +810,6 @@
r = {}
r['connect_handle'] = connect_handle
r['domain'] = {}
- r['domain']['name_len'] = 0
- r['domain']['name_size'] = 0
r['domain']['name'] = None
try:
More information about the samba-cvs
mailing list