OpenBSD top(1) adds flag to show chroot, pledge and unveil status

OpenBSD top(1) adds flag to show chroot, pledge and unveil status

Contributed by Peter N. M. Hansteen on 2026-11-06 from the Q lifts the shroud dept. With one recent commit, the top(1) command on OpenBSD became quite a bit more useful. The commit adds a new -Q flag to show each process’ use of the chroot(2), pledge(2) and unveil(2) facilities.

由 Peter N. M. Hansteen 于 2026 年 11 月 6 日从“Q 揭开面纱”部门投稿。通过最近的一次提交,OpenBSD 上的 top(1) 命令变得更加实用了。此次提交增加了一个新的 -Q 标志,用于显示每个进程对 chroot(2)、pledge(2) 和 unveil(2) 功能的使用情况。

The commit message reads, List: openbsd-cvs Subject: CVS: cvs.openbsd.org: src From: Klemens Nanni <kn () cvs ! openbsd ! org> Date: 2026-11-05 17:54:16 CVSROOT: /cvs Module name: src Changes by: kn@cvs.openbsd.org 2026/11/05 11:54:16 Modified files: usr.bin/top : display.c machine.c machine.h top.1 top.c Log message: add Q flag/key to show pledge/chroot/unveil usage Show promises in COMMAND and ps(1) state letters pertaining to pledge, chroot and unveil usage in PRIV instead of TIME. To quickly identify programs (un)aware of their privileges and thus in extend the system’s security. A non-root user it not enough and alternatives like ps(1) -o state,pledge in tree-mode or wrapped in watch(1) are not nearly as ergonomic as top(1). p and P are already in use, Q has no meaning, but is free. OK deraadt

提交信息如下:列表:openbsd-cvs 主题:CVS: cvs.openbsd.org: src 发件人:Klemens Nanni <kn () cvs ! openbsd ! org> 日期:2026-11-05 17:54:16 CVSROOT: /cvs 模块名称:src 修改者:kn@cvs.openbsd.org 2026/11/05 11:54:16 修改文件:usr.bin/top : display.c machine.c machine.h top.1 top.c 日志信息:添加 Q 标志/键以显示 pledge/chroot/unveil 的使用情况。在 COMMAND 中显示承诺,并在 PRIV(而非 TIME)中显示与 pledge、chroot 和 unveil 使用相关的 ps(1) 状态字母。旨在快速识别(不)了解自身权限的程序,从而扩展系统安全性。仅使用非 root 用户是不够的,而诸如在树状模式下使用 ps(1) -o state,pledge 或将其包装在 watch(1) 中等替代方案,其易用性远不如 top(1)。p 和 P 已经被占用,Q 没有特定含义,但目前可用。OK deraadt

You will need to install a fresh snapshot in order to explore and enjoy this feature.

你需要安装最新的快照版本,以便探索和体验此功能。