split out pbs-buildcfg module
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
@ -15,8 +15,8 @@ use crate::api2::types::{
|
||||
};
|
||||
use crate::tools::ControlFlow;
|
||||
|
||||
pub(crate) const ACME_DIR: &str = configdir!("/acme");
|
||||
pub(crate) const ACME_ACCOUNT_DIR: &str = configdir!("/acme/accounts");
|
||||
pub(crate) const ACME_DIR: &str = pbs_buildcfg::configdir!("/acme");
|
||||
pub(crate) const ACME_ACCOUNT_DIR: &str = pbs_buildcfg::configdir!("/acme/accounts");
|
||||
|
||||
pub(crate) const ACME_DNS_SCHEMA_FN: &str = "/usr/share/proxmox-acme/dns-challenge-schema.json";
|
||||
|
||||
|
@ -140,8 +140,8 @@ fn init() -> SectionConfig {
|
||||
config
|
||||
}
|
||||
|
||||
const ACME_PLUGIN_CFG_FILENAME: &str = configdir!("/acme/plugins.cfg");
|
||||
const ACME_PLUGIN_CFG_LOCKFILE: &str = configdir!("/acme/.plugins.lck");
|
||||
const ACME_PLUGIN_CFG_FILENAME: &str = pbs_buildcfg::configdir!("/acme/plugins.cfg");
|
||||
const ACME_PLUGIN_CFG_LOCKFILE: &str = pbs_buildcfg::configdir!("/acme/.plugins.lck");
|
||||
const LOCK_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(10);
|
||||
|
||||
pub fn lock() -> Result<std::fs::File, Error> {
|
||||
|
@ -12,6 +12,8 @@ use proxmox::tools::fs::{replace_file, CreateOptions};
|
||||
|
||||
use proxmox_http::ProxyConfig;
|
||||
|
||||
use pbs_buildcfg::configdir;
|
||||
|
||||
use crate::acme::AcmeClient;
|
||||
use crate::api2::types::{
|
||||
AcmeAccountName, AcmeDomain, ACME_DOMAIN_PROPERTY_SCHEMA, HTTP_PROXY_SCHEMA,
|
||||
|
@ -26,6 +26,8 @@ use proxmox::tools::tfa::u2f;
|
||||
use proxmox::tools::uuid::Uuid;
|
||||
use proxmox::tools::AsHex;
|
||||
|
||||
use pbs_buildcfg::configdir;
|
||||
|
||||
use crate::api2::types::Userid;
|
||||
|
||||
/// Mapping of userid to TFA entry.
|
||||
@ -35,7 +37,7 @@ const CONF_FILE: &str = configdir!("/tfa.json");
|
||||
const LOCK_FILE: &str = configdir!("/tfa.json.lock");
|
||||
const LOCK_TIMEOUT: Duration = Duration::from_secs(5);
|
||||
|
||||
const CHALLENGE_DATA_PATH: &str = rundir!("/tfa/challenges");
|
||||
const CHALLENGE_DATA_PATH: &str = pbs_buildcfg::rundir!("/tfa/challenges");
|
||||
|
||||
/// U2F registration challenges time out after 2 minutes.
|
||||
const CHALLENGE_TIMEOUT: i64 = 2 * 60;
|
||||
|
@ -10,8 +10,8 @@ use proxmox::tools::fs::{open_file_locked, CreateOptions};
|
||||
use crate::api2::types::Authid;
|
||||
use crate::auth;
|
||||
|
||||
const LOCK_FILE: &str = configdir!("/token.shadow.lock");
|
||||
const CONF_FILE: &str = configdir!("/token.shadow");
|
||||
const LOCK_FILE: &str = pbs_buildcfg::configdir!("/token.shadow.lock");
|
||||
const CONF_FILE: &str = pbs_buildcfg::configdir!("/token.shadow");
|
||||
const LOCK_TIMEOUT: Duration = Duration::from_secs(5);
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
|
Reference in New Issue
Block a user