diff options
Diffstat (limited to 'source4/scripting/swig')
-rw-r--r-- | source4/scripting/swig/torture/spoolss.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/scripting/swig/torture/spoolss.py b/source4/scripting/swig/torture/spoolss.py index e29178a0b6..d7a16917f9 100644 --- a/source4/scripting/swig/torture/spoolss.py +++ b/source4/scripting/swig/torture/spoolss.py @@ -6,11 +6,17 @@ def test_EnumPrinters(pipe): r['flags'] = 0x02 r['server'] = None r['level'] = 1 - r['buffer'] = 392 * '\x00' - r['buf_size'] = 392 + r['buffer'] = None + r['buf_size'] = 0 result = dcerpc.spoolss_EnumPrinters(pipe, r) + if result['result'] == dcerpc.WERR_INSUFFICIENT_BUFFER: + r['buffer'] = result['buf_size'] * '\x00' + r['buf_size'] = result['buf_size'] + + result = dcerpc.spoolss_EnumPrinters(pipe, r) + print dcerpc.unmarshall_spoolss_PrinterInfo1(result['buffer']) def runtests(binding, domain, username, password): |