Profile session token should only be readable by the user (#130)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@@ -1527,6 +1527,7 @@ dependencies = [
|
|||||||
"html5ever",
|
"html5ever",
|
||||||
"image",
|
"image",
|
||||||
"lazy_static 1.4.0",
|
"lazy_static 1.4.0",
|
||||||
|
"libc",
|
||||||
"mandown",
|
"mandown",
|
||||||
"markup5ever_rcdom",
|
"markup5ever_rcdom",
|
||||||
"matrix-sdk",
|
"matrix-sdk",
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ futures = "0.3"
|
|||||||
gethostname = "0.4.1"
|
gethostname = "0.4.1"
|
||||||
html5ever = "0.26.0"
|
html5ever = "0.26.0"
|
||||||
image = "0.24.5"
|
image = "0.24.5"
|
||||||
|
libc = "0.2"
|
||||||
markup5ever_rcdom = "0.2.0"
|
markup5ever_rcdom = "0.2.0"
|
||||||
mime = "^0.3.16"
|
mime = "^0.3.16"
|
||||||
mime_guess = "^2.0.4"
|
mime_guess = "^2.0.4"
|
||||||
|
|||||||
@@ -694,6 +694,12 @@ fn main() -> IambResult<()> {
|
|||||||
// Load configuration and set up the Matrix SDK.
|
// Load configuration and set up the Matrix SDK.
|
||||||
let settings = ApplicationSettings::load(iamb).unwrap_or_else(print_exit);
|
let settings = ApplicationSettings::load(iamb).unwrap_or_else(print_exit);
|
||||||
|
|
||||||
|
// Set umask on Unix platforms so that tokens, keys, etc. are only readable by the user.
|
||||||
|
#[cfg(unix)]
|
||||||
|
unsafe {
|
||||||
|
libc::umask(0o077);
|
||||||
|
};
|
||||||
|
|
||||||
// Set up the tracing subscriber so we can log client messages.
|
// Set up the tracing subscriber so we can log client messages.
|
||||||
let log_prefix = format!("iamb-log-{}", settings.profile_name);
|
let log_prefix = format!("iamb-log-{}", settings.profile_name);
|
||||||
let log_dir = settings.dirs.logs.as_path();
|
let log_dir = settings.dirs.logs.as_path();
|
||||||
|
|||||||
Reference in New Issue
Block a user