-/* $OpenBSD: print.c,v 1.81 2022/02/14 18:09:08 rob Exp $ */
+/* $OpenBSD: print.c,v 1.82 2022/02/15 23:16:00 rob Exp $ */
/* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */
/*-
else
*cp++ = 'u';
}
+ if (kp->p_psflags & PS_CHROOT)
+ *cp++ = 'c';
*cp = '\0';
if (state == 'R' && kp->p_cpuid != KI_NOCPU) {
-.\" $OpenBSD: ps.1,v 1.123 2022/02/14 18:09:08 rob Exp $
+.\" $OpenBSD: ps.1,v 1.124 2022/02/15 23:16:00 rob Exp $
.\" $NetBSD: ps.1,v 1.16 1996/03/21 01:36:28 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
.\"
.\" @(#)ps.1 8.3 (Berkeley) 4/18/94
.\"
-.Dd $Mdocdate: February 14 2022 $
+.Dd $Mdocdate: February 15 2022 $
.Dt PS 1
.Os
.Sh NAME
.\" 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
-/* $OpenBSD: vfs_syscalls.c,v 1.354 2021/12/23 18:50:31 guenther Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.355 2022/02/15 23:16:00 rob Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
vrele(old_cdir);
} else
fdp->fd_rdir = nd.ni_vp;
+ p->p_p->ps_flags |= PS_CHROOT;
return (0);
}
-/* $OpenBSD: proc.h,v 1.325 2022/02/07 19:28:14 rob Exp $ */
+/* $OpenBSD: proc.h,v 1.326 2022/02/15 23:16:00 rob Exp $ */
/* $NetBSD: proc.h,v 1.44 1996/04/22 01:23:21 christos Exp $ */
/*-
#define PS_WXNEEDED 0x00200000 /* Process allowed to violate W^X */
#define PS_EXECPLEDGE 0x00400000 /* Has exec pledges */
#define PS_ORPHAN 0x00800000 /* Process is on an orphan list */
+#define PS_CHROOT 0x01000000 /* Process is chrooted */
#define PS_BITS \
("\20" "\01CONTROLT" "\02EXEC" "\03INEXEC" "\04EXITING" "\05SUGID" \
"\013WAITED" "\014COREDUMP" "\015SINGLEEXIT" "\016SINGLEUNWIND" \
"\017NOZOMBIE" "\020STOPPED" "\021SYSTEM" "\022EMBRYO" "\023ZOMBIE" \
"\024NOBROADCASTKILL" "\025PLEDGE" "\026WXNEEDED" "\027EXECPLEDGE" \
- "\030ORPHAN")
+ "\030ORPHAN" "\031CHROOT")
struct kcov_dev;