Date: Wed, 11 Jul 2007 14:01:04 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 123323 for review Message-ID: <200707111401.l6BE14bP018581@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=123323 Change 123323 by zec@zec_tca51 on 2007/07/11 14:00:08 Prohibit a vimage from reconfiguring and / or destroying itself. Affected files ... .. //depot/projects/vimage/src/sys/kern/kern_vimage.c#24 edit Differences ... ==== //depot/projects/vimage/src/sys/kern/kern_vimage.c#24 (text+ko) ==== @@ -177,6 +177,8 @@ vi_child_of(parent, child) struct vimage *parent, *child; { + if (child == parent) + return (0); for (; child; child = child->vi_parent) if (child == parent) return (1); @@ -338,9 +340,9 @@ } else vip_r = vip; - if (vip_r && vip != &vimage_0 && !vi_child_of(vip, vip_r)) { + if (vip_r && !vi_child_of(vip, vip_r) && + vi_req->req_action != VI_GET && vi_req->req_action != VI_GETNEXT) return (EPERM); - } switch (cmd) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707111401.l6BE14bP018581>