For reasons that are a mystery to me, the changes from Guido to vm_mmap
authorDavid Greenman <davidg@Root.COM>
Wed, 4 Aug 1993 06:23:00 +0000 (06:23 +0000)
committerDavid Greenman <davidg@Root.COM>
Wed, 4 Aug 1993 06:23:00 +0000 (06:23 +0000)
commit5af262ca366aed1024711bad64136a7967d17aa1
tree23b40f442ddb4f9ae2ef3790f3de9733fd4c0d2c
parentf14f2942ddd68e950525b3d1909ab90654a264b3
For reasons that are a mystery to me, the changes from Guido to vm_mmap
never made it into the source tree. From Guido van Rooij:

when mmapping a file, permissions are checked as it should be. When
mprotect()-ing the address range afterwards, no protection is checked
regarding the protection of the file originally opened. So
when you open /usr/bin/su RDONLY and SHARED you can afterwards change
the mmapped region to READ|WRITE. This gives the possibility to obtain
root privs obviously.
sys/kern/kern_execve.c
sys/kern/sysv_shm.c
sys/vm/vm_mmap.c