Michael Conrad wrote on 12/03/2015 09:06 PM:
Your script is vulnerable to PATH changes. Also be aware of LD_LIBRARY_PATH attacks. If you write a custom c program it should probably call the mount syscall directly. But, you seem to forget the *most* dangerous mount abilities, which are device nodes and set-uid binaries. Consider forcing nodev, noexec, and nosuid. Also the "--move" and "--remount" options aren't safe. And these are just the problems I know about... -Mike
Thanks Mike for these useful info. As Karel here posted, mount has also 'non-superuser mounts' (cf. man mount). I think this one is safer than my wrapper method, I hope at least :-) -- U.Mutlu -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html