trifectatechfoundation / sudo-rs

A memory safe implementation of sudo and su.
Other
2.9k stars 79 forks source link

Sudo on windows? #745

Closed codeitlikemiley closed 1 year ago

codeitlikemiley commented 1 year ago

I understand this is a re-write of sudo on linux , unix or bsd distributions.

I just wonder if this is supporting sudo for windows or or like perform something similar like running as Administrator or runAs or https://github.com/gerardog/gsudo

It would be great if this would be cross-platform

squell commented 1 year ago

Thanks for your suggestion!

Do note that this is currently a GNU/Linux-only project.

If we start porting to a different operating system, a BSD-based would be the most logical step (but even that is currently not on the road map). Supporting Windows would require a substantial rewrite, and is unlikely to happen.

rnijveld commented 1 year ago

To add a little more to this: it is even highly unlikely that we could even build something like sudo in Windows, because UAC (User Account control) is built directly into Windows and probably has no exposed API that we could rely on. Furthermore, the concepts that Windows uses to differentiate between privileged and unpriviliged users are entirely different than what is common on Linux, BSD and other unix-like systems, which makes supporting Windows virtually impossible. Of course if you use the linux subsystem for windows, you can run our implementation on top of that, but only within that context, not as a general privilige acquisition tool for general usage.