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.
This commit is contained in:
commit
98a5ac269c
@ -14,12 +14,7 @@ pub struct Lock {
|
|||||||
|
|
||||||
impl Lock {
|
impl Lock {
|
||||||
pub fn new(p: &Path, wait: bool, create: bool, exclusive: bool) -> io::Result<Lock> {
|
pub fn new(p: &Path, wait: bool, create: bool, exclusive: bool) -> io::Result<Lock> {
|
||||||
let file = OpenOptions::new()
|
let file = OpenOptions::new().read(true).write(true).create(create).mode(0o600).open(p)?;
|
||||||
.read(true)
|
|
||||||
.write(true)
|
|
||||||
.create(create)
|
|
||||||
.mode(libc::S_IRWXU as u32)
|
|
||||||
.open(p)?;
|
|
||||||
|
|
||||||
let mut operation = if exclusive { libc::LOCK_EX } else { libc::LOCK_SH };
|
let mut operation = if exclusive { libc::LOCK_EX } else { libc::LOCK_SH };
|
||||||
if !wait {
|
if !wait {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user