From owner-freebsd-hackers Sat Dec 7 22:26:43 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC34137B401 for ; Sat, 7 Dec 2002 22:26:42 -0800 (PST) Received: from kanga.honeypot.net (kanga.honeypot.net [208.162.254.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD37B43EBE for ; Sat, 7 Dec 2002 22:26:41 -0800 (PST) (envelope-from kirk@strauser.com) Received: from pooh.honeypot.net (mail@pooh.honeypot.net [10.0.1.2]) by kanga.honeypot.net (8.12.6/8.12.6) with ESMTP id gB86QfRO019396 for ; Sun, 8 Dec 2002 00:26:41 -0600 (CST) (envelope-from kirk@strauser.com) Received: from kirk by pooh.honeypot.net with local (Exim 3.36 #1 (Debian)) id 18Kutl-0002y0-00 for ; Sun, 08 Dec 2002 00:26:41 -0600 To: freebsd-hackers@freebsd.org Subject: How to which jail a process lives in? From: Kirk Strauser Date: 08 Dec 2002 00:26:40 -0600 Message-ID: <87ptsdt49r.fsf@pooh.honeypot.net> Lines: 15 X-Mailer: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've been looking at and related files, and realize that the prison structure lives in kernelspace. Without that resource available to end users, is there a way to find (in a userspace program) which jail a particular task belongs to? I wrote the JailAdmin program that a few people use, and I currently get that information from /proc. However, for many reasons, I'd prefer to switch to reading the output of kvm_getprocs(), but I can't give up the old system until I can find a way to get the same information. Out of curiosity, is there a particular reason not to make a copy of the prison struct available to userspace programs? -- Kirk Strauser In Googlis non est, ergo non est. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message