reberhardt7 / cplayground

GNU General Public License v3.0
115 stars 14 forks source link

Add kernel module parameter for cplayground file owner #45

Closed glen3b closed 4 years ago

glen3b commented 4 years ago

Fixes #28. Instead of hardcoding UID 1000 and GID 1000 as the owner of the cplayground procfs file, default to being root:root owned, but expose module parameters to allow the sysadmin to set the user. In the Vagrantfile, pull the UID and GID of our vagrant user and set that as the file owner.

I elected to change the default to root ownership because that felt more appropriate for a general default: process introspection should be secure by default, and assuming UID 1000 at the module level feels hacky. UID 0, by contrast, is meaningful on every Linux system. Changing the owner UID is as simple as a module reload, and could probably be exposed by a sysfs parameter without too much trouble if we are so inclined.

reberhardt7 commented 4 years ago

This is perfect! Thanks a lot for looking into this!