mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-01 00:18:15 +01:00
Only restrict the user from doing something like "mount /mnt /mnt"
for file system types that actually cause a panic (ufs, msdos, cd9660). This makes /proc mountable again.
This commit is contained in:
parent
250c11f9c3
commit
bd70de3eaf
@ -286,10 +286,13 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
|
||||
warn("%s", specpath);
|
||||
return (1);
|
||||
}
|
||||
if (strcmp(mntpath, specpath) == 0) {
|
||||
warnx("%s: Special device file and mount point may not be the same",
|
||||
specpath);
|
||||
return (1);
|
||||
if (strcmp(vfstype, "ufs") == 0 || strcmp(vfstype, "msdos") == 0 ||
|
||||
strcmp(vfstype, "cd9660") == 0) {
|
||||
if (strcmp(mntpath, specpath) == 0) {
|
||||
warnx("%s: Special device file and mount point may not be the same",
|
||||
specpath);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
if (mntopts == NULL)
|
||||
|
@ -286,10 +286,13 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
|
||||
warn("%s", specpath);
|
||||
return (1);
|
||||
}
|
||||
if (strcmp(mntpath, specpath) == 0) {
|
||||
warnx("%s: Special device file and mount point may not be the same",
|
||||
specpath);
|
||||
return (1);
|
||||
if (strcmp(vfstype, "ufs") == 0 || strcmp(vfstype, "msdos") == 0 ||
|
||||
strcmp(vfstype, "cd9660") == 0) {
|
||||
if (strcmp(mntpath, specpath) == 0) {
|
||||
warnx("%s: Special device file and mount point may not be the same",
|
||||
specpath);
|
||||
return (1);
|
||||
}
|
||||
}
|
||||
|
||||
if (mntopts == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user