|
Lines 70-76
Link Here
|
| 70 |
<para>In <filename>jail.c</filename>, the first thing I would |
70 |
<para>In <filename>jail.c</filename>, the first thing I would |
| 71 |
note is the declaration of an important structure |
71 |
note is the declaration of an important structure |
| 72 |
<literal>struct jail j</literal>; which was included from |
72 |
<literal>struct jail j</literal>; which was included from |
| 73 |
<filename>/usr/include/sys/jail.h</filename>. |
73 |
<filename>/usr/include/sys/jail.h</filename>.</para> |
| 74 |
|
74 |
|
| 75 |
<para>The definition of the jail structure is:</para> |
75 |
<para>The definition of the jail structure is:</para> |
| 76 |
|
76 |
|
|
Lines 126-132
Link Here
|
| 126 |
<para>Finally, the userland program jails the process, and |
126 |
<para>Finally, the userland program jails the process, and |
| 127 |
executes the command specified. Jail now becomes an |
127 |
executes the command specified. Jail now becomes an |
| 128 |
imprisoned process itself and forks a child process which |
128 |
imprisoned process itself and forks a child process which |
| 129 |
then executes the command given using &man.execv.3; |
129 |
then executes the command given using &man.execv.3;</para> |
| 130 |
|
130 |
|
| 131 |
<programlisting><filename>/usr/src/sys/usr.sbin/jail/jail.c</filename> |
131 |
<programlisting><filename>/usr/src/sys/usr.sbin/jail/jail.c</filename> |
| 132 |
i = jail(<![CDATA[&j]]>); |
132 |
i = jail(<![CDATA[&j]]>); |