mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
Restrict socket access
This commit is contained in:
parent
024bbc915e
commit
50d8d1a8c7
@ -34,3 +34,5 @@ Enable and start the service (otherwise you won't be able to change any settings
|
||||
sudo systemctl enable --now lactd
|
||||
```
|
||||
You can now use the application.
|
||||
|
||||
Note: only members of the group `wheel` can change settings.
|
@ -54,10 +54,16 @@ impl Daemon {
|
||||
let listener = UnixListener::bind(SOCK_PATH).unwrap();
|
||||
|
||||
Command::new("chmod")
|
||||
.arg("666")
|
||||
.arg("664")
|
||||
.arg(SOCK_PATH)
|
||||
.output()
|
||||
.expect("Failed to chmod");
|
||||
|
||||
Command::new("chown")
|
||||
.arg("nobody:wheel")
|
||||
.arg(SOCK_PATH)
|
||||
.output()
|
||||
.expect("Failed to chown");
|
||||
|
||||
let config_path = PathBuf::from("/etc/lact.json");
|
||||
let mut config = if unprivileged {
|
||||
|
Loading…
Reference in New Issue
Block a user