jcnelson / vdev

A device-file manager for *nix
GNU General Public License v3.0
101 stars 13 forks source link

Per-user, unprivileged device rules actions #17

Open jcnelson opened 9 years ago

jcnelson commented 9 years ago

Let users define their own device rules and actions (let's say under ~/.vdev/ or the like).

The motivation is to let unprivileged applications (i.e. desktop environments) specify actions to take when the user plugs something in, or a device comes online.

jcnelson commented 9 years ago

The way we'll do this is create a second vdevd backend--one that watches the filesystem instead of listens for new devices from the kernel. A user can start it, or it can be started as part of the .bashrc. It will behave exactly like the "root" vdevd insofar as setting it up (actions and scripts). Critically, it (1) will only be able to access devices the user is allowed to (or even see, with vdevfs), and (2) its actions will run with user privileges, not root privileges.