Hi,
I tried following to lower integrity level for a named pipe which is created in the same thread, but I got error code 5(access denied), does anyone know what's wrong
#include <sddl.h>
// The LABEL_SECURITY_INFORMATION SDDL SACL to be set for low integrity
#define LOW_INTEGRITY_SDDL_SACL_W L"S:(ML;;NW;;;LW)"
BOOL b = TRUE;
DWORD dwErr = ERROR_SUCCESS;
PSECURITY_DESCRIPTOR pSD = NULL;
PACL pSacl = NULL; // not allocated
BOOL fSaclPresent = FALSE;
BOOL fSaclDefaulted = FALSE;
LPCWSTR pwszFileName = "Sample.txt";
b = ConvertStringSecurityDescriptorToSecurityDescriptorW(LOW_INTEGRITY_SDDL_SACL_W, SDDL_REVISION_1, &pSD, NULL);
b = GetSecurityDescriptorSacl(pSD, &fSaclPresent, &pSacl, &fSaclDefaulted);
// Note that psidOwner, psidGroup, and pDacl are all NULL.
dwErr = SetSecurityInfo(hPipe, SE_KERNEL_OBJECT, LABEL_SECURITY_INFORMATION, NULL, NULL, NULL, pSacl);
And the hPipe is created by: CreateNamedPipe
Thanks!
Mary

lower integrity level for named pipe
Matthew Galligan
In case you didn't solve it yet, and in case anyone else suffers the same problem, here's one possible reason. It took me more than a day to track this down in debugging an addition to someone else's code.
In the call to CreatePipe, did you tell it to give you WRITE_DAC permission on the resulting handle
D13G0
I'm wondering any MS folks read this forum.
I think most questions should be easy for those MS developers.
It will greatly help the outsiders to save time considering that there are limited documents(especially that the MSDN is not updated with new features and/or details.).