* pinfo.cc (pinfo::init): Define sa_buf as PSECURITY_ATTRIBUTES and
allocate dynamically. (pinfo::set_acl): Replace sa_buf by dynamically allocated acl_buf. * sec_acl.cc (setacl): Allocate acl dynamically. * sec_helper.cc (sec_acl): Add test for alignment of acl when DEBUGGING is defined. (__sec_user): Same for sa_buf. * security.cc (verify_token): Define sd_buf as PSECURITY_DESCRIPTOR and allocate dynamically. (alloc_sd): Allocate acl dynamically. security.h (sec_user_nih): Change first parameter to SECURITY_ATTRIBUTES *. (sec_user): Ditto. * sigproc.cc (wait_sig): Define sa_buf as PSECURITY_ATTRIBUTES and allocate dynamically. * syscalls.cc (seteuid32): Define dacl_buf as PACL and allocate dynamically. * uinfo.cc (cygheap_user::init): Define sa_buf as PSECURITY_ATTRIBUTES and allocate dynamically. * winbase.h (ilockincr): Mark first argument of inline assembly as earlyclobber. (ilockdecr): Ditto.
This commit is contained in:
@@ -2053,10 +2053,10 @@ seteuid32 (__uid32_t uid)
|
||||
&groups.pgsid, sizeof (cygsid)))
|
||||
debug_printf ("SetTokenInformation(user.token, TokenPrimaryGroup), %E");
|
||||
/* Try setting default DACL */
|
||||
char dacl_buf[MAX_DACL_LEN (5)];
|
||||
if (sec_acl ((PACL) dacl_buf, true, true, usersid))
|
||||
PACL dacl_buf = (PACL) alloca (MAX_DACL_LEN (5));
|
||||
if (sec_acl (dacl_buf, true, true, usersid))
|
||||
{
|
||||
TOKEN_DEFAULT_DACL tdacl = { (PACL) dacl_buf };
|
||||
TOKEN_DEFAULT_DACL tdacl = { dacl_buf };
|
||||
if (!SetTokenInformation (new_token, TokenDefaultDacl,
|
||||
&tdacl, sizeof (tdacl)))
|
||||
debug_printf ("SetTokenInformation (TokenDefaultDacl), %E");
|
||||
|
Reference in New Issue
Block a user