trifectatechfoundation / sudo-rs

A memory safe implementation of sudo and su.
Other
2.88k stars 77 forks source link

`--login` not respected when used with `--chdir` #793

Closed japaric closed 10 months ago

japaric commented 10 months ago

relevant test https://github.com/memorysafety/sudo-rs/blob/405d0b9c4775c2374322e290a884d187b54c4fb8/test-framework/sudo-compliance-tests/src/sudo/flag_chdir.rs#L192-L206

given the invocation sudo --login --chdir /tmp echo '$0'. ogsudo returns -bash (bash in login shell mode). sudo-rs returns /bin/bash (bash in normal shell mode).