summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-04-08 17:31:36 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-04-08 17:31:36 +1000
commit0e59c73fe3a5cde76881294f17bf6ca9258f67a1 (patch)
tree6007f25ac8af86370db09dfaaa138c618eb08ac0 /source4/scripting/python
parentb2805c50eecddfa4cbd0945e713567eddce05895 (diff)
parent1f474f4a545752f7ac0ad402d01d1e768b973dbe (diff)
downloadsamba-0e59c73fe3a5cde76881294f17bf6ca9258f67a1.tar.gz
samba-0e59c73fe3a5cde76881294f17bf6ca9258f67a1.tar.bz2
samba-0e59c73fe3a5cde76881294f17bf6ca9258f67a1.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit c0416a0b73f06ef57db1b83a75433e36b93a9981)
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/modules.c3
-rw-r--r--source4/scripting/python/pyrpc.h2
-rw-r--r--source4/scripting/python/samba/tests/dcerpc/unix.py30
3 files changed, 34 insertions, 1 deletions
diff --git a/source4/scripting/python/modules.c b/source4/scripting/python/modules.c
index 2ecad20b8e..ba85994636 100644
--- a/source4/scripting/python/modules.c
+++ b/source4/scripting/python/modules.c
@@ -35,6 +35,8 @@ extern void init_events(void);
extern void inituuid(void);
extern void init_net(void);
extern void initecho(void);
+extern void initdfs(void);
+extern void initdrsuapi(void);
extern void initwinreg(void);
extern void initepmapper(void);
extern void initinitshutdown(void);
@@ -46,6 +48,7 @@ static void initdcerpc_security(void) {}
extern void initlsa(void);
extern void initsvcctl(void);
extern void initwkssvc(void);
+extern void initunixinfo(void);
extern void init_libcli_nbt(void);
extern void init_libcli_smb(void);
diff --git a/source4/scripting/python/pyrpc.h b/source4/scripting/python/pyrpc.h
index 3a5d235cfc..f4d0f37c39 100644
--- a/source4/scripting/python/pyrpc.h
+++ b/source4/scripting/python/pyrpc.h
@@ -26,7 +26,7 @@
#define dom_sid2_Type dom_sid_Type
#define dom_sid28_Type dom_sid_Type
#define dom_sid2_Check dom_sid_Check
-#define dom_sid28_Check dom_sid28_Check
+#define dom_sid28_Check dom_sid_Check
/* This macro is only provided by Python >= 2.3 */
#ifndef PyAPI_DATA
diff --git a/source4/scripting/python/samba/tests/dcerpc/unix.py b/source4/scripting/python/samba/tests/dcerpc/unix.py
new file mode 100644
index 0000000000..99c84c08da
--- /dev/null
+++ b/source4/scripting/python/samba/tests/dcerpc/unix.py
@@ -0,0 +1,30 @@
+#!/usr/bin/python
+
+# Unix SMB/CIFS implementation.
+# Copyright (C) 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/>.
+#
+
+import unixinfo
+import unittest
+from samba.tests import get_loadparm
+
+class UnixinfoTests(unittest.TestCase):
+ def setUp(self):
+ self.conn = unixinfo.unixinfo("ncalrpc:", get_loadparm())
+
+ def test_getpwuid(self):
+ (count, infos) = self.conn.GetPWUid(1, [0])
+ self.assertEquals(1, len(infos))