diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-05-24 22:56:49 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-05-24 22:56:49 +0200 |
commit | 21ce0ff00688c560e60efd6c392c71f85229c9d4 (patch) | |
tree | 9ffc59acb2e279b3491054cffe388922b5b5344b /source4/scripting/python | |
parent | 75e7962d2efb1aa6e45ca999b1a93829406de540 (diff) | |
download | samba-21ce0ff00688c560e60efd6c392c71f85229c9d4.tar.gz samba-21ce0ff00688c560e60efd6c392c71f85229c9d4.tar.bz2 samba-21ce0ff00688c560e60efd6c392c71f85229c9d4.zip |
Allow connecting to a DCE/RPC interface with Python for which we don't have IDL.
(This used to be commit e3178d522c95871f1db35d7e058906502387a553)
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/tests/dcerpc/bare.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/tests/dcerpc/bare.py b/source4/scripting/python/samba/tests/dcerpc/bare.py new file mode 100644 index 0000000000..dae1dedeb3 --- /dev/null +++ b/source4/scripting/python/samba/tests/dcerpc/bare.py @@ -0,0 +1,30 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +# Unix SMB/CIFS implementation. +# Copyright © Jelmer Vernooij <jelmer@samba.org> 2008 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +from samba.dcerpc import ClientConnection +from unittest import TestCase + +class BareTestCase(TestCase): + def test_bare(self): + # Connect to the echo pipe + x = ClientConnection("ncalrpc:localhost[DEFAULT]", + ("60a15ec5-4de8-11d7-a637-005056a20182", 1)) + self.assertEquals("\x01\x00\x00\x00", x.request(0, chr(0) * 4)) + |