[pbs-devel] possible problem in get_user_run_dir()
Dietmar Maurer
dietmar at proxmox.com
Thu May 6 08:39:41 CEST 2021
The code get_user_run_dir() looks wrong, because a normal user does not have
permissions required for tools::create_run_dir().
Please can you take a look at that?
--- from src/bin/proxmox_client_tools/mod.rs---
pub fn get_user_run_dir() -> Result<std::path::PathBuf, Error> {
let uid = nix::unistd::Uid::current();
let mut path: std::path::PathBuf = buildcfg::PROXMOX_BACKUP_RUN_DIR.into();
path.push(uid.to_string());
tools::create_run_dir()?;
std::fs::create_dir_all(&path)?;
Ok(path)
}
More information about the pbs-devel
mailing list