summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko2007-05-20 12:32:41 +0000
committerDenis Vlasenko2007-05-20 12:32:41 +0000
commit38ec147a181cc2b5d160d98ee20bb9aacc5de9eb (patch)
tree80c37081e0e641fd42db81761bd6d1dbe90a2ee7
parent6d709972cdad4848908813c673b2f5fdc9e3c4c0 (diff)
downloadbusybox-38ec147a181cc2b5d160d98ee20bb9aacc5de9eb.zip
busybox-38ec147a181cc2b5d160d98ee20bb9aacc5de9eb.tar.gz
mount: fix mounting of symlinks (mount from util-linux allows that)
-rw-r--r--util-linux/mount.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index b76c38a..030ea66 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -1453,8 +1453,10 @@ static int singlemount(struct mntent *mp, int ignore_busy)
// Look at the file. (Not found isn't a failure for remount, or for
// a synthetic filesystem like proc or sysfs.)
+ // (We use stat, not lstat, in order to allow
+ // mount symlink_to_file_or_blkdev dir)
- if (!lstat(mp->mnt_fsname, &st)
+ if (!stat(mp->mnt_fsname, &st)
&& !(vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE))
) {
// Do we need to allocate a loopback device for it?