Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111510370
D26955.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
687 B
Referenced Files
None
Subscribers
None
D26955.diff
View Options
Index: sbin/mount/mount_fs.c
===================================================================
--- sbin/mount/mount_fs.c
+++ sbin/mount/mount_fs.c
@@ -80,7 +80,7 @@
int iovlen;
int mntflags = 0;
int ch;
- char *dev, *dir, mntpath[MAXPATHLEN];
+ char *dev, *dir, mntpath[MAXPATHLEN], resolveddev[PATH_MAX];
char fstype[32];
char errmsg[255];
char *p, *val;
@@ -123,7 +123,10 @@
warn("%s", mntpath);
return (1);
}
- (void)rmslashes(dev, dev);
+ if (realpath(dev, resolveddev) != NULL)
+ dev = resolveddev;
+ else
+ (void)rmslashes(dev, dev);
build_iovec(&iov, &iovlen, "fstype", fstype, (size_t)-1);
build_iovec(&iov, &iovlen, "fspath", mntpath, (size_t)-1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 5, 3:59 PM (20 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16996106
Default Alt Text
D26955.diff (687 B)
Attached To
Mode
D26955: Try to canonicalize the first argument to mount(8)
Attached
Detach File
Event Timeline
Log In to Comment