AaronErhardt / tuxedo-rs

Rust libraries for interacting with hardware from TUXEDO Computers
GNU General Public License v2.0
138 stars 10 forks source link

Bug with Tuxedo Pulse 14 Gen 3 #103

Open gabyx opened 3 months ago

gabyx commented 3 months ago

When I use tailor_hdwcap I get on Tuxedo Pulse 14 Gen 3:

RUST_BACKTRACE=1 tailor_hwcaps
thread 'main' panicked at /build/tuxedo-rs-0.3.1-vendor.tar.gz/sudo/src/lib.rs:141:48:
failed to execute child: Os { code: 2, kind: NotFound, message: "No such file or directory" }
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::result::unwrap_failed
   3: core::result::Result<T,E>::expect
   4: sudo::with_env
   5: tailor_hwcaps::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Could we have some better error message to see whats going wrong. I am using the Nix install with version: 0.3.1

AaronErhardt commented 3 months ago

This panic does not originate in tuxedo-rs but rather in the sudo crate (precisely here). Because hwcaps needs to read data from sysfs and ioctl, it needs elevated privileges which is done with the sudo crate.

Since the sudo binary is not the only commonly used solution for gaining elevated privileges anymore, we should migrate to another crate, but AFAIK there is no alternative at the moment.

gabyx commented 3 months ago

That means I basically can run it with sudo and it should work, I should try again. :)Am 19.06.2024 um 22:51 schrieb Aaron Erhardt @.***>: This panic does not originate in tuxedo-rs but rather in the sudo crate (precisely here). Because hwcaps needs to read data from sysfs and ioctl, it needs elevated privileges which is done with the sudo crate. Since the sudo binary is not the only commonly used solution for gaining elevated privileges anymore, we should migrate to another crate, but AFAIK there is no alternative at the moment.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>