From owner-freebsd-bugs@freebsd.org Wed Jan 6 09:00:05 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6AD0A629E7 for ; Wed, 6 Jan 2016 09:00:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD27418D1 for ; Wed, 6 Jan 2016 09:00:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u06905rA099071 for ; Wed, 6 Jan 2016 09:00:05 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 178396] [kernel] [patch] Add jid to kernel log when a process has been forced closed Date: Wed, 06 Jan 2016 09:00:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: thomas@gibfest.dk X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.isobsolete attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2016 09:00:06 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D178396 Thomas Steen Rasmussen / Tykling changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165129|0 |1 is obsolete| | --- Comment #5 from Thomas Steen Rasmussen / Tykling --- Created attachment 165148 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D165148&action= =3Dedit updated patch with jailname instead of hostname Thanks for the review! I've updated the patch to: - use the jailname instead of hostname - leave out the jid - show jail info in the beginning of the line Testing now looks like this with the patch applied: ---------------------------------------------------- [tykling@test /usr/src]$ sudo jail -n testname -c path=3D/ command=3D/bin/sh # perl -e 'dump' Abort trap (core dumped) # ^Djail: /bin/sh: failed [tykling@test /usr/src]$ sudo jail -c path=3D/ command=3D/bin/sh # perl -e 'dump' Abort trap (core dumped) # ^Djail: /bin/sh: failed [tykling@test /usr/src]$ perl -e 'dump' Abort trap [tykling@test /usr/src]$ dmesg | tail -3 [testname] pid 823 (perl), uid 0: exited on signal 6 (core dumped) [6] pid 827 (perl), uid 0: exited on signal 6 (core dumped) pid 828 (perl), uid 1001: exited on signal 6 [tykling@test /usr/src]$ ---------------------------------------------------- There doesn't seem to be a getcred* function to get the jail name, so I've = left that code as is, but getting pr_name instead of pr_hostname. Only thing missing is getting the parent jail names (recursively) where relevant. Do you happen to know if there is an existing function to do that= , or do I have to make one and call it recursively, prepending to a . seperated string until pr_parent is null? --=20 You are receiving this mail because: You are the assignee for the bug.=