pathpatterns = "0.1.2"
pxar = { version = "0.10.1", features = [ "tokio-io" ] }
-proxmox = { version = "0.15.0", features = [ "sortable-macro" ] }
+proxmox = { version = "0.15.3", features = [ "sortable-macro" ] }
proxmox-http = { version = "0.5.4", features = [ "client", "http-helpers", "websocket" ] }
proxmox-io = "1"
proxmox-lang = "1"
regex = "1.2"
serde = { version = "1.0", features = ["derive"] }
-proxmox = "0.15.0"
+proxmox = "0.15.3"
proxmox-lang = "1.0.0"
proxmox-schema = { version = "1.0.1", features = [ "api-macro" ] }
proxmox-time = "1.1"
xdg = "2.2"
pathpatterns = "0.1.2"
-proxmox = "0.15.0"
+proxmox = "0.15.3"
proxmox-fuse = "0.1.1"
proxmox-http = { version = "0.5.4", features = [ "client", "http-helpers", "websocket" ] }
proxmox-io = { version = "1", features = [ "tokio" ] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
-proxmox = "0.15.0"
+proxmox = "0.15.3"
proxmox-lang = "1"
proxmox-router = { version = "1.1", default-features = false }
proxmox-schema = "1"
pathpatterns = "0.1.2"
pxar = "0.10.1"
-proxmox = "0.15.0"
+proxmox = "0.15.3"
proxmox-borrow = "1"
proxmox-io = "1"
proxmox-lang = "1"
regex = "1.2"
udev = "0.4"
-proxmox = "0.15.0"
+proxmox = "0.15.3"
proxmox-io = "1"
proxmox-lang = "1"
# api-macro is only used by the binaries, so maybe we should split them out
walkdir = "2"
zstd = { version = "0.6", features = [ "bindgen" ] }
-proxmox = { version = "0.15.0", default-features = false, features = [ "tokio" ] }
+proxmox = { version = "0.15.3", default-features = false, features = [ "tokio" ] }
proxmox-borrow = "1"
proxmox-io = { version = "1", features = [ "tokio" ] }
proxmox-lang = { version = "1" }
+++ /dev/null
-//! Raw file descriptor related utilities.
-
-use std::os::unix::io::RawFd;
-
-use anyhow::Error;
-use nix::fcntl::{fcntl, FdFlag, F_GETFD, F_SETFD};
-
-/// Change the `O_CLOEXEC` flag of an existing file descriptor.
-pub fn fd_change_cloexec(fd: RawFd, on: bool) -> Result<(), Error> {
- let mut flags = unsafe { FdFlag::from_bits_unchecked(fcntl(fd, F_GETFD)?) };
- flags.set(FdFlag::FD_CLOEXEC, on);
- fcntl(fd, F_SETFD(flags))?;
- Ok(())
-}
pub mod crypt;
pub mod crypt_config;
pub mod format;
-pub mod fd;
pub mod fs;
pub mod io;
pub mod json;
pathpatterns = "0.1.2"
pxar = { version = "0.10.1", features = [ "tokio-io" ] }
-proxmox = { version = "0.15.0", features = [ "sortable-macro" ] }
+proxmox = { version = "0.15.3", features = [ "sortable-macro" ] }
proxmox-router = { version = "1.1", features = [ "cli" ] }
proxmox-schema = { version = "1", features = [ "api-macro" ] }
proxmox-time = "1"
pxar = { version = "0.10.1", features = [ "tokio-io" ] }
-proxmox = { version = "0.15.0" }
+proxmox = { version = "0.15.3" }
proxmox-lang = "1"
proxmox-router = { version = "1.1", features = [ "cli" ] }
proxmox-schema = { version = "1", features = [ "api-macro" ] }
use nix::unistd::Pid;
use proxmox::tools::fs::{create_path, file_read_string, make_tmp_file, CreateOptions};
+use proxmox::tools::fd::fd_change_cloexec;
use pbs_client::{VsockClient, DEFAULT_VSOCK_PORT};
let (tmp_file, tmp_path) =
make_tmp_file("/tmp/file-restore-qemu.initramfs.tmp", CreateOptions::new())?;
nix::unistd::unlink(&tmp_path)?;
- pbs_tools::fd::fd_change_cloexec(tmp_file.as_raw_fd(), false)?;
+ fd_change_cloexec(tmp_file.as_raw_fd(), false)?;
let initramfs = if debug {
pbs_buildcfg::PROXMOX_BACKUP_INITRAMFS_DBG_FN
let pid;
let (mut pid_file, pid_path) = make_tmp_file("/tmp/file-restore-qemu.pid.tmp", CreateOptions::new())?;
nix::unistd::unlink(&pid_path)?;
- pbs_tools::fd::fd_change_cloexec(pid_file.as_raw_fd(), false)?;
+ fd_change_cloexec(pid_file.as_raw_fd(), false)?;
let (_ramfs_pid, ramfs_path) = create_temp_initramfs(ticket, debug).await?;
.append(true)
.create_new(true)
.open(logfile)?;
- pbs_tools::fd::fd_change_cloexec(logfd.as_raw_fd(), false)?;
+ fd_change_cloexec(logfd.as_raw_fd(), false)?;
// preface log file with start timestamp so one can see how long QEMU took to start
writeln!(logfd, "[{}] PBS file restore VM log", {
tower-service = "0.3.0"
url = "2.1"
-proxmox = "0.15.0"
+proxmox = "0.15.3"
proxmox-io = "1"
proxmox-lang = "1"
proxmox-http = { version = "0.5.0", features = [ "client" ] }
use futures::future::{self, Either};
use nix::unistd::{fork, ForkResult};
-use proxmox::tools::fd::Fd;
+use proxmox::tools::fd::{fd_change_cloexec, Fd};
use proxmox_io::{ReadExt, WriteExt};
-use pbs_tools::fd::fd_change_cloexec;
-
// Unfortunately FnBox is nightly-only and Box<FnOnce> is unusable, so just use Box<Fn>...
type BoxedStoreFunc = Box<dyn FnMut() -> Result<String, Error> + UnwindSafe + Send>;
pathpatterns = "0.1.2"
pxar = { version = "0.10.1", features = [ "tokio-io" ] }
-proxmox = { version = "0.15.0", features = [ "sortable-macro" ] }
+proxmox = { version = "0.15.3", features = [ "sortable-macro" ] }
proxmox-router = { version = "1.1", features = [ "cli" ] }
proxmox-schema = { version = "1", features = [ "api-macro" ] }
proxmox-time = "1"
serde_json = "1.0"
serde_cbor = "0.11.1"
-proxmox = { version = "0.15.0" }
+proxmox = { version = "0.15.3" }
proxmox-time = "1"
proxmox-schema = { version = "1", features = [ "api-macro" ] }
tokio = { version = "1.6", features = [ "rt", "rt-multi-thread" ] }
pathpatterns = "0.1.2"
-proxmox = "0.15.0"
+proxmox = "0.15.3"
proxmox-schema = { version = "1", features = [ "api-macro" ] }
proxmox-router = "1.1"
pxar = { version = "0.10.1", features = [ "tokio-io" ] }
use tokio::io::{AsyncBufReadExt, BufReader};
use proxmox::{identity, sortable};
+use proxmox::tools::fd::fd_change_cloexec;
+
use proxmox_router::{
ApiHandler, ApiMethod, ApiResponseFuture, Permission, RpcEnvironment, Router, SubdirMap,
};
move |worker| async move {
// move inside the worker so that it survives and does not close the port
// remove CLOEXEC from listenere so that we can reuse it in termproxy
- pbs_tools::fd::fd_change_cloexec(listener.as_raw_fd(), false)?;
+ fd_change_cloexec(listener.as_raw_fd(), false)?;
let mut arguments: Vec<&str> = Vec::new();
let fd_string = listener.as_raw_fd().to_string();