Skip to content

Commit 98a5ac2

Browse files
committed
Auto merge of #102543 - daym:patch-1, r=joshtriplett
Remove "execute" bit from lock file permissions Previously, flock would set the "execute" bit on Rust lock files. That makes no sense. This patch clears the "execute" bit on Rust lock files. See issue #102531.
2 parents 194140b + e07e510 commit 98a5ac2

File tree

1 file changed

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

1 file changed

+1
-6
lines changed

Diff for: 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)