On Tue, Aug 14, 2012 at 03:51:51PM +0200, Harald Becker wrote: > Hi Rich ! > > >What happens when you mount to a pathname containing embedded spaces > >and newlines? > > Ugly thing to have newlines within pathname ... have not tried but > beside this: Try the grep on /proc/self/mountinfo ... if you find a > complete match of your path within output of mountinfo you hit a > mountpoint. Ok, may be you need to extend the regex to check from > start of a line till end of line. Gives even better result than current > Busybox mountpoint.
No, the point is that you can have a mountpoint whose name looks like a whole embedded line in mountinfo for another mount that does not exist, and trick programs parsing the file. This is a fundamental design flaw in the kernel that can't be fixed without changing the format to use a delimiter that won't appear in pathnames (e.g. multiple consecutive slashes or null bytes). Rich _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
