fixing busybox mount/umount to work with udisks

Laurent Bercot ska-dietlibc at skarnet.org
Tue Jan 31 14:29:59 UTC 2012


> What the uhelper=xxx does, is that when user runs "umount /mnt", it
> calls the uhelper provided instead of kernel. It is then expected that
> the uhelper eventually calls again "umount -i /mnt" which does the
> umounting job. The idea is to hook umount calls, so that they send
> proper notifications to the UI about device being umounted.

 Going out on a limb here. Wouldn't it be cleaner for UI (or other)
parts that need it to listen - via inotify or something - to /proc/mounts
changes, instead of having to add hooks to every command that can
perform a mount/unmount ?


> the uhelper (and non-root umount) stuff in a clean enough manner.

 The hook should really be at the mount(2) or umount(2) system call
level. Patching umount means that some user can write his own umount
command that will mess up the consistency of the stuff.
 I would really advise looking for notifications that are sent by the
*kernel*, and add helpers there, instead of patching user-space tools.

 I'm even fairly sure mdev can be configured to do this.

-- 
 Laurent


More information about the busybox mailing list