r6507: Fix syntax error in GetAliasMembership().
authorTim Potter <tpot@samba.org>
Thu, 28 Apr 2005 07:05:48 +0000 (07:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:16:20 +0000 (13:16 -0500)
Implement SetDomainInfo() which got lost somehow.

source/scripting/swig/samr.py

index b6b1577c023493d60bd913d0ba5c2d3aaae03182..85d5fa0d77b73a2ef0cda38d4a73b0eeef32235a 100644 (file)
@@ -228,6 +228,16 @@ class DomainHandle(SamrHandle):
 
         return getattr(r.data_out.info, 'info%d' % level)       
 
 
         return getattr(r.data_out.info, 'info%d' % level)       
 
+    def SetDomainInfo(self, level, info):
+
+        r = dcerpc.samr_SetDomainInfo()
+        r.data_in.domain_handle = self.handle
+        r.data_in.level = level
+        r.data_in.info = dcerpc.samr_DomainInfo()
+        setattr(r.data_in.info, 'info%d' % level, info)
+
+        call_fn(dcerpc.dcerpc_samr_SetDomainInfo, self.pipe, r)
+
     def EnumDomainGroups(self):
 
         r = dcerpc.samr_EnumDomainGroups()
     def EnumDomainGroups(self):
 
         r = dcerpc.samr_EnumDomainGroups()
@@ -419,7 +429,7 @@ class DomainHandle(SamrHandle):
 
         call_fn(dcerpc.dcerpc_samr_GetAliasMembership, self.pipe, r)
 
 
         call_fn(dcerpc.dcerpc_samr_GetAliasMembership, self.pipe, r)
 
-        return [r.ids[x] x in range(r.count)]
+        return [r.ids[x] for x in range(r.count)]
 
 class UserHandle(SamrHandle):
 
 
 class UserHandle(SamrHandle):