summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/pinfo.cc
diff options
context:
space:
mode:
authorPierre Humblet <phumblet@phumblet.no-ip.org>2003-09-16 00:45:50 +0000
committerPierre Humblet <phumblet@phumblet.no-ip.org>2003-09-16 00:45:50 +0000
commitc61ada9bd3d29734cce244a5cd39ec2cc5882454 (patch)
treebb2c018a739c09593a939283b29cb410ddc82b18 /winsup/cygwin/pinfo.cc
parenta9993197f2d23aeb89a9546a5051addd37e1563c (diff)
downloadcygnal-c61ada9bd3d29734cce244a5cd39ec2cc5882454.tar.gz
cygnal-c61ada9bd3d29734cce244a5cd39ec2cc5882454.tar.bz2
cygnal-c61ada9bd3d29734cce244a5cd39ec2cc5882454.zip
2003-09-15 Pierre Humblet <pierre.humblet@ieee.org>
* security.h (__sec_user): Add "access2" argument. (sec_acl): Add "original" and "access2" arguments. (sec_user): Add "sid2" and "access2" argument. Remove dependence on allow_ntsec. (sec_user_nih): Ditto. * sec_helper.cc (__sec_user): Add "has_security" test. Call sec_acl with new arguments, letting it handle original_sid. (sec_acl): Add "original" and "access2" arguments. Handle original_sid depending on flag but avoiding duplicates. Use "access2" for sid2. * pinfo.cc (pinfo::init): Use security attributes created by sec_user when creating the mapping. * security.cc (create_token): Adjust arguments in call to sec_acl. Call sec_user instead of __sec_user. * syscall.cc (seteuid32): Adjust arguments in call to sec_acl. Remove now unnecessary test. Remove useless conversions to psid. * dcrt0.cc (dll_crt0_1): Call cygsid::init before pinfo_init.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index aca4dff4d..a1f068c2f 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -164,7 +164,11 @@ pinfo::init (pid_t n, DWORD flag, HANDLE in_h)
}
else
{
- h = CreateFileMapping (INVALID_HANDLE_VALUE, &sec_all_nih,
+ 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 */
+ h = CreateFileMapping (INVALID_HANDLE_VALUE, sec_attribs,
PAGE_READWRITE, 0, mapsize, mapname);
created = h && GetLastError () != ERROR_ALREADY_EXISTS;
}