Detect root mount attempts on the flag, not on the NULL path.
This commit is contained in:
parent
64042a76b6
commit
282d0382ac
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137480
@ -201,7 +201,7 @@ cd9660_omount(mp, path, data, td)
|
||||
struct iso_mnt *imp = 0;
|
||||
struct nameidata ndp;
|
||||
|
||||
if (path == NULL) /* We are doing the initial root mount */
|
||||
if (mp->mnt_flag & MNT_ROOTFS)
|
||||
return (iso_mountroot(mp, td));
|
||||
if ((error = copyin(data, (caddr_t)&args, sizeof (struct iso_args))))
|
||||
return (error);
|
||||
|
@ -114,7 +114,7 @@ ntfs_omount (
|
||||
/*
|
||||
* Use NULL path to flag a root mount
|
||||
*/
|
||||
if( path == NULL) {
|
||||
if (mp->mnt_flag & MNT_ROOTFS) {
|
||||
/*
|
||||
***
|
||||
* Mounting root filesystem
|
||||
|
@ -201,7 +201,7 @@ cd9660_omount(mp, path, data, td)
|
||||
struct iso_mnt *imp = 0;
|
||||
struct nameidata ndp;
|
||||
|
||||
if (path == NULL) /* We are doing the initial root mount */
|
||||
if (mp->mnt_flag & MNT_ROOTFS)
|
||||
return (iso_mountroot(mp, td));
|
||||
if ((error = copyin(data, (caddr_t)&args, sizeof (struct iso_args))))
|
||||
return (error);
|
||||
|
@ -678,7 +678,7 @@ nfs_omount(struct mount *mp, char *path, caddr_t data, struct thread *td)
|
||||
size_t len;
|
||||
u_char nfh[NFSX_V3FHMAX];
|
||||
|
||||
if (path == NULL)
|
||||
if (mp->mnt_flag & MNT_ROOTFS)
|
||||
return (nfs_mountroot(mp, td));
|
||||
error = copyin(data, (caddr_t)&args, sizeof (struct nfs_args));
|
||||
if (error)
|
||||
|
Loading…
Reference in New Issue
Block a user