| chcontext(8) | System Administration | chcontext(8) |
chcontext - chcontext allocates a new security context and executes a command in that context.
chcontext [options] <command arguments>
chcontext allocates a new security context and executes a command in that context. By default, a new/unused context is allocated
Information about context is found in /proc/self/status
/usr/sbin/chcontext
# You must be root, running X. # We start an xterm in another security context /usr/sbin/chcontext xterm &
# We check, there is no xterm running, yet we can # see it. ps ax | grep xterm
# Are we running in security context 0 # We check the s_context line in /proc/self/status cat /proc/self/status
# Ok we in security context 0 # Try the security context 1 /usr/sbin/chcontext --ctx 1 ps ax | grep xterm
# Ok, we see the xterm, we try to kill it /usr/sbin/chcontext --ctx 1 killall xterm
# No, security context 1 can see, but can't kill # let's find out in which security context this # xterm is running /usr/sbin/chcontext --ctx 1 ps ax | grep xterm
# Ok, this is PID XX. We need the security context /usr/sbin/chcontext --ctx 1 cat /proc/XX/status
# We see the s_context, this is SS. # We want to kill this process /usr/sbin/chcontext --ctx SS killall xterm
Please contribute some, if you feel it's important.
This Man page was written by Klavs Klavsen <kl@vsen.dk> and based upon the helpful output from the program itself and the documentation on the Virtual Server site <http://www.solucorp.qc.ca/miscprj/s_context.hc?prjstate=1&nodoc=0>
chbind(8) rebootmgr(8) reducecap(8) vps(8) vpstree(8) vrpm(8) vserver(8) vserver-stat(8) vtop(8)
| 0.1.0 | Klavs Klavsen <kl@vsen.dk> |