trifectatechfoundation / sudo-rs

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

sudo does not apply `/etc/security/limits*` #644

Open japaric opened 1 year ago

japaric commented 1 year ago

relevant tests

https://github.com/memorysafety/sudo-rs/blob/42321c6be3a2c8ca6c42b115f805c128899669ff/test-framework/sudo-compliance-tests/src/limits.rs#L6-L44

note that the 'core dump file size' is set to 0 as a sudoers policy and it cannot be overridden with /etc/security/limits

https://github.com/memorysafety/sudo-rs/blob/42321c6be3a2c8ca6c42b115f805c128899669ff/test-framework/sudo-compliance-tests/src/limits.rs#L50

https://github.com/memorysafety/sudo-rs/blob/42321c6be3a2c8ca6c42b115f805c128899669ff/test-framework/sudo-compliance-tests/src/limits.rs#L76

nbraud commented 1 year ago

Shouldn't this be the job of the pam_limits(8) module?