Skip to content

Commit

Permalink
v1.0.1 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
jabbate19 committed Oct 28, 2022
1 parent 506f2d3 commit 357829a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "steeloxide"
version = "1.0.0"
version = "1.0.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
14 changes: 4 additions & 10 deletions src/freebsd/revive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,22 +138,16 @@ pub fn main(cmd: &ArgMatches) -> Result<(), Box<dyn std::error::Error>> {
let file_path = cmd.get_one::<String>("config").unwrap_or(&default_path);
let file = File::open(&file_path)?;
let reader = BufReader::new(file);
let config: PfConfig = match reader.map(|r| serde_json::from_reader(r)) {
Ok(x) => match x {
Ok(y) => y,
Err(_) => {
error!("Could not setup config! Moving to setup...");
return Ok(setup::main().unwrap());
}
},
let config: PfConfig = match serde_json::from_reader(reader) {
Ok(x) => x,
Err(_) => {
error!("Could not setup config! Moving to setup...");
return Ok(setup::main().unwrap());
return setup::main();
}
};
if !verify_config((&file_path).to_string()) {
warn!("Config found to be invalid! Moving to setup...");
return setup::main().unwrap();
return setup::main();
}
check_firewall(&config);
audit_users(&config);
Expand Down
6 changes: 3 additions & 3 deletions src/linux/revive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,17 +227,17 @@ pub fn main(cmd: &ArgMatches) -> Result<(), Box<dyn std::error::Error>> {
Ok(y) => y,
Err(_) => {
error!("Could not setup config! Moving to setup...");
return Ok(setup::main().unwrap());
return setup::main();
}
},
Err(_) => {
error!("Could not setup config! Moving to setup...");
return Ok(setup::main().unwrap());
return setup::main();
}
};
if !verify_config((&file_path).to_string()) {
warn!("Config found to be invalid! Moving to setup...");
return Ok(setup::main().unwrap());
return setup::main();
}
check_firewall(&config);
audit_users(&config);
Expand Down
14 changes: 4 additions & 10 deletions src/windows/revive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -366,22 +366,16 @@ pub fn main(cmd: &ArgMatches) -> Result<(), Box<dyn std::error::Error>> {
let file_path = cmd.get_one::<String>("config").unwrap_or(&default_path);
let file = File::open(&file_path)?;
let reader = BufReader::new(file);
let config: SysConfig = match reader.map(|r| serde_json::from_reader(r)) {
Ok(x) => match x {
Ok(y) => y,
Err(_) => {
error!("Could not setup config! Moving to setup...");
return Ok(setup::main().unwrap());
}
},
let config: SysConfig = match serde_json::from_reader(reader) {
Ok(x) => x,
Err(_) => {
error!("Could not setup config! Moving to setup...");
return Ok(setup::main().unwrap());
return setup::main();
}
};
if !verify_config((&file_path).to_string()) {
warn!("Config found to be invalid! Moving to setup...");
return setup::main().unwrap();
return setup::main();
}
check_firewall(&config);
//let password = prompt_password("Enter password for valid users: ").unwrap();
Expand Down

0 comments on commit 357829a

Please sign in to comment.