Make setproctitle(3) work in Capsicum capability mode. This makes
ctld(8) child processes to indicate initiator address and name in their titles, similar to what iscsid(8) child processes do. PR: 181352 Differential Revision: https://reviews.freebsd.org/D2363 Reviewed by: rwatson@, mjg@ MFC after: 1 month Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
9a2c85350a
commit
aa32b5e076
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=282086
@ -2822,7 +2822,7 @@ static SYSCTL_NODE(_kern_proc, KERN_PROC_PROC, proc, CTLFLAG_RD | CTLFLAG_MPSAFE
|
||||
sysctl_kern_proc, "Return process table, no threads");
|
||||
|
||||
static SYSCTL_NODE(_kern_proc, KERN_PROC_ARGS, args,
|
||||
CTLFLAG_RW | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE,
|
||||
CTLFLAG_RW | CTLFLAG_CAPWR | CTLFLAG_ANYBODY | CTLFLAG_MPSAFE,
|
||||
sysctl_kern_proc_args, "Process argument list");
|
||||
|
||||
static SYSCTL_NODE(_kern_proc, KERN_PROC_ENV, env, CTLFLAG_RD | CTLFLAG_MPSAFE,
|
||||
|
@ -800,9 +800,6 @@ login(struct connection *conn)
|
||||
}
|
||||
conn->conn_initiator_name = checked_strdup(initiator_name);
|
||||
log_set_peer_name(conn->conn_initiator_name);
|
||||
/*
|
||||
* XXX: This doesn't work (does nothing) because of Capsicum.
|
||||
*/
|
||||
setproctitle("%s (%s)", conn->conn_initiator_addr, conn->conn_initiator_name);
|
||||
|
||||
redirected = login_portal_redirect(conn, request);
|
||||
|
Loading…
Reference in New Issue
Block a user