[TUHS] Device special files

Ron Natalie ron at ronnatalie.com
Thu Feb 8 08:48:52 AEST 2018


Even notwithstanding distributed systems, dev nodes have some interesting problems.    At Johns Hopkins we allowed users to mount removable disks (RK05 packs).

There were hacks made to the mount program to allow no privileged users to run it.    We had to disable dev nodes and setuid/setuid files from working on other than the root filesystem.

Amusingly, we still found bugs.    I was griping that people would mount on just any directory on the system, the mtab wouldn’t show the absolute path.    I suggested we chdir to / early on or better yet, cd to /dev.  That way I wouldn’t have to type /dev/ on to the device name.     I say the user would have to give an absolute path anyhow since there’s nothing on /dev to mount on.    Well my roommate immediately tries to prove me wrong.   He tries passing various devnodes and regular files that happen to sit in /dev.   Then he gets the great idea of mounting on /dev/.     It works, but now we have no way to unmount it.   We had to reboot the machine.    I quickly modified mount to require an EMPTY directory owned by the user to be required for mounting.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20180207/89336ddf/attachment.html>


More information about the TUHS mailing list