Skip to content

Commit af9f1ec

Browse files
authored
Fix broken hRSetServiceObjectSecurity method.
The method hRSetServiceObjectSecurity received a security descriptor as an argument but it was never used. Also, the type of the data in the RSetServiceObjectSecurity struct was incorrect, it should be BYTE_ARRAY.
1 parent 512a1db commit af9f1ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

impacket/dcerpc/v5/scmr.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ class RSetServiceObjectSecurity(NDRCALL):
686686
structure = (
687687
('hService',SC_RPC_HANDLE),
688688
('dwSecurityInformation',SECURITY_INFORMATION),
689-
('lpSecurityDescriptor',LPBYTE),
689+
('lpSecurityDescriptor',BYTE_ARRAY),
690690
('cbBufSize',DWORD),
691691
)
692692

@@ -1203,6 +1203,7 @@ def hRSetServiceObjectSecurity(dce, hService, dwSecurityInformation, lpSecurityD
12031203
request = RSetServiceObjectSecurity()
12041204
request['hService'] = hService
12051205
request['dwSecurityInformation'] = dwSecurityInformation
1206+
request['lpSecurityDescriptor'] = lpSecurityDescriptor
12061207
request['cbBufSize'] = cbBufSize
12071208
return dce.request(request)
12081209

0 commit comments

Comments
 (0)