๐Ÿ“ขgitzw.comไธŠ็บฟไบ†๏ผŒๅŠŸ่ƒฝ้™†็ปญๆ›ดๆ–ฐไธญ๏ผŒๅฆ‚ๆœ‰้—ฎ้ข˜ๆˆ–ๅ้ฆˆ่ฏทๅœจไธ‹ๆ–นๅ้ฆˆ/ๅปบ่ฎฎไธญ็ป™ๆˆ‘ไปฌ็•™่จ€ใ€‚
trifectatechfoundation

sudo-rs

trifectatechfoundation/sudo-rsRustโ˜… 4,423โ‘‚ 172
๐Ÿ“ˆ Star trend
View on GitHub

Summary

A memory safe implementation of sudo and su.

๐Ÿ“– Highlights

sudo-rs is a Rust-based, memory-safe implementation of sudo and su, actively maintained with audits and support for multiple Linux distributions.

  • Targeted for FreeBSD and Linux-based OSes.
  • Available via package managers on Ubuntu, Arch, Fedora, Debian, and FreeBSD.
  • Precompiled binaries for x86-64 Linux systems.
  • Can be built from source with Rust 1.85+ and PAM development libraries.
  • Conflicts with original sudo on some systems; alternative command names available.

๐Ÿš€ Install & Usage

Installation

Package Managers

- **Ubuntu**: update-alternatives --config sudo
- **Arch Linux**: pacman -S sudo-rs
- **Fedora**: dnf install sudo-rs
- **Debian**: apt-get install sudo-rs
- **FreeBSD**: pkg install sudo-rs or pkg install sudo-rs-coexist
- **NixOS**: Add security.sudo-rs.enable = true; to configuration.
- **Alpine Linux**: apk add sudo-rs and optionally apk add sudo-rs-su

Precompiled Binaries
Download and extract:

๐Ÿค– AI Deep Analysis

sudo-rs is a promising project for securely managing privileges in Linux systems, but its adoption may be limited by its current platform support and potential compatibility issues.

โœ… Pros

  • Memory safe implementation
  • Written in Rust for security and performance
  • Replaces traditional sudo and su commands

โš ๏ธ Cons

  • Limited platform support
  • May require additional configuration
  • Compatibility issues with existing scripts

๐ŸŽฏ Use cases

  • Securely escalating privileges in Linux systems
  • Replacing insecure sudo and su commands
  • Implementing role-based access control

โš–๏ธ Comparison

Compared to similar tools like sudo and su, sudo-rs provides a more secure and reliable alternative due to its memory safe implementation in Rust, but may lack the maturity and wide platform support of established tools like sudo