nullpo-head / WSL-Hello-sudo

Let's sudo by face recognition of Windows Hello on Windows Subsystem for Linux (WSL). It runs on both WSL 1 and WSL 2. This is a PAM module for Linux on WSL.
MIT License
1.22k stars 46 forks source link

Only works if C drive is mounted in /mnt/ #9

Closed jonaskuske closed 3 years ago

jonaskuske commented 3 years ago

During installation the script asks for the /c location if /mnt/c/ doesn't exist, but then the authentication code in Rust still requires it to be /mnt/c/: https://github.com/nullpo-head/WSL-Hello-sudo/blob/master/src/auth.rs#L209

Since users enter the /c location already anyway as part of the setup, I guess this location could just be stored in etc/pam_wsl_hello/config alongside the authenticator_path – though I think it'd be cleaner to automatically use the root property in etc/wsl.conf to check for the drive mount root.