memorysafety / sudo-rs

A memory safe implementation of sudo and su.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sudoers/@include: fails to parse backslash inside quotes

japaric opened this issue · comments

relevant test

fn backslash_in_name_double_quotes() -> Result<()> {
let env = Env(r#"@include "/etc/sudo\ers" "#)
.file(r#"/etc/sudo\ers"#, SUDOERS_ALL_ALL_NOPASSWD)
.build()?;
Command::new("sudo")
.arg("true")
.output(&env)?
.assert_success()
}

the backslash does not need to be escaped when it appears inside double quotes