Skip to content

Commit e07e510

Browse files
author
Danny Milosavljevic
committed
Remove execute bit from lock file permissions
1 parent 8ce3204 commit e07e510

File tree

1 file changed

+1
-6
lines changed
  • compiler/rustc_data_structures/src/flock

1 file changed

+1
-6
lines changed

compiler/rustc_data_structures/src/flock/linux.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ pub struct Lock {
1414

1515
impl Lock {
1616
pub fn new(p: &Path, wait: bool, create: bool, exclusive: bool) -> io::Result<Lock> {
17-
let file = OpenOptions::new()
18-
.read(true)
19-
.write(true)
20-
.create(create)
21-
.mode(libc::S_IRWXU as u32)
22-
.open(p)?;
17+
let file = OpenOptions::new().read(true).write(true).create(create).mode(0o600).open(p)?;
2318

2419
let mut operation = if exclusive { libc::LOCK_EX } else { libc::LOCK_SH };
2520
if !wait {

0 commit comments

Comments
 (0)