summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRob Pierce <rob@cvs.openbsd.org>2022-02-07 22:57:48 +0000
committerRob Pierce <rob@cvs.openbsd.org>2022-02-07 22:57:48 +0000
commit4c7ac95e40bab13bd994706e38e8cc3472200650 (patch)
tree391457883dd5bc433802e98c44e8aaf83a4c397b /bin
parenta376d7d0fa8ed83660d7d34914c2dead4c839b02 (diff)
New status flag: 'c' - process is chrooted.
Feedback and tweaks from deraadt@ guenther@ Ok bluhm@ deraadt@
Diffstat (limited to 'bin')
-rw-r--r--bin/ps/print.c4
-rw-r--r--bin/ps/ps.14
2 files changed, 6 insertions, 2 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 40e0622420f..4e49a7fc3c6 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.79 2022/01/05 04:10:36 guenther Exp $ */
+/* $OpenBSD: print.c,v 1.80 2022/02/07 22:57:47 rob Exp $ */
/* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */
/*-
@@ -289,6 +289,8 @@ printstate(const struct kinfo_proc *kp, VARENT *ve)
else
*cp++ = 'u';
}
+ if (kp->p_eflag & EPROC_CHROOT)
+ *cp++ = 'c';
*cp = '\0';
if (state == 'R' && kp->p_cpuid != KI_NOCPU) {
diff --git a/bin/ps/ps.1 b/bin/ps/ps.1
index 8586836e8f4..55a6e9f3d70 100644
--- a/bin/ps/ps.1
+++ b/bin/ps/ps.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ps.1,v 1.121 2022/02/07 19:28:14 rob Exp $
+.\" $OpenBSD: ps.1,v 1.122 2022/02/07 22:57:47 rob Exp $
.\" $NetBSD: ps.1,v 1.16 1996/03/21 01:36:28 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
@@ -451,6 +451,8 @@ swapped.
.\" for example,
.\" .Xr lisp 1
.\" in a garbage collect).
+.It c
+The process is chrooted.
.It E
The process is trying to exit.
.It K