Skip to content

Commit

Permalink
relax fifo permission to fix runas
Browse files Browse the repository at this point in the history
Signed-off-by: usamoi <[email protected]>
  • Loading branch information
usamoi committed Nov 1, 2024
1 parent ba1fbc8 commit 2a62733
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pgrx-tests/src/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,12 @@ pub mod pipe {
rand::thread_rng().sample_iter(Alphanumeric).map(char::from).take(6).collect();
let path = format!(r"/tmp/{filename}");
let arg = CString::new(path.clone()).unwrap();
let mode = libc::S_IRUSR | libc::S_IRGRP | libc::S_IWUSR | libc::S_IWGRP;
let mode = libc::S_IRUSR
| libc::S_IWUSR
| libc::S_IRGRP
| libc::S_IWGRP
| libc::S_IROTH
| libc::S_IWOTH;
let errno = unsafe { libc::mkfifo(arg.as_ptr(), mode) };
if errno < 0 {
return Err(Error::last_os_error());
Expand Down

0 comments on commit 2a62733

Please sign in to comment.