mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
Profile session token should only be readable by the user (#130)
This commit is contained in:
parent
64891ec68f
commit
3da9835a17
3 changed files with 8 additions and 0 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -1527,6 +1527,7 @@ dependencies = [
|
|||
"html5ever",
|
||||
"image",
|
||||
"lazy_static 1.4.0",
|
||||
"libc",
|
||||
"mandown",
|
||||
"markup5ever_rcdom",
|
||||
"matrix-sdk",
|
||||
|
|
|
@ -35,6 +35,7 @@ futures = "0.3"
|
|||
gethostname = "0.4.1"
|
||||
html5ever = "0.26.0"
|
||||
image = "0.24.5"
|
||||
libc = "0.2"
|
||||
markup5ever_rcdom = "0.2.0"
|
||||
mime = "^0.3.16"
|
||||
mime_guess = "^2.0.4"
|
||||
|
|
|
@ -694,6 +694,12 @@ fn main() -> IambResult<()> {
|
|||
// Load configuration and set up the Matrix SDK.
|
||||
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.
|
||||
let log_prefix = format!("iamb-log-{}", settings.profile_name);
|
||||
let log_dir = settings.dirs.logs.as_path();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue