From owner-freebsd-stable@FreeBSD.ORG Sun Sep 21 23:06:35 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C01361065673 for ; Sun, 21 Sep 2008 23:06:35 +0000 (UTC) (envelope-from jcw@highperformance.net) Received: from mx1.highperformance.net (s5.stradamotorsports.com [64.81.163.123]) by mx1.freebsd.org (Postfix) with ESMTP id 8A97E8FC0C for ; Sun, 21 Sep 2008 23:06:35 +0000 (UTC) (envelope-from jcw@highperformance.net) Received: from w16.stradamotorsports.com (w16.stradamotorsports.com [192.168.1.16]) by mx1.highperformance.net (8.13.8/8.13.8) with ESMTP id m8LN6YxD055281 for ; Sun, 21 Sep 2008 16:06:34 -0700 (PDT) (envelope-from jcw@highperformance.net) Message-ID: <48D6D379.10909@highperformance.net> Date: Sun, 21 Sep 2008 16:06:33 -0700 From: "Jason C. Wells" User-Agent: Thunderbird 2.0.0.4pre (X11/20080205) MIME-Version: 1.0 CC: freebsd-stable References: <48D68FD6.50804@highperformance.net> <20080921215113.GB9494@icarus.home.lan> <48D6C995.7060606@highperformance.net> <48D6CAAE.9060303@highperformance.net> In-Reply-To: <48D6CAAE.9060303@highperformance.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=2.5 tests=ALL_TRUSTED,BAYES_00 autolearn=failed version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on s4.stradamotorsports.com Subject: Install -S Not Safe was: Re: Installworld deletes libc X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Sep 2008 23:06:35 -0000 Jason C. Wells wrote: > Jason C. Wells wrote: > I should add that 'systcl security.jail.chflags_allowed=1' allowed > installworld to proceed without error. That solves my immediate problem. > There appears to be a bug in the security mechanism. The reason there appeared to be a bug in the security mechanism is that I performed (IIRC) chflags -noschg on libc as root on the host system outside the jail. But for some reason 'install -S' was not safe. (outside the jail) ~$ chflags noschg /usr/jails/cr/lib/libc.so.6 (inside the jail) [root@s4cr /usr/src/lib/libc]# ls -lao /lib/libc.so.6 -rwxr-xr-x 1 root wheel - 981331 Sep 21 15:57 /lib/libc.so.6 [root@s4cr /usr/src/lib/libc]# sysctl -a | grep secur kern.securelevel: -1 security.jail.chflags_allowed: 0 [root@s4cr /usr/src/lib/libc]# make install install -C -o root -g wheel -m 444 libc.a /usr/lib install -C -o root -g wheel -m 444 libc_p.a /usr/lib install -s -o root -g wheel -m 444 -fschg -S libc.so.6 /lib install: /lib/libc.so.6: chflags: Operation not permitted *** Error code 71 Stop in /usr/src/lib/libc. [root@s4cr /usr/src/lib/libc]# ls -lao /lib/libc.so.6 /libexec/ld-elf.so.1: Shared object "libc.so.6" not found, required by "ls" [root@s4cr /usr/src/lib/libc]# Regards, Jason