opnsense-src/bin
Olivier Certner a2132d9173
ps(1): '-U' to select processes by real user IDs
This is what POSIX mandates for option '-U' and arguably the behavior
that most users actually need in most cases.  Before, '-U' would select
processes by their effective user IDs (which is the behavior mandated by
POSIX for option '-u').

Matching by real user IDs allows to list all processes belonging to the
passed users, including those temporarily having a different effective
user ID, which can happen if launched by a setuid executable or if using
some credentials-changing facility (such as seteuid() for root processes
or mac_do(4)/setcred(2)).  Conversely, processes temporarily assuming
the identity of some of the passed users will not be listed anymore
(they do not "belong" to these users).

This change also makes '-U' consistent with '-G', the latter already
matching on real group IDs.

While here, remove the (non-compiled) code for tentative option '-R' as
its proposed behavior was the one established here for '-U'.  Also, move
the compiled-out old code for '-U' under '-u' for reference, as this is
what the latter should do according to POSIX, even if it seems unlikely
we will want to change the behavior of '-u'.

Reviewed by:    manpages (ziaee)
MFC after:      3 days
Relnotes:       yes
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D49622 (code)
Differential Revision:  https://reviews.freebsd.org/D49623 (manual page)

(cherry picked from commit 995b690d1398044dc9d85a6d86ec550cda30b2ac)
2025-05-01 21:42:25 +02:00
..
cat cat: Check for lack of success rather than a specific failure. 2024-05-14 08:58:40 +02:00
chflags chflags(1): obey siginfo request on chflagsat(2) failure 2024-02-06 02:37:37 +02:00
chio Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
chmod Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
cp cp: Improve error messages. 2025-04-20 08:00:29 +00:00
cpuset Use proper convention for relative path linking 2023-08-18 04:20:32 -07:00
csh csh: Remove gethost dependency on tc.const.h 2025-02-18 12:19:16 -05:00
date date: Fix a few nits. 2024-10-06 09:12:24 +00:00
dd Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
df Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
domainname Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
echo Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
ed Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
expr Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
freebsd-version bsdinstall: rename "Live CD" to "Live System" 2024-01-07 14:31:10 -05:00
getfacl Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
hostname hostname(1): Add test cases 2024-02-08 14:02:33 +08:00
kenv Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
kill kill.1: mention special meaning of PGID as a PID 2025-01-21 02:25:59 +02:00
ln faccessat(2): Honor AT_SYMLINK_NOFOLLOW 2024-09-26 09:13:50 -04:00
ls ls: Release resources before returning from traverse() 2025-01-28 16:00:12 +00:00
mkdir Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
mv mv: Set file flags after setting file times 2024-04-25 09:20:16 -04:00
nproc nproc.1: Fix "first appeared in" details 2023-06-02 18:53:55 +02:00
pax pax: Clear arcn in each read function. 2024-08-01 18:15:57 +02:00
pkill pkill tests: Fix pkill usage in the pkill -x test 2025-04-06 13:54:03 +00:00
ps ps(1): '-U' to select processes by real user IDs 2025-05-01 21:42:25 +02:00
pwait Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
pwd Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
realpath Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
rm Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
rmail Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
rmdir Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
setfacl Remove $FreeBSD$: two-line nroff pattern 2023-08-16 11:55:10 -06:00
sh sh(1): Replace recommendation of use of -e with a note 2025-03-15 15:00:17 +01:00
sleep Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
stty (s)tty: add support for IUTF8 input flag 2023-10-21 17:28:34 +03:00
sync sync.8: Document that the "sync dance" is not a thing 2024-04-28 20:28:43 +02:00
test Remove $FreeBSD$: one-line nroff pattern 2023-08-16 11:55:15 -06:00
tests Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
timeout timeout(1): Add -v/--verbose option to show diagnosis info 2025-01-19 20:30:13 +01:00
uuidgen pkgbase: Move uuidgen to runtime package 2023-10-18 16:36:30 +02:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00