mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-09-02 23:57:52 +00:00
Fix sendmail executable permission check (#7483)
* Fix sendmail executable permission check * Use access check for sendmail command
This commit is contained in:
+2
-5
@@ -1162,11 +1162,8 @@ fn validate_config(cfg: &ConfigItems, on_update: bool) -> Result<(), Error> {
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
{
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
if !metadata.permissions().mode() & 0o111 != 0 {
|
||||
err!(format!("sendmail command at `{path:?}` isn't executable"));
|
||||
}
|
||||
if nix::unistd::access(&path, nix::unistd::AccessFlags::X_OK).is_err() {
|
||||
err!(format!("sendmail command at `{path:?}` isn't executable"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user