Add ability to drop privileges after binding to port

This commit is contained in:
Tobias Reisinger 2023-11-27 17:36:44 +01:00
parent 3b596de06f
commit 7ed3a9e52d
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
7 changed files with 79 additions and 4 deletions
emgauwa-core/src

View file

@ -14,9 +14,14 @@ pub struct Logging {
#[allow(unused)]
pub struct Settings {
pub database: String,
pub port: u16,
pub host: String,
pub port: u16,
pub origins: Vec<String>,
pub user: String,
pub group: String,
pub logging: Logging,
}
@ -24,9 +29,14 @@ impl Default for Settings {
fn default() -> Self {
Settings {
database: String::from("sqlite://emgauwa-core.sqlite"),
port: constants::DEFAULT_PORT,
host: String::from("127.0.0.1"),
port: constants::DEFAULT_PORT,
origins: Vec::new(),
user: String::from(""),
group: String::from(""),
logging: Logging::default(),
}
}