mirror of
https://github.com/opnsense/src.git
synced 2026-02-19 02:30:08 -05:00
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) |
||
|---|---|---|
| .. | ||
| extern.h | ||
| fmt.c | ||
| keyword.c | ||
| Makefile | ||
| Makefile.depend | ||
| nlist.c | ||
| print.c | ||
| ps.1 | ||
| ps.c | ||
| ps.h | ||