r6511: Implement GetUserPwInfo(), QueryUserInfo(), QueryUserInfo2().
authorTim Potter <tpot@samba.org>
Thu, 28 Apr 2005 07:51:41 +0000 (07:51 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:16:21 +0000 (13:16 -0500)
source/scripting/swig/samr.py

index 4346bf88f475a62b0fc715b4380bc37a4825e898..c254acd11b7271037259297a88d0cc7dd12f9a5e 100644 (file)
@@ -497,7 +497,35 @@ class UserHandle(SamrHandle):
         call_fn(dcerpc.dcerpc_samr_DeleteUser, self.pipe, r)
 
         self.handle = None
         call_fn(dcerpc.dcerpc_samr_DeleteUser, self.pipe, r)
 
         self.handle = None
-    
+
+    def GetUserPwInfo(self):
+
+        r = dcerpc.samr_GetUserPwInfo()
+        r.data_in.user_handle = self.handle
+
+        call_fn(dcerpc.dcerpc_samr_GetUserPwInfo, self.pipe, r)
+
+        return r.data_out.info
+
+    def QueryUserInfo(self, level):
+
+        r = dcerpc.samr_QueryUserInfo()
+        r.data_in.user_handle = self.handle
+        r.data_in.level = level
+
+        call_fn(dcerpc.dcerpc_samr_QueryUserInfo, self.pipe, r)
+
+        return r.data_out.info
+
+    def QueryUserInfo2(self, level):
+
+        r = dcerpc.samr_QueryUserInfo2()
+        r.data_in.user_handle = self.handle
+        r.data_in.level = level
+
+        call_fn(dcerpc.dcerpc_samr_QueryUserInfo2, self.pipe, r)
+
+        return r.data_out.info
 
 class GroupHandle(SamrHandle):
     pass
 
 class GroupHandle(SamrHandle):
     pass
@@ -603,7 +631,6 @@ def Connect4(pipe, system_name = '', access_mask = 0x02000000):
 
     return ConnectHandle(pipe, r.data_out.connect_handle)
 
 
     return ConnectHandle(pipe, r.data_out.connect_handle)
 
-
 def Connect5(pipe, system_name = '', access_mask = 0x02000000):
 
     r = dcerpc.samr_Connect5()
 def Connect5(pipe, system_name = '', access_mask = 0x02000000):
 
     r = dcerpc.samr_Connect5()
@@ -628,16 +655,13 @@ def Connect5(pipe, system_name = '', access_mask = 0x02000000):
 # AddAliasMember
 # DeleteAliasMember
 # GetMembersinAlias
 # AddAliasMember
 # DeleteAliasMember
 # GetMembersinAlias
-# QueryUserInfo
 # SetUserInfo
 # ChangePasswordUser
 # GetGroupsForUser
 # GetDisplayEnumerationIndex
 # TestPrivateFunctionsDomain
 # TestPrivateFunctionsUser
 # SetUserInfo
 # ChangePasswordUser
 # GetGroupsForUser
 # GetDisplayEnumerationIndex
 # TestPrivateFunctionsDomain
 # TestPrivateFunctionsUser
-# GetUserPwInfo
 # RemoveMemberFromForeignDomain
 # RemoveMemberFromForeignDomain
-# QueryUserInfo2
 # GetDisplayEnumerationIndex2
 # RemoveMultipleMembersFromAlias
 # OemChangePasswordUser2
 # GetDisplayEnumerationIndex2
 # RemoveMultipleMembersFromAlias
 # OemChangePasswordUser2