mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-24 09:13:37 +01:00
Ensure that soft updates are not enabled by default when using mdmfs(8)
When soft updates began being enabled by default that change carried over to mdmfs(8) which does not want or need them. This fix ensures that they are only enabled in mdmfs(8) when requested with the -U flag. Reported by: Ivan Rozhuk Tested by: Ivan Rozhuk PR: 279308 MFC after: 1 week
This commit is contained in:
parent
79a0d14fa0
commit
5b21d4ad06
@ -89,6 +89,7 @@
|
|||||||
#define _PATH_SENDMAIL "/usr/sbin/sendmail"
|
#define _PATH_SENDMAIL "/usr/sbin/sendmail"
|
||||||
#define _PATH_SHELLS "/etc/shells"
|
#define _PATH_SHELLS "/etc/shells"
|
||||||
#define _PATH_TTY "/dev/tty"
|
#define _PATH_TTY "/dev/tty"
|
||||||
|
#define _PATH_TUNEFS "/sbin/tunefs"
|
||||||
#define _PATH_UNIX "don't use _PATH_UNIX"
|
#define _PATH_UNIX "don't use _PATH_UNIX"
|
||||||
#define _PATH_UFSSUSPEND "/dev/ufssuspend"
|
#define _PATH_UFSSUSPEND "/dev/ufssuspend"
|
||||||
#define _PATH_VI "/usr/bin/vi"
|
#define _PATH_VI "/usr/bin/vi"
|
||||||
@ -138,6 +139,8 @@ __END_DECLS
|
|||||||
#define _PATH_REBOOT "/rescue/reboot"
|
#define _PATH_REBOOT "/rescue/reboot"
|
||||||
#undef _PATH_RM
|
#undef _PATH_RM
|
||||||
#define _PATH_RM "/rescue/rm"
|
#define _PATH_RM "/rescue/rm"
|
||||||
|
#undef _PATH_TUNEFS
|
||||||
|
#define _PATH_TUNEFS "/rescue/tunefs"
|
||||||
#undef _PATH_VI
|
#undef _PATH_VI
|
||||||
#define _PATH_VI "/rescue/vi"
|
#define _PATH_VI "/rescue/vi"
|
||||||
#undef _PATH_WALL
|
#undef _PATH_WALL
|
||||||
|
@ -104,7 +104,7 @@ main(int argc, char **argv)
|
|||||||
bool detach, softdep, autounit, newfs;
|
bool detach, softdep, autounit, newfs;
|
||||||
const char *mtpoint, *size_arg, *skel, *unitstr;
|
const char *mtpoint, *size_arg, *skel, *unitstr;
|
||||||
char *p;
|
char *p;
|
||||||
int ch, idx;
|
int ch, idx, rv;
|
||||||
void *set;
|
void *set;
|
||||||
unsigned long ul;
|
unsigned long ul;
|
||||||
|
|
||||||
@ -357,6 +357,13 @@ main(int argc, char **argv)
|
|||||||
do_mdconfig_attach(mdconfig_arg, mdtype);
|
do_mdconfig_attach(mdconfig_arg, mdtype);
|
||||||
if (newfs)
|
if (newfs)
|
||||||
do_newfs(newfs_arg);
|
do_newfs(newfs_arg);
|
||||||
|
if (!softdep) {
|
||||||
|
rv = run(NULL, "%s %s /dev/%s%d", _PATH_TUNEFS,
|
||||||
|
"-n disable", mdname, unit);
|
||||||
|
if (rv)
|
||||||
|
errx(1, "tunefs exited %s %d", run_exitstr(rv),
|
||||||
|
run_exitnumber(rv));
|
||||||
|
}
|
||||||
do_mount_md(mount_arg, mtpoint);
|
do_mount_md(mount_arg, mtpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user