From 6806a8b51f96d59cb6dadd86fab4ae7cdecca3ed Mon Sep 17 00:00:00 2001 From: Pierre Humblet Date: Sat, 27 Sep 2003 01:56:36 +0000 Subject: 2003-09-26 Pierre Humblet * 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. --- winsup/cygwin/cygheap.cc | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'winsup/cygwin/cygheap.cc') diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 077610fa0..ede408695 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -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; -} -- cgit v1.2.3