diff options
author | Tim Potter <tpot@samba.org> | 2005-04-28 07:44:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:16:20 -0500 |
commit | 93e41274c56e564f6d4f2ca657aca29c1eb340c7 (patch) | |
tree | 16322ec835445a78d8eacaefbaaf181e96cd574e /source4/scripting/swig/samr.py | |
parent | 584f64c103341c93ac7b33a299cd8a20e48918da (diff) | |
download | samba-93e41274c56e564f6d4f2ca657aca29c1eb340c7.tar.gz samba-93e41274c56e564f6d4f2ca657aca29c1eb340c7.tar.bz2 samba-93e41274c56e564f6d4f2ca657aca29c1eb340c7.zip |
r6510: Initialise rid parameter in samr_RidToSid(). This is faulting for me
on win2k - not sure why.
Add dodgy implementations of QueryDisplayInfo{,2,3}()
(This used to be commit 2e44402751f77fcbd9c89299d8533e91207de49f)
Diffstat (limited to 'source4/scripting/swig/samr.py')
-rw-r--r-- | source4/scripting/swig/samr.py | 60 |
1 files changed, 56 insertions, 4 deletions
diff --git a/source4/scripting/swig/samr.py b/source4/scripting/swig/samr.py index 4796d748eb..4346bf88f4 100644 --- a/source4/scripting/swig/samr.py +++ b/source4/scripting/swig/samr.py @@ -374,6 +374,7 @@ class DomainHandle(SamrHandle): 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 @@ class DomainHandle(SamrHandle): 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 @@ def Connect5(pipe, system_name = '', access_mask = 0x02000000): # SetUserInfo # ChangePasswordUser # GetGroupsForUser -# QueryDisplayInfo # GetDisplayEnumerationIndex # TestPrivateFunctionsDomain # TestPrivateFunctionsUser # GetUserPwInfo # RemoveMemberFromForeignDomain -# QueryDomainInfo2 # QueryUserInfo2 -# QueryDisplayInfo2 # GetDisplayEnumerationIndex2 -# QueryDisplayInfo3 # RemoveMultipleMembersFromAlias # OemChangePasswordUser2 # ChangePasswordUser2 |