[rfc] /dev/devstat permissions patch

From: Maksim Yevmenkin <emax_at_freebsd.org>
Date: Tue, 18 Mar 2014 12:29:32 -0700
hello,

would anyone object to the following patch?

==

Index: subr_devstat.c
===================================================================
--- subr_devstat.c (revision 263311)
+++ subr_devstat.c (working copy)
_at__at_ -503,7 +503,7 _at__at_
  mtx_assert(&devstat_mutex, MA_NOTOWNED);
  if (!once) {
  make_dev_credf(MAKEDEV_ETERNAL | MAKEDEV_CHECKNAME,
-    &devstat_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0400,
+    &devstat_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0444,
     DEVSTAT_DEVICE_NAME);
  once = 1;
  }

==

i'm not sure why /dev/devstat has such restrictive permissions. can
someone please explain the reason for it? having gstat(8) require
super-user privilege seems like an overkill me. iostat(8) and
systat(1) do not require super-user privileges to work.

and, yes, i know i can override permissions with /etc/devfs.conf, just
curious what are we protecting from in /dev/devstat

thanks,
max
Received on Tue Mar 18 2014 - 18:29:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:47 UTC