How to add security attributes for a non-admin account in the creatnamedpipe win API method

I am creating a named pipe in a Windows service running on the local system account with a security attribute like Intptr.Zero in the CreateNamedPipe () method of the Windows API.

The problem is that this named pipe is not available for the user account on which the client application is running and which calls the CreateFile () method.

Now I searched the Internet and found that we can change the security attributes, but I cannot do this.

+3
source share
3 answers

, googling . win api . :

  • SetSecurityDescriptorDacl()
  • InitializeSecurityDescriptor()

, ... http://www.codeproject.com/KB/threads/CodeFX_IPC.aspx?display=Print

....

+3

. .net 3.5 . , . System.IO.Pipes( PipeSecurity .)

0

, ? IntPtr, ref SECURITY_ATTRIBUTES .

. ConvertStringSecurityDescriptorToSecurityDescriptor .

0

Source: https://habr.com/ru/post/1759885/


All Articles