Like this:
SECURITY_DESCRIPTOR SD;
InitializeSecurityDescriptor(&SD, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(&SD, TRUE, NULL, FALSE);
I skipped error checking for brevity. You would not do that.
Then, when you call CreateNamedPipe, you can configure the recording of security attributes as follows:
SA.nLength = sizeof(SA);
SA.lpSecurityDescriptor = &SD;
SA.bInheritHandle = TRUE;
The documentation for SetSecurityDescriptorDaclstates:
pDacl DACL, bDaclPresent TRUE, NULL DACL. . NULL DACL , DACL . .
, , , , .