2003-09-26 Pierre Humblet <pierre.humblet@ieee.org>
* uinfo.cc (cygheap_user::init): Make sure the current user appears in the default DACL. Rearrange to decrease the indentation levels. Initialize the effec_cygsid directly. (internal_getlogin): Do not reinitialize myself->gid. Open the process token with the required access. * cygheap.h (class cygheap_user): Delete members pid and saved_psid. Create members effec_cygsid and saved_cygsid. (cygheap_user::set_sid): Define inline. (cygheap_user::set_saved_sid): Ditto. (cygheap_user::sid): Modify. (cygheap_user::saved_sid): Modify. * cygheap.cc (cygheap_user::set_sid): Delete. (cygheap_user::set_saved_sid): Ditto. * sec_helper.cc (sec_acl): Set the correct acl size. * autoload.cc (FindFirstFreeAce): Add. * security.h: Define ACL_DEFAULT_SIZE.
This commit is contained in:
@ -444,28 +444,3 @@ cygheap_user::set_name (const char *new_name)
|
||||
cfree_and_set (pwinname);
|
||||
}
|
||||
|
||||
BOOL
|
||||
cygheap_user::set_sid (PSID new_sid)
|
||||
{
|
||||
if (new_sid)
|
||||
{
|
||||
if (!psid)
|
||||
psid = cmalloc (HEAP_STR, MAX_SID_LEN);
|
||||
if (psid)
|
||||
return CopySid (MAX_SID_LEN, psid, new_sid);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL
|
||||
cygheap_user::set_saved_sid ()
|
||||
{
|
||||
if (psid)
|
||||
{
|
||||
if (!saved_psid)
|
||||
saved_psid = cmalloc (HEAP_STR, MAX_SID_LEN);
|
||||
if (saved_psid)
|
||||
return CopySid (MAX_SID_LEN, saved_psid, psid);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user