Replies: 1 comment
-
|
I've gone back to using CsWin32 for these, but the bare P/Invokes. The wrappers for these two P/Invokes, along with the wrapper for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there. I'm the lead developer for PSAppDeployToolkit. We leverage CsWin32 extensively within our project, but I've had some issues with
SetEntriesInAcl()and/orSetSecurityInfo().I committed the following implementation to so that users don't have privileges to terminate a process we start using their token from SYSTEM: PSAppDeployToolkit/PSAppDeployToolkit@6014f8b. On paper, everything looks right but I continually get a Win32Exception from
SetSecurityInfo()saying "The access control list (ACL) structure is invalid.". This issue only occurred when I was passing the out'd ACL fromSetEntriesInAcl(). If I sent null through for this, no error occurs.I ended up rolling my own P/Invokes that work with IntPtr types, etc, and the setup works as expected. No errors, and a successful outcome: PSAppDeployToolkit/PSAppDeployToolkit@dcb0324. Can anyone see where I went wrong in the first commit? Everything looks 100% correct to me.
Beta Was this translation helpful? Give feedback.
All reactions