]> Zhao Yanbai Git Server - minix.git/commit
PM: extend srv_fork to set a specific UID
authorThomas Veerman <thomas@minix3.org>
Fri, 27 Jan 2012 11:50:11 +0000 (11:50 +0000)
committerThomas Veerman <thomas@minix3.org>
Mon, 30 Jan 2012 15:16:19 +0000 (15:16 +0000)
commit0bd011affd7ee93768bfeb68bc8115e812137435
treefe76c1f6fa73a661c552b30848e030287814a4a1
parent4bee3cff2ef3a5b64d598940a179eec0d0d74378
PM: extend srv_fork to set a specific UID

Currently, all servers and drivers run as root as they are forks of
RS. srv_fork now tells PM with which credentials to run the resulting
fork. Subsequently, PM lets VFS now as well.

This patch also fixes the following bugs:
 - RS doesn't initialize the setugid variable during exec, causing the
   servers and drivers to run setuid rendering the srv_fork extension
   useless.
 - PM erroneously tells VFS to run processes setuid. This doesn't
   actually lead to setuid processes as VFS sets {r,e}uid and {r,e}gid
   properly before checking PM's approval.
common/include/minix/com.h
etc/system.conf
servers/avfs/main.c
servers/pm/exec.c
servers/pm/forkexit.c
servers/rs/exec.c
servers/rs/main.c
servers/rs/manager.c
servers/rs/proto.h
servers/vfs/main.c