https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=178396

Thomas Steen Rasmussen / Tykling <tho...@gibfest.dk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #165129|0                           |1
        is obsolete|                            |

--- Comment #5 from Thomas Steen Rasmussen / Tykling <tho...@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@test /usr/src]$ sudo jail -n testname -c path=/ command=/bin/sh
# perl -e 'dump'
Abort trap (core dumped)
# ^Djail: /bin/sh: failed
[tykling@test /usr/src]$ sudo jail -c path=/ command=/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?

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to