Date: Fri, 15 Feb 2002 10:50:02 -0800 (PST) From: "."@babolo.ru To: freebsd-bugs@FreeBSD.org Subject: Re: kern/34963: identify procs belonging to the same jail Message-ID: <200202151850.g1FIo2r11372@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/34963; it has been noted by GNATS. From: "."@babolo.ru To: juergen.unger@energis-ision.com Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: kern/34963: identify procs belonging to the same jail Date: Fri, 15 Feb 2002 21:49:10 +0300 (MSK) juergen.unger@energis-ision.com writes: > to identify all processes belonging to the same jail the only secure > way is to use the IP of this jail as criteria. Unfortunately this It is possible to start different jails with the same IP (and different servises in them) So IP does not uniqly identify jail > information is not visible within the process-list of the host or within > the procfs of the host. There is the hostname of the jail the process > belongs to in the procfs but this information can be change by jail-root > users and therefore is not a valid uniq ID for the jail. > This patch now adds the IP of the jail the process runs in to the last > field of the file /proc/<pid>/status. > >How-To-Repeat: > none. system lacks this feature > >Fix: > apply this little patch: > > |--- /usr/src/sys/miscfs/procfs/procfs_status.c.old Tue Jan 22 17:22:59 2002 > |+++ /usr/src/sys/miscfs/procfs/procfs_status.c Fri Feb 15 15:08:40 2002 > |@@ -159,7 +159,7 @@ > | > | if (p->p_prison) > | ps += snprintf(ps, psbuf + sizeof(psbuf) - ps, > |- " %s", p->p_prison->pr_host); > |+ " %s,%lu", p->p_prison->pr_host, p->p_prison->pr_ip); > | else > | ps += snprintf(ps, psbuf + sizeof(psbuf) - ps, " -"); > | DOCHECK(); > > the version of /usr/src/sys/miscfs/procfs/procfs_status.c is > * $FreeBSD: src/sys/miscfs/procfs/procfs_status.c,v 1.20.2.4 2002/01/22 17:22:59 nectar Exp $ > > >Release-Note: > >Audit-Trail: > >Unformatted: > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-bugs" in the body of the message > -- @BABOLO http://links.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200202151850.g1FIo2r11372>