From ecc28ff8db7c43779f328d31633d5f8358a3cf5b Mon Sep 17 00:00:00 2001 From: Pierre Humblet Date: Sat, 27 Sep 2003 02:30:46 +0000 Subject: [PATCH] 2003-09-26 Pierre Humblet * pinfo.cc (pinfo::init): Do not give FILE_MAP_WRITE access to Everybody. * exceptions.cc (sig_handle_tty_stop): Do not create pinfo parent with PID_MAP_WRITE. * fhandler_process.cc (fhandler_process::fill_filebuf): Ditto for pinfo p. * signal.cc (kill_worker): Ditto for pinfo dest. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/exceptions.cc | 2 +- winsup/cygwin/fhandler_process.cc | 3 +-- winsup/cygwin/pinfo.cc | 2 +- winsup/cygwin/signal.cc | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 485dd7729..7159614a4 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2003-09-26 Pierre Humblet + + * pinfo.cc (pinfo::init): Do not give FILE_MAP_WRITE access to Everybody. + * exceptions.cc (sig_handle_tty_stop): Do not create pinfo parent with + PID_MAP_WRITE. + * fhandler_process.cc (fhandler_process::fill_filebuf): Ditto for pinfo p. + * signal.cc (kill_worker): Ditto for pinfo dest. + 2003-09-26 Pierre Humblet * pinfo.h (pinfo::set_acl): Declare. diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index a5b32c3a6..24b452be7 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -616,7 +616,7 @@ sig_handle_tty_stop (int sig) its list of subprocesses. */ if (my_parent_is_alive ()) { - pinfo parent (myself->ppid, PID_MAP_RW); + pinfo parent (myself->ppid); if (ISSTATE (parent, PID_NOCLDSTOP)) sig_send (parent, SIGCHLD); } diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 716a20f00..3b61cd918 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -245,8 +245,7 @@ out: bool fhandler_process::fill_filebuf () { - pinfo p (pid, PID_MAP_RW); // PID_MAP_RW for cmdline since it - // needs to signal the other process + pinfo p (pid); if (!p) { diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 0967215e7..ce210c3c5 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -170,7 +170,7 @@ pinfo::init (pid_t n, DWORD flag, HANDLE in_h) char sa_buf[1024]; PSECURITY_ATTRIBUTES sec_attribs = sec_user_nih (sa_buf, cygheap->user.sid(), well_known_world_sid, - FILE_MAP_READ | FILE_MAP_WRITE); /* FIXME */ + FILE_MAP_READ); h = CreateFileMapping (INVALID_HANDLE_VALUE, sec_attribs, PAGE_READWRITE, 0, mapsize, mapname); created = h && GetLastError () != ERROR_ALREADY_EXISTS; diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index a7e25ea46..7f6fcbe44 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -173,7 +173,7 @@ kill_worker (pid_t pid, int sig) sig_dispatch_pending (); int res = 0; - pinfo dest (pid, PID_MAP_RW); + pinfo dest (pid); BOOL sendSIGCONT; if (!dest) -- 2.43.5