From owner-freebsd-hackers@FreeBSD.ORG Sun Nov 29 19:03:29 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E7B610656CD for ; Sun, 29 Nov 2009 19:03:29 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by mx1.freebsd.org (Postfix) with ESMTP id 9857F8FC17 for ; Sun, 29 Nov 2009 19:03:28 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id 22so875665eye.9 for ; Sun, 29 Nov 2009 11:03:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:date:from:to:subject:message-id :mime-version:content-type:content-disposition; bh=aAd58l+PyiyzH2eNF+tCT7vSXTN17gqDGONRoo3n1y8=; b=mjk1vTHhvo6lcsFYZS9MEm6vPqapOgIajWFubOXHcqjqr6rpO6O0eOcBu+lWyLKIOg YWe4WMwSjwJjZVYq+49e9H92z6SnspoQPX0Gf/PAbRHdFIDUzlUQ1Kzrfh0PdEc+JynT nObqUXU3vPEQ6fEXCLDC7cNIs2XZOdYac0udk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=x-authentication-warning:date:from:to:subject:message-id :mime-version:content-type:content-disposition; b=xehPveZ+jhF/Dv2YN6fEhUqa33nH1SIXHrgDLdA9VUElrSParNKfQzroeLR+8WbDSP x9Trn0IL69Z+6o1noDSC10O2JraJkjy9HIV4SAHDMLrzb/GO2in9YN02zkm/5gwp3Igf 2b1w0/Ybb200XsFNj69UBKptawtuEsvx4ylP0= Received: by 10.216.90.11 with SMTP id d11mr1113375wef.187.1259521407386; Sun, 29 Nov 2009 11:03:27 -0800 (PST) Received: from viper.internal.network (dsl78-143-202-207.in-addr.fast.co.uk [78.143.202.207]) by mx.google.com with ESMTPS id t2sm8325006gve.24.2009.11.29.11.03.26 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 29 Nov 2009 11:03:26 -0800 (PST) Received: from viper.internal.network (localhost [127.0.0.1]) by viper.internal.network (Postfix) with ESMTP id 4F4EB4AC25 for ; Sun, 29 Nov 2009 19:03:24 +0000 (UTC) Received: (from m0@localhost) by viper.internal.network (8.14.3/8.14.3/Submit) id nATJ3Nf7097052 for freebsd-hackers@freebsd.org; Sun, 29 Nov 2009 19:03:23 GMT (envelope-from xorquewasp@googlemail.com) X-Authentication-Warning: viper.internal.network: m0 set sender to xorquewasp@googlemail.com using -f Date: Sun, 29 Nov 2009 19:03:23 +0000 From: xorquewasp@googlemail.com To: freebsd-hackers@freebsd.org Message-ID: <20091129190323.GA90778@logik.internal.network> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: definitive way to set uname in jail? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2009 19:03:29 -0000 It seems that the only way to set the output of uname in a jail is to define environment variables. Unfortunately, there doesn't seem to be a reliable way to unconditionally set them (a process might do the equivalent of 'env -i /bin/sh' and unset them, etc). Apart from just patching the uname utility before I copy it into a jail, is there really a good way to do this? I would love to just be able to set a sysctl and have this work. $ jls | grep i386 29 127.1.0.13 7.2-i386-gnat_build /usr/jails/7.2-i386-gnat_build $ sudo jexec 29 csh FreeBSD 7.2-i386-gnat_build 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:02:08 UTC 2009 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 Regards, xw