mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 13:49: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
|
@ -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