split proxmox-file-restore into its own crate
This also moves a couple of required utilities such as logrotate and some file descriptor methods to pbs-tools. Note that the logrotate usage and run-dir handling should be improved to work as a regular user as this *should* (IMHO) be a regular unprivileged command (including running qemu given the kvm privileges...) Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -497,7 +497,7 @@ impl TfaUserChallengeData {
|
||||
/// Load the user's current challenges with the intent to create a challenge (create the file
|
||||
/// if it does not exist), and keep a lock on the file.
|
||||
fn open(userid: &Userid) -> Result<Self, Error> {
|
||||
crate::tools::create_run_dir()?;
|
||||
crate::server::create_run_dir()?;
|
||||
let options = CreateOptions::new().perm(Mode::from_bits_truncate(0o0600));
|
||||
proxmox::tools::fs::create_path(CHALLENGE_DATA_PATH, Some(options.clone()), Some(options))
|
||||
.map_err(|err| {
|
||||
|
Reference in New Issue
Block a user