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:
Pierre Humblet
2003-09-27 01:56:36 +00:00
parent 349a6402fe
commit 6806a8b51f
7 changed files with 92 additions and 59 deletions

View File

@ -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;
}