-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.0.39] Fix: Hardening resolve script path
- Loading branch information
1 parent
0488c71
commit 52f3dda
Showing
3 changed files
with
17 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
This tool runs CLI scripts and displays output in a Web Interface. | ||
""" | ||
|
||
__version__ = "3.0.38" | ||
__version__ = "3.0.39" | ||
__author__ = "Maurice Lambert" | ||
__author_email__ = "[email protected]" | ||
__maintainer__ = "Maurice Lambert" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
This tool runs CLI scripts and displays output in a Web Interface. | ||
""" | ||
|
||
__version__ = "3.0.38" | ||
__version__ = "3.0.39" | ||
__author__ = "Maurice Lambert" | ||
__author_email__ = "[email protected]" | ||
__maintainer__ = "Maurice Lambert" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ | |
This file hardens the WebScripts installation and configuration. | ||
""" | ||
|
||
__version__ = "0.0.9" | ||
__version__ = "0.0.10" | ||
__author__ = "Maurice Lambert" | ||
__author_email__ = "[email protected]" | ||
__maintainer__ = "Maurice Lambert" | ||
|
@@ -323,26 +323,36 @@ def harden_script(self, section: dict, filename: str) -> None: | |
""" | ||
|
||
logger_info("Hardens script " + repr(filename)) | ||
logger_debug("Add the launcher") | ||
logger_debug(f"Add launcher {executable!r} for {filename!r}") | ||
section["launcher"] = executable | ||
specific_config_file = section.get("configuration_file") | ||
|
||
if specific_config_file: | ||
specific_config_file = basename(specific_config_file) | ||
|
||
script_name, _ = splitext(basename(filename)) | ||
logger_info(f"Configure script named: {script_name}") | ||
logger_info("Configure script named: " + repr(script_name)) | ||
for config_file in self.json_config_files: | ||
if config_file.endswith(specific_config_file): | ||
section["configuration_file"] = config_file | ||
self.get_configurations(config_file, filename) | ||
break | ||
else: | ||
logger_error( | ||
"Configuration file not found for " + repr(filename) | ||
) | ||
|
||
for py_filename in self.py_scripts_files: | ||
if py_filename.endswith(filename): | ||
logger_debug("Add the script absolute path.") | ||
py_basename = basename(py_filename) | ||
if py_basename == filename: | ||
logger_debug( | ||
"Add the script absolute path" | ||
f" {py_filename!r} for {filename!r}." | ||
) | ||
section["path"] = py_filename | ||
break | ||
else: | ||
logger_error("Script file not found for " + repr(filename)) | ||
|
||
def linux_hardening_file_permissions(self) -> None: | ||
""" | ||
|