fix configuration dir permission
Carefully set and check permissions ...
This commit is contained in:
@ -5,6 +5,7 @@ use proxmox_backup::api::router::*;
|
||||
use proxmox_backup::api::config::*;
|
||||
use proxmox_backup::server::rest::*;
|
||||
use proxmox_backup::auth_helpers::*;
|
||||
use proxmox_backup::config;
|
||||
|
||||
use failure::*;
|
||||
use lazy_static::lazy_static;
|
||||
@ -28,7 +29,9 @@ fn run() -> Result<(), Error> {
|
||||
log::LevelFilter::Info,
|
||||
Some("proxmox-backup-api")) {
|
||||
bail!("unable to inititialize syslog - {}", err);
|
||||
}
|
||||
}
|
||||
|
||||
config::create_configdir()?;
|
||||
|
||||
if let Err(err) = generate_auth_key() {
|
||||
bail!("unable to generate auth key - {}", err);
|
||||
|
@ -56,10 +56,7 @@ fn run() -> Result<(), Error> {
|
||||
let rest_server = RestServer::new(config);
|
||||
|
||||
let cert_path = configdir!("/proxy.pfx");
|
||||
let raw_cert = match tools::file_get_contents(cert_path) {
|
||||
Ok(data) => data,
|
||||
Err(err) => bail!("unable to read certificate {} - {}", cert_path, err),
|
||||
};
|
||||
let raw_cert = tools::file_get_contents(cert_path)?;
|
||||
|
||||
let identity = match native_tls::Identity::from_pkcs12(&raw_cert, "") {
|
||||
Ok(data) => data,
|
||||
|
Reference in New Issue
Block a user