-
-
Notifications
You must be signed in to change notification settings - Fork 172
Cleanup AUTOEXEC.BAT generation #2609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1ef319b
to
41491d3
Compare
The For example, given three local confs as follows:
The command:
When it comes to For several releases, the CLI commands have come first in the above order, however I think it makes sense to treat them in the same order, with the first So for example:
Should produce:
The secure flag is meant to prevent commands inside the interactive DOS environment from changing the mounts (and I suppose, doing harmful things.. like remounting the host's C:\WINDOWS\SYSTEM32\ and deleting everything in there). I think as soon as we're done processing all arguments on the CLI, then |
But you must enable securemode right at the start, otherwise one could still pass in a mount command on the CLI, no? Actually, answering my own question: if it's meant only to prevent users from using the mount command interactively, then yeah, it should be enabled as the last step before giving the usert prompt access. Regarding order of execution, what @kcgen described is pretty much the only sensible way. |
This Regarding the commands and |
c60f706
to
21c6116
Compare
21c6116
to
6e0d769
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, @FeralChild64.
To help test, do you have a zip of conf and bat files to experiment with these different settings?
6e0d769
to
4fc2117
Compare
@kcgen Configuration is not really that relevant here - the most important are the command line parameters. Try different combinations of:
with:
for example, |
Wow @FeralChild64 .. this is brilliant! It "just works" :-), and I cannot confuse it. |
Will restart the CI tasks and will merge once the remainder are confirmed passing. |
CI is 📗 - time to merge 🚀 |
Fixes #2607
Changes (edited, previous idea was corrected):
BLASTER
variable, mountY:
, etc.-c
argumentsZ:\CONFIG.COM -securemode
- if-securemode
argument and no boot image supplied)[autoexec]
sections (unless-noautoexec
option is supplied)BOOT
command (if floppy image is supplied as argument), or execute program (or call batch file) supplied without argument-c
EXIT
command if-exit
or-c exit
argument is provided@kcgen Unfortunately, mixing
-c
with-conf
and combining this into one autoexec section would be complicated and require further rework; I consider this out of scope of this PR. I have checked behavior in commit e2af38f (the last one before my previous autoexec rework) and tried to implement behavior as it was back then.-securemode
argument is provided in the command line, keyboard input is blocked until (Z:\CONFIG.COM -securemode
is executed; I'm afraid that malicious user might attempt to terminateZ:\AUTOEXEC.BAT
execution by sending CTRL+C early enough (it is not currently handled, but I expect at some point will be), to gain access to unrestricted mode.