MCPcopy
hub / github.com/fortra/impacket / test_acl_sid_repr

Method test_acl_sid_repr

tests/SMB_RPC/test_acl.py:287–296  ·  view source on GitHub ↗

Test SID string representation

(self)

Source from the content-addressed store, hash-verified

285 """Test ACL structure classes"""
286
287 def test_acl_sid_repr(self):
288 """Test SID string representation"""
289 # S-1-5-21-4190006963-579503432-2148133447-500
290 sid_bytes = b'\x01\x05\x00\x00\x00\x00\x00\x05\x15\x00\x00\x00\xb3n\xbe\xf9H\x85\x8a"G\xea\t\x80\xf4\x01\x00\x00'
291 sid = ACL_SID(sid_bytes)
292
293 sid_str = str(sid)
294 self.assertTrue(sid_str.startswith('S-1-5-'))
295 parts = sid_str.split('-')
296 self.assertEqual(len(parts), 8) # S-1-5-21-x-x-x-500
297
298 def test_acl_sid_build_from_string(self):
299 """Test building SID from string"""

Callers

nothing calls this directly

Calls 2

ACL_SIDClass · 0.90
splitMethod · 0.80

Tested by

no test coverage detected