[BusyBox] Re: [BusyBox-cvs] svn commit: trunk/busybox: include networking

Ladislav Michl ladis at linux-mips.org
Thu Jul 28 17:23:17 UTC 2005


On Thu, Jul 28, 2005 at 11:46:50AM -0500, Rob Landley wrote:
> P.S.  I got an email from Erik yesterday that says he's gone fishing until 
> saturday.  I'm going to try to get this resolved, and also prepare an -rc2 
> and check in my mount rewrite by then, so he can review it all when he gets 
> back.

Hi,

I was unable to find patch you are talking about (didn't try too hard)
and I'd like to ask you to at least apply this one in case you won't
check your rewrite in:

Index: util-linux/mount.c
===================================================================
--- util-linux/mount.c	(revision 10941)
+++ util-linux/mount.c	(working copy)
@@ -418,17 +418,6 @@
 		show_mounts(got_filesystemType ? filesystemType : NULL);
 	}
 
-	if (optind < argc) {
-		/* if device is a filename get its real path */
-		if (stat(argv[optind], &statbuf) == 0) {
-			char *tmp = bb_simplify_path(argv[optind]);
-
-			safe_strncpy(device, tmp, PATH_MAX);
-		} else {
-			safe_strncpy(device, argv[optind], PATH_MAX);
-		}
-	}
-
 	if (optind + 1 < argc)
 		directory = bb_simplify_path(argv[optind + 1]);


Why does such check exist at all? It seems pretty broken to me. Imagine
you want to do 'mount -t jffs2 mtd1 /mnt' while in /dev directory.
Device name gets expanded to /dev/mtd1, which is character device and
mount will fail. Btw, 'mount -t jffs2 mtd:partname /mnt' will fail as
well, because device containing ':' is considered to be NFS server, but
that's another issue...

	ladis



More information about the busybox mailing list