Drop privileges before creating databases
This commit is contained in:
@@ -56,7 +56,11 @@ async fn main() -> std::io::Result<()> {
|
||||
)
|
||||
.failed("Failed to enable tracing");
|
||||
|
||||
// Bind ports and drop privileges
|
||||
let servers = config.parse_servers().failed("Invalid configuration");
|
||||
servers.bind(&config);
|
||||
|
||||
// Parse stores and directories
|
||||
let stores = config.parse_stores().await.failed("Invalid configuration");
|
||||
let directory = config
|
||||
.parse_directory(&stores, config.value("jmap.store.data"))
|
||||
@@ -71,9 +75,6 @@ async fn main() -> std::io::Result<()> {
|
||||
.await
|
||||
.failed("Invalid configuration");
|
||||
|
||||
// Bind ports and drop privileges
|
||||
servers.bind(&config);
|
||||
|
||||
// Init servers
|
||||
let (delivery_tx, delivery_rx) = mpsc::channel(IPC_CHANNEL_BUFFER);
|
||||
let smtp = SMTP::init(&config, &servers, &stores, &directory, delivery_tx)
|
||||
|
||||
Reference in New Issue
Block a user