svn commit: samba r6510 - in branches/SAMBA_4_0/source/scripting/swig: .

tpot at samba.org tpot at samba.org
Thu Apr 28 07:44:49 GMT 2005


Author: tpot
Date: 2005-04-28 07:44:49 +0000 (Thu, 28 Apr 2005)
New Revision: 6510

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6510

Log:
Initialise rid parameter in samr_RidToSid().  This is faulting for me
on win2k - not sure why.

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

Modified:
   branches/SAMBA_4_0/source/scripting/swig/samr.py


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/swig/samr.py
===================================================================
--- branches/SAMBA_4_0/source/scripting/swig/samr.py	2005-04-28 07:30:36 UTC (rev 6509)
+++ branches/SAMBA_4_0/source/scripting/swig/samr.py	2005-04-28 07:44:49 UTC (rev 6510)
@@ -374,6 +374,7 @@
 
         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)
 
@@ -431,6 +432,61 @@
 
         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):
@@ -576,17 +632,13 @@
 # SetUserInfo
 # ChangePasswordUser
 # GetGroupsForUser
-# QueryDisplayInfo
 # GetDisplayEnumerationIndex
 # TestPrivateFunctionsDomain
 # TestPrivateFunctionsUser
 # GetUserPwInfo
 # RemoveMemberFromForeignDomain
-# QueryDomainInfo2
 # QueryUserInfo2
-# QueryDisplayInfo2
 # GetDisplayEnumerationIndex2
-# QueryDisplayInfo3
 # RemoveMultipleMembersFromAlias
 # OemChangePasswordUser2
 # ChangePasswordUser2



More information about the samba-cvs mailing list