From cecb74ae47ea94f53641740f18f2308ff4692f41 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 19 Feb 2002 05:58:44 +0000 Subject: * fork.cc (fork_parent): Use sec_user_nih to control process/thread inheritance/permission. * spawn.cc (spawn_guts): Ditto. * security.cc (create_token): Initialize token so that it is not tested for bogus value later. Use sec_user to control process/thread creation. * security.h (__sec_user): Rename declaration from sec_user. (sec_user_nih): Declare here as inline function wrapper for __sec_user. (sec_user): Ditto. * sigproc.cc (czombies): Allocate a character array for zombies to avoid constructor overhead (extremely hackish, I know). (cpchildren): Ditto. (pchildren): New define. (zombies): Ditto. (getsem): Use sec_user_nih to control semaphore inheritance/permission. --- winsup/cygwin/shared.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'winsup/cygwin/shared.cc') diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc index 7b21e1387..5f1bc1fdd 100644 --- a/winsup/cygwin/shared.cc +++ b/winsup/cygwin/shared.cc @@ -237,11 +237,8 @@ get_null_sd () } PSECURITY_ATTRIBUTES __stdcall -sec_user (PVOID sa_buf, PSID sid2, BOOL inherit) +__sec_user (PVOID sa_buf, PSID sid2, BOOL inherit) { - if (!sa_buf) - return inherit ? &sec_none : &sec_none_nih; - PSECURITY_ATTRIBUTES psa = (PSECURITY_ATTRIBUTES) sa_buf; PSECURITY_DESCRIPTOR psd = (PSECURITY_DESCRIPTOR) ((char *) sa_buf + sizeof (*psa)); @@ -314,9 +311,3 @@ sec_user (PVOID sa_buf, PSID sid2, BOOL inherit) psa->bInheritHandle = inherit; return psa; } - -SECURITY_ATTRIBUTES *__stdcall -sec_user_nih (PVOID sa_buf, PSID sid2) -{ - return sec_user (sa_buf, sid2, FALSE); -} -- cgit v1.2.3