]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_data_structures/src/flock/linux.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / compiler / rustc_data_structures / src / flock / linux.rs
index bb3ecfbc370c0b3bc0242259bd8191d785deb6a5..9ed26e4900696f4b48061d9585bedc61594e1828 100644 (file)
@@ -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 {