From owner-freebsd-current Fri Jan 3 13:37:11 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A42F837B401 for ; Fri, 3 Jan 2003 13:37:10 -0800 (PST) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26D1343EC5 for ; Fri, 3 Jan 2003 13:37:10 -0800 (PST) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by sccrmhc02.attbi.com (sccrmhc02) with ESMTP id <20030103213709002000i7sde>; Fri, 3 Jan 2003 21:37:09 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id NAA77816 for ; Fri, 3 Jan 2003 13:37:08 -0800 (PST) Date: Fri, 3 Jan 2003 13:37:07 -0800 (PST) From: Julian Elischer To: FreeBSD current users Subject: Jail detection Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG We have some software we'd like to behave slightly differently if it is in a jail. What methods do people use to detect they are in a jail? procfs/curproc might work but I don't want to depend on procfs. ps aux can be used but seems rather heavyweight. Something like a sysctl would be best. I could implement it (unless there's already something I missed), if it was considered the right answer. Also, does anyone wnow the mechanism for ping failing (in 4.x systems) from jails? Julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message