From owner-freebsd-arch@FreeBSD.ORG Mon Feb 23 14:48:24 2015 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B53A69A3; Mon, 23 Feb 2015 14:48:24 +0000 (UTC) Received: from pmta1.delivery8.ore.mailhop.org (pmta1.delivery8.ore.mailhop.org [54.191.158.99]) by mx1.freebsd.org (Postfix) with ESMTP id 9522DD51; Mon, 23 Feb 2015 14:48:21 +0000 (UTC) Received: from smtp3.ore.mailhop.org (172.31.36.112) by pmta1.delivery1.ore.mailhop.org id htcups20r84e; Mon, 23 Feb 2015 14:47:48 +0000 (envelope-from ) Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp3.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YPuIw-000553-GN; Mon, 23 Feb 2015 14:48:14 +0000 Received: from fb864.hippie.lan (fb864.hippie.lan [172.22.42.242]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t1NEmCqq002182; Mon, 23 Feb 2015 07:48:13 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX18pbTXQXku9xM8pFlbEPGAF Message-ID: <1424702892.56366.31.camel@freebsd.org> Subject: Call for review: overriding osrelease and osreldate in jails From: Ian Lepore To: "freebsd-arch@FreeBSD.org" , freebsd-jail@FreeBSD.org Date: Mon, 23 Feb 2015 07:48:12 -0700 Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2015 14:48:24 -0000 I've added the ability to specify the values returned by sysctl (and thus by uname) for kern.osrelease and kern.osreldate within a jail. The changes are available for review: https://reviews.freebsd.org/D1948 This allows things like running an 8.4 jail on a 10.1 system such that within the jail the version is reliably spoofed as 8.4. While the uname values can be overridden with env vars, the env vars can be wiped out by scripts that use env(1). Changing the values returned by sysctl is more reliable. -- Ian