about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2022-10-01 03:50:05 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2022-10-17 21:10:46 +0200
commite07e5104fef572c879c5f0fff3584c92983b4006 (patch)
treea0c4fa93d47027558db44bd85791da1e4f3e1ed1
parent8ce3204af9463db3192ea1eb31c45c2f6d4b5ae6 (diff)
downloadrust-e07e5104fef572c879c5f0fff3584c92983b4006.tar.gz
rust-e07e5104fef572c879c5f0fff3584c92983b4006.zip
Remove execute bit from lock file permissions
-rw-r--r--compiler/rustc_data_structures/src/flock/linux.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/compiler/rustc_data_structures/src/flock/linux.rs b/compiler/rustc_data_structures/src/flock/linux.rs
index bb3ecfbc370..9ed26e49006 100644
--- a/compiler/rustc_data_structures/src/flock/linux.rs
+++ b/compiler/rustc_data_structures/src/flock/linux.rs
@@ -14,12 +14,7 @@ pub struct Lock {
 
 impl Lock {
     pub fn new(p: &Path, wait: bool, create: bool, exclusive: bool) -> io::Result<Lock> {
-        let file = OpenOptions::new()
-            .read(true)
-            .write(true)
-            .create(create)
-            .mode(libc::S_IRWXU as u32)
-            .open(p)?;
+        let file = OpenOptions::new().read(true).write(true).create(create).mode(0o600).open(p)?;
 
         let mut operation = if exclusive { libc::LOCK_EX } else { libc::LOCK_SH };
         if !wait {