Does anyone know of a good (i.e. efficient) way of getting notifications of filesystem mounts/unmounts and/or new/removed devices in Solaris (10), without requiring root?
I'm trying to avoid simply polling /etc/mnttab for new/removed/changed entries, so my first prototype involved using sysevent_subscribe_event
to listen for device events, and then using the device information in conjunction with /etc/mnttab to get the mount point. That works well, but sysevent_subscribe_event
requires root privileges to run, and I'm not going to have access to the end-user's box, so I can't really elevate their privileges.
I imagine this could be quite tricky, given the restriction of running without root, but any help gratefully received!