chroot.diff
Ricardo Cerqueira
rmcc at novis.pt
Thu Jan 4 07:54:31 EST 2001
On Wed, Jan 03, 2001 at 09:44:09PM +0100, Markus Friedl wrote:
> hi, what is the rationale for the while() loop? why multiple chroot's?
>
There aren't multiple chroots. Just one, when it finds the "magic token" in
the userdir.
The while cycle runs the full homedir string and chops the
first char away in each loop, until the magic token is found (i.e., the
first 3 chars of the string are "/./"). When that happens, the magic token
gets replaced by a NULL, which in effect transforms the full userdir into
the new root. Only then it tries to chroot.
RC
--
+-------------------
| Ricardo Cerqueira
| PGP Key fingerprint - B7 05 13 CE 48 0A BF 1E 87 21 83 DB 28 DE 03 42
| Novis Telecom - Engenharia ISP / Rede Técnica
| Pç. Duque Saldanha, 1, 7º E / 1050-094 Lisboa / Portugal
| Tel: +351 2 1010 0000 - Fax: +351 2 1010 4459
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 524 bytes
Desc: not available
Url : http://lists.mindrot.org/pipermail/openssh-unix-dev/attachments/20010103/206f0822/attachment.bin
More information about the openssh-unix-dev
mailing list