mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-24 07:46:03 +00:00
Remove unnecessary integer suffix
This commit is contained in:
parent
c0cff1da58
commit
b669b9de22
1 changed files with 2 additions and 2 deletions
|
@ -173,7 +173,7 @@ impl Setup {
|
|||
let fd = nix::fcntl::open(
|
||||
"/tmp/tun2proxy-resolv.conf",
|
||||
nix::fcntl::OFlag::O_RDWR | nix::fcntl::OFlag::O_CLOEXEC | nix::fcntl::OFlag::O_CREAT,
|
||||
nix::sys::stat::Mode::from_bits(0o644_u32).unwrap(),
|
||||
nix::sys::stat::Mode::from_bits(0o644).unwrap(),
|
||||
)?;
|
||||
let data = "nameserver 198.18.0.1\n".as_bytes();
|
||||
let mut written = 0;
|
||||
|
@ -183,7 +183,7 @@ impl Setup {
|
|||
}
|
||||
written += nix::unistd::write(fd, &data[written..])?;
|
||||
}
|
||||
nix::sys::stat::fchmod(fd, nix::sys::stat::Mode::from_bits(0o444_u32).unwrap())?;
|
||||
nix::sys::stat::fchmod(fd, nix::sys::stat::Mode::from_bits(0o444).unwrap())?;
|
||||
let source = format!("/proc/self/fd/{}", fd);
|
||||
nix::mount::mount(
|
||||
source.as_str().into(),
|
||||
|
|
Loading…
Add table
Reference in a new issue