On Thu, Sep 27, 2007 at 02:01:37AM +0200, Adrian Bunk wrote:chroot() is present in v7, thank you very much. /usr/sys/sys/sys4.c has chdir() { chdirec(&u.u_cdir); } chroot() { if (suser()) chdirec(&u.u_rdir); } and back then it didn't stop lookups by .. at all - u_rdir is only used in the beginning of namei() (when pathname starts with /), plus the obvious refcounting in exit()/newproc(). So give me a break - back when it had been introduced, it didn't do anything jail-like _at_ _all_. That check appears only in BSD: @@ -1,4 +1,4 @@ -/* vfs_lookup.c 4.4 03/06/81 */ +/* vfs_lookup.c 4.5 81/03/09 */ #include "../h/param.h" #include "../h/systm.h" @@ -107,6 +107,9 @@ u.u_segflg = 1; eo = 0; bp = NULL; + if (dp == u.u_rdir && u.u_dent.d_name[0] == '.' && + u.u_dent.d_name[1] == '.' && u.u_dent.d_name[2] == 0) + goto cloop; eloop: with spectaculary lousy commit message ("lint and a minor fixed") by wnj. Feel free to ask Bill Joy WTF he had intended. At a guess, more consistent behaviour in chrooted environment (i.e. pathname resolution looking as if the subtree had been everything). To talk about root-safety of _anything_ at that point is bloody ridiculous. -
| Alexey Dobriyan | Re: [RFC/PATCH] Documentation of kernel messages |
| Adrian Bunk | [RFC: 2.6 patch] let GROUP_SCHED depend on BROKEN |
| Chuck Ebbert | Why do so many machines need "noapic"? |
| Christoph Hellwig | Re: [PATCHSET] FUSE: extend FUSE to support more operations |
git: | |
| Jim Meyering | synchronizing incremental git changes to cvs |
| Sverre Rabbelier | Re: [PATCH v2 00/11] gitweb: display remote heads |
| Andreas Hildebrandt | CVS-$Id:$ replacement in git? |
| Johannes Schindelin | [PATCH] Document levenshtein.c |
| Alex Thurlow | Router performance on OpenBSD and OpenBGPD |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Richard Storm | MAXDSIZ 1GB memory limit for process |
| BradenM - Sonoma Computer | OpenBSD serial terminal binary programs |
| Larry McVoy | Re: tcp bw in 2.6 |
| Marcel Holtmann | Bluetooth fixes for 2.6.27 |
| Evgeniy Polyakov | [resend take 2 0/4] Distributed storage. |
| Dan Williams | [PATCH 00/13] dmaengine redux |
