An implementation of sudo for DOS, to run the given command with full privileges. It can be used to edit important system files, run disk partitioning tools, and so on!
Presenting: SUDO for DOS
Submitted 11 hours ago by sjmulder@lemmy.sdf.org to retrocomputing@lemmy.sdf.org
https://codeberg.org/sjmulder/sudo.com
Luci@lemmy.ca 11 hours ago
But DOS is a single user mode OS???
over_clox@lemmy.world 10 hours ago
If I’m understanding this correctly, it works for protected mode DOS, as in the DOS that Windows 95 and 98 run on top of.
In this case, this implementation of SUDO drops the CPU out of protected mode and runs whatever command in real mode, which is 8086 compatible and limited to 1MB of RAM.
Unless I’m missing something here anyways…
sjmulder@lemmy.sdf.org 10 hours ago
That’s true! Since there is no privilege separation in DOS, it needs to do no elevation so it can just execute the command directly. But should a future version of DOS implement unprivileged users or age verification, SUDO can be extended to support it.
over_clox@lemmy.world 7 hours ago
Guess you never heard of 32 bit DOS that ticks underneath Windows 95 and 98.
Read the ASM file, the literal first line is
bits 16It legit forces the CPU out of protected mode and back into real mode.
RedSnt@feddit.dk 10 hours ago
Sure, but anyone can sit at that computer. Talking from experience as the kid that used my parents computer running DOS, I could freely edit config.sys and autoexec.bat to the annoyance of my parents.
With SUDO for DOS I can imagine only those authorized will be able to edit important system files.
I don’t imagine many people are running DOS on the family computer anymore, but still useful.
thenextguy@lemmy.world 10 hours ago
As far as I can see this doesn’t do anything. It just calls int21 0x4B which is just exec. Not related to dpmi or anything like that.