r6510: Initialise rid parameter in samr_RidToSid(). This is faulting for me
authorTim Potter <tpot@samba.org>
Thu, 28 Apr 2005 07:44:49 +0000 (07:44 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:16:20 +0000 (13:16 -0500)
on win2k - not sure why.

Add dodgy implementations of QueryDisplayInfo{,2,3}()

source/scripting/swig/samr.py

index 4796d748eb23f589c4d13650cc3719322d81aec2..4346bf88f475a62b0fc715b4380bc37a4825e898 100644 (file)
@@ -374,6 +374,7 @@ class DomainHandle(SamrHandle):
 
         r = dcerpc.samr_RidToSid()
         r.data_in.domain_handle = self.handle
 
         r = dcerpc.samr_RidToSid()
         r.data_in.domain_handle = self.handle
+        r.data_in.rid = rid
 
         call_fn(dcerpc.dcerpc_samr_RidToSid, self.pipe, r)
 
 
         call_fn(dcerpc.dcerpc_samr_RidToSid, self.pipe, r)
 
@@ -431,6 +432,61 @@ class DomainHandle(SamrHandle):
 
         return [r.ids[x] for x in range(r.count)]
 
 
         return [r.ids[x] for x in range(r.count)]
 
+    def QueryDisplayInfo(self, level):
+
+        # TODO: Handle more data returns
+
+        r = dcerpc.samr_QueryDisplayInfo()
+        r.data_in.domain_handle = self.handle
+        r.data_in.level = level
+        r.data_in.start_idx = 0
+        r.data_in.max_entries = 1000
+        r.data_in.buf_size = -1
+
+        call_fn(dcerpc.dcerpc_samr_QueryDisplayInfo, self.pipe, r)
+
+        # TODO: Return a mapping of the various samr_DispInfo
+        # structures here.
+
+        return getattr(r.data_out.info, 'info%d' % level)
+    
+    def QueryDisplayInfo2(self, level):
+
+        # TODO: Handle more data returns
+
+        r = dcerpc.samr_QueryDisplayInfo2()
+        r.data_in.domain_handle = self.handle
+        r.data_in.level = level
+        r.data_in.start_idx = 0
+        r.data_in.max_entries = 1000
+        r.data_in.buf_size = -1
+
+        call_fn(dcerpc.dcerpc_samr_QueryDisplayInfo2, self.pipe, r)
+
+        # TODO: Return a mapping of the various samr_DispInfo
+        # structures here.
+
+        return getattr(r.data_out.info, 'info%d' % level)
+
+    def QueryDisplayInfo3(self, level):
+
+        # TODO: Handle more data returns
+
+        r = dcerpc.samr_QueryDisplayInfo3()
+        r.data_in.domain_handle = self.handle
+        r.data_in.level = level
+        r.data_in.start_idx = 0
+        r.data_in.max_entries = 1000
+        r.data_in.buf_size = -1
+
+        call_fn(dcerpc.dcerpc_samr_QueryDisplayInfo3, self.pipe, r)
+
+        # TODO: Return a mapping of the various samr_DispInfo
+        # structures here.
+
+        return getattr(r.data_out.info, 'info%d' % level)
+
+
 class UserHandle(SamrHandle):
 
     def DeleteUser(self):
 class UserHandle(SamrHandle):
 
     def DeleteUser(self):
@@ -576,17 +632,13 @@ def Connect5(pipe, system_name = '', access_mask = 0x02000000):
 # SetUserInfo
 # ChangePasswordUser
 # GetGroupsForUser
 # SetUserInfo
 # ChangePasswordUser
 # GetGroupsForUser
-# QueryDisplayInfo
 # GetDisplayEnumerationIndex
 # TestPrivateFunctionsDomain
 # TestPrivateFunctionsUser
 # GetUserPwInfo
 # RemoveMemberFromForeignDomain
 # GetDisplayEnumerationIndex
 # TestPrivateFunctionsDomain
 # TestPrivateFunctionsUser
 # GetUserPwInfo
 # RemoveMemberFromForeignDomain
-# QueryDomainInfo2
 # QueryUserInfo2
 # QueryUserInfo2
-# QueryDisplayInfo2
 # GetDisplayEnumerationIndex2
 # GetDisplayEnumerationIndex2
-# QueryDisplayInfo3
 # RemoveMultipleMembersFromAlias
 # OemChangePasswordUser2
 # ChangePasswordUser2
 # RemoveMultipleMembersFromAlias
 # OemChangePasswordUser2
 # ChangePasswordUser2