Restrict permissions on /dev/ksyms to 0400.

The ksyms(4) device was added specifically for use by lockstat(1), which
as a DTrace consumer must run as root.

Discussed with:	emaste
MFC after:	3 days
This commit is contained in:
markj 2017-07-28 03:14:31 +00:00
parent 5782859b4e
commit d74f88f14e

View File

@ -592,7 +592,7 @@ ksyms_modevent(module_t mod __unused, int type, void *data __unused)
case MOD_LOAD:
mtx_init(&ksyms_mtx, "KSyms mtx", NULL, MTX_DEF);
ksyms_dev = make_dev(&ksyms_cdevsw, 0, UID_ROOT, GID_WHEEL,
0444, KSYMS_DNAME);
0400, KSYMS_DNAME);
break;
case MOD_UNLOAD: