My scenario is the following: the process that creates the named pipe object with CreateNamedPipe()
has administrator privileges, but the client process \"connectin
You can set the descriptor's DACL to NULL instead to allow anyone to access the pipe:
pSD = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH);
if (!pSD)
{
...
}
if (!InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION))
{
...
}
if (!SetSecurityDescriptorDacl(pSD, TRUE, NULL, FALSE))
{
...
}
SECURITY_ATTRIBUTES sa;
sa.nLength = sizeof(sa);
sa.lpSecurityDescriptor = pSD;
sa.bInheritHandle = FALSE;
... = CreateNamedPipe(..., &sa);