MCPcopy Index your code
hub / github.com/XiaoliChan/LDAPShell / create_empty_sd

Method create_empty_sd

utils/ldap_shell.py:62–78  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

60 return ret_val
61
62 def create_empty_sd(self):
63 sd = ldaptypes.SR_SECURITY_DESCRIPTOR()
64 sd['Revision'] = b'\x01'
65 sd['Sbz1'] = b'\x00'
66 sd['Control'] = 32772
67 sd['OwnerSid'] = ldaptypes.LDAP_SID()
68 # BUILTIN\Administrators
69 sd['OwnerSid'].fromCanonical('S-1-5-32-544')
70 sd['GroupSid'] = b''
71 sd['Sacl'] = b''
72 acl = ldaptypes.ACL()
73 acl['AclRevision'] = 4
74 acl['Sbz1'] = 0
75 acl['Sbz2'] = 0
76 acl.aces = []
77 sd['Dacl'] = acl
78 return sd
79
80 def create_allow_ace(self, sid):
81 nace = ldaptypes.ACE()

Callers 3

do_clear_rbcdMethod · 0.95
do_grant_controlMethod · 0.95
do_set_rbcdMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected