dwatch(1): Use mdo(1) instead of sudo(8) when configured

Reviewed by:	dteske, olce
Approved by:	christos (mentor)
MFC after:	1 week
Sponsored by:	fme AG
Differential Revision:	https://reviews.freebsd.org/D60408

(cherry picked from commit b6a573aa77)
This commit is contained in:
Mateusz Piotrowski committed 2026-10-15 21:22:53 +02:00
1 parent a045cfb0c4
commit ea13f1826d
2 files changed
+6 -3

No files matched your search

+2 -1
View File
@@ -717,8 +717,9 @@ pproc_dump()
############################################################ MAIN
# If we're running as root, no need for sudo(8)
# If we're running as root, no need for mdo(1) or sudo(8)
[ "$( id -u )" != 0 ] && type sudo > /dev/null 2>&1 && SUDO=sudo
[ "$( id -u )" != 0 ] && mdo true > /dev/null 2>&1 && SUDO=mdo
#
# Process command-line options
+4 -2
View File
@@ -22,7 +22,7 @@
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd April 18, 2025
.Dd October 6, 2026
.Dt DWATCH 1
.Os
.Sh NAME
@@ -65,7 +65,9 @@ The
utility uses
.Xr dtrace 1
to display process info when a given DTrace probe point is triggered.
Only the root user or users with
Only the root user or users with either
.Xr mdo 1
or
.Xr sudo 8 Pq Pa ports/security/sudo
access can run this command.
.Pp