[Bug 178396] [kernel] [patch] Add jid to kernel log when a process has been forced closed
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Jan 6 09:00:06 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=178396
Thomas Steen Rasmussen / Tykling <thomas at gibfest.dk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #165129|0 |1
is obsolete| |
--- Comment #5 from Thomas Steen Rasmussen / Tykling <thomas at gibfest.dk> ---
Created attachment 165148
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=165148&action=edit
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 at test /usr/src]$ sudo jail -n testname -c path=/ command=/bin/sh
# perl -e 'dump'
Abort trap (core dumped)
# ^Djail: /bin/sh: failed
[tykling at test /usr/src]$ sudo jail -c path=/ command=/bin/sh
# perl -e 'dump'
Abort trap (core dumped)
# ^Djail: /bin/sh: failed
[tykling at test /usr/src]$ perl -e 'dump'
Abort trap
[tykling at 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 at 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?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list