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!

    • over_clox@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      2 days 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 16 bit 8086 compatible and limited to 1MB of RAM.

      Unless I’m missing something here anyways…

    • 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.

    • sjmulder@lemmy.sdf.orgOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      1 day 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
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        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 16

        It legit forces the CPU out of protected mode and back into real mode, even and especially under a protected mode 32 bit OS.

    • thenextguy@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      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.