FreeBSD Bugzilla – Attachment 165129 Details for
Bug 178396
[kernel] [patch] Add jid to kernel log when a process has been forced closed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
updated patch against stable/10 r293209
jailinfo.diff (text/plain), 1.33 KB, created by
Thomas Steen Rasmussen / Tykling
on 2016-01-06 00:42:37 UTC
(
hide
)
Description:
updated patch against stable/10 r293209
Filename:
MIME Type:
Creator:
Thomas Steen Rasmussen / Tykling
Created:
2016-01-06 00:42:37 UTC
Size:
1.33 KB
patch
obsolete
>Index: sys/kern/kern_sig.c >=================================================================== >--- sys/kern/kern_sig.c (revision 293215) >+++ sys/kern/kern_sig.c (working copy) >@@ -2962,13 +2962,31 @@ > */ > if (coredump(td) == 0) > sig |= WCOREFLAG; >- if (kern_logsigexit) >- log(LOG_INFO, >- "pid %d (%s), uid %d: exited on signal %d%s\n", >- p->p_pid, p->p_comm, >- td->td_ucred ? td->td_ucred->cr_uid : -1, >- sig &~ WCOREFLAG, >- sig & WCOREFLAG ? " (core dumped)" : ""); >+ if (kern_logsigexit) { >+ if (jailed(p->p_ucred)) { >+ char buf[MAXHOSTNAMELEN + 3]; >+ if (strcmp(p->p_ucred->cr_prison->pr_hostname, "") != 0) { >+ sprintf(buf, " (%s)", p->p_ucred->cr_prison->pr_hostname); >+ } else { >+ *buf = '\0'; >+ } >+ log(LOG_INFO, >+ "pid %d (%s), uid %d, jid %d%s: exited on signal %d%s\n", >+ p->p_pid, p->p_comm, >+ td->td_ucred->cr_uid, >+ p->p_ucred->cr_prison->pr_id, >+ buf, >+ sig &~ WCOREFLAG, >+ sig & WCOREFLAG ? " (core dumped)" : ""); >+ } else { >+ log(LOG_INFO, >+ "pid %d (%s), uid %d: exited on signal %d%s\n", >+ p->p_pid, p->p_comm, >+ td->td_ucred ? td->td_ucred->cr_uid : -1, >+ sig &~ WCOREFLAG, >+ sig & WCOREFLAG ? " (core dumped)" : ""); >+ } >+ } > } else > PROC_UNLOCK(p); > exit1(td, W_EXITCODE(0, sig));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 178396
:
133845
|
165129
|
165148