Skip to content

Commit

Permalink
fix: universal SDDL #7 from bennjii/dev
Browse files Browse the repository at this point in the history
fix: universal SDDL
  • Loading branch information
bennjii authored May 23, 2022
2 parents 23b1ce5 + fd01612 commit 1151c8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
windows_subsystem = "windows"
)]

use std::fs::File;
use std::path::PathBuf;
use std::process::{Command, Stdio};
use std::fs;
Expand Down Expand Up @@ -217,9 +216,9 @@ fn main() {
format!("[Interface]\nAddress = 10.0.0.0/24\nDNS = 1.1.1.1\nListenPort = 51820\nPrivateKey = {}", private_key)
);

// let mut perms = fs::metadata(format!("{}\\lib\\wg0.conf", &apath.display()))?.permissions();
// perms.set_readonly(false);
// fs::set_permissions(format!("{}\\lib\\wg0.conf", &apath.display()), perms)?;
let mut perms = fs::metadata(format!("{}\\lib\\wg0.conf", &apath.display()))?.permissions();
perms.set_readonly(false);
fs::set_permissions(format!("{}\\lib\\wg0.conf", &apath.display()), perms)?;

write_text_file(
&apath,
Expand Down Expand Up @@ -249,7 +248,8 @@ fn main() {
let service_perms = runas::Command::new("sc.exe")
.arg("sdset")
.arg("WireGuardTunnel$wg0")
.arg("D:AR(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;RPWPDTRC;;;BU)S:AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)")
.arg("\"D:AR(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWRPWPDTLOCRRC;;;WD)(A;;CCLCSWLOCRRC;;;IU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)\"")
// .arg("D:AR(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;RPWPDTRC;;;BU)S:AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)")
.status();

match service_perms {
Expand Down
4 changes: 2 additions & 2 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"package": {
"productName": "reseda",
"version": "0.1.0"
"version": "0.1.1"
},
"build": {
"distDir": "../out",
Expand All @@ -14,7 +14,7 @@
"bundle": {
"active": true,
"targets": "all",
"identifier": "com.tauri.dev",
"identifier": "com.reseda.release",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
Expand Down

0 comments on commit 1151c8f

Please sign in to comment.