MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / __str__

Method __str__

pager_lib/smb/security_descriptors.py:163–172  ·  view source on GitHub ↗

String representation, as specified in [MS-DTYP]: 2.4.2.1

(self)

Source from the content-addressed store, hash-verified

161 self.subauthorities = subauthorities
162
163 def __str__(self):
164 """
165 String representation, as specified in [MS-DTYP]: 2.4.2.1
166 """
167 if self.identifier_authority >= 2**32:
168 id_auth = '%#x' % (self.identifier_authority,)
169 else:
170 id_auth = self.identifier_authority
171 auths = [self.revision, id_auth] + self.subauthorities
172 return 'S-' + '-'.join(str(subauth) for subauth in auths)
173
174 def __repr__(self):
175 return 'SID(%r)' % (str(self),)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected