Skip to content

Commit d9b2427

Browse files
committed
credit to bjorn3: fix the permission flags that visudo sets
1 parent c3f4de3 commit d9b2427

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/visudo/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ fn run(file_arg: Option<&str>, perms: bool, owner: bool) -> io::Result<()> {
226226
.truncate(true)
227227
.open(&tmp_path)?;
228228

229-
tmp_file.set_permissions(Permissions::from_mode(0o700))?;
229+
tmp_file.set_permissions(Permissions::from_mode(0o600))?;
230230

231231
let result = edit_sudoers_file(
232232
existed,

0 commit comments

Comments
 (0)