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.
Comment on Presenting: SUDO for DOS
Luci@lemmy.ca 1 day ago
But DOS is a single user mode OS???
sjmulder@lemmy.sdf.org 1 day ago
over_clox@lemmy.world 1 day 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 1 day 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 1 day 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.
over_clox@lemmy.world 1 day 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…