Skip to content

Commit 50f3273

Browse files
author
Pavel Filipenský
committed
examples:winexe: Initialize Trustee.ptstrName at the right time
This is a regression of a39cb60 examples:winexe: Fully initialize EXPLICIT_ACCESS BUG: https://bugzilla.samba.org/show_bug.cgi?id=15752 Signed-off-by: Pavel Filipenský <[email protected]> Reviewed-by: Andreas Schneider <[email protected]> Autobuild-User(master): Pavel Filipensky <[email protected]> Autobuild-Date(master): Wed Nov 13 15:47:40 UTC 2024 on atb-devel-224
1 parent c7839fa commit 50f3273

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/winexe/winexesvc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ static int CreatePipesSA()
6868
.Trustee = {
6969
.TrusteeForm = TRUSTEE_IS_SID,
7070
.TrusteeType = TRUSTEE_IS_GROUP,
71-
.ptstrName = (LPTSTR)pAdminSID,
7271
},
7372
};
7473
SID_IDENTIFIER_AUTHORITY SIDAuthNT = {SECURITY_NT_AUTHORITY};
@@ -86,6 +85,8 @@ static int CreatePipesSA()
8685
return 0;
8786
}
8887

88+
ea.Trustee.ptstrName = (LPTSTR)pAdminSID;
89+
8990
/* Create a new ACL that contains the new ACEs */
9091
dwRes = SetEntriesInAcl(1, &ea, NULL, &pACL);
9192
if (ERROR_SUCCESS != dwRes) {

0 commit comments

Comments
 (0)