Refresh patches and debian/rules for new upstream release
Sophie Brun
5 years ago
0 | From 9ae0634e4b6c79ce8677a2188f609475f149a45a Mon Sep 17 00:00:00 2001 | |
1 | From: Brian Birkinbine <[email protected]> | |
2 | Date: Thu, 31 Jan 2019 01:10:54 -0500 | |
3 | Subject: [PATCH] added missing 'state_otp' value when creating 'faraday' | |
4 | application administrator account | |
5 | ||
6 | --- | |
7 | server/commands/initdb.py | 4 ++-- | |
8 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
9 | ||
10 | diff --git a/server/commands/initdb.py b/server/commands/initdb.py | |
11 | index 3ae379a5..e6398548 100644 | |
12 | --- a/server/commands/initdb.py | |
13 | +++ b/server/commands/initdb.py | |
14 | @@ -125,8 +125,8 @@ def _create_admin_user(self, conn_string, choose_password): | |
15 | already_created = False | |
16 | try: | |
17 | engine.execute("INSERT INTO \"faraday_user\" (username, name, password, " | |
18 | - "is_ldap, active, last_login_ip, current_login_ip, role) VALUES ('faraday', 'Administrator', " | |
19 | - "'{0}', false, true, '127.0.0.1', '127.0.0.1', 'admin');".format(random_password)) | |
20 | + "is_ldap, active, last_login_ip, current_login_ip, role, state_otp) VALUES ('faraday', 'Administrator', " | |
21 | + "'{0}', false, true, '127.0.0.1', '127.0.0.1', 'admin', 'disabled');".format(random_password)) | |
22 | except sqlalchemy.exc.IntegrityError: | |
23 | # when re using database user could be created previusly | |
24 | already_created = True | |
25 |
0 | From a0f831751f1a7ab366f8bc06d52d953a44f6ed8d Mon Sep 17 00:00:00 2001 | |
1 | From: Brian Birkinbine <[email protected]> | |
2 | Date: Thu, 31 Jan 2019 12:38:35 -0500 | |
3 | Subject: [PATCH] os.makedirs so that intermediate directories are created | |
4 | automatically | |
5 | ||
6 | --- | |
7 | server/api/modules/workspaces.py | 2 +- | |
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
9 | ||
10 | diff --git a/server/api/modules/workspaces.py b/server/api/modules/workspaces.py | |
11 | index 8802b7b3..2d65b6eb 100644 | |
12 | --- a/server/api/modules/workspaces.py | |
13 | +++ b/server/api/modules/workspaces.py | |
14 | @@ -189,7 +189,7 @@ def _createWorkspaceFolder(self, name): | |
15 | self._report_upath = os.path.join(self._report_path, "unprocessed") | |
16 | ||
17 | if not os.path.exists(self._report_path): | |
18 | - os.mkdir(self._report_path) | |
19 | + os.makedirs(self._report_path) | |
20 | ||
21 | if not os.path.exists(self._report_ppath): | |
22 | os.mkdir(self._report_ppath) | |
23 |
15 | 15 | +# from utils import dependencies |
16 | 16 | from utils.user_input import query_yes_no |
17 | 17 | from faraday import FARADAY_BASE |
18 | from alembic.script import ScriptDirectory | |
19 | @@ -35,31 +35,31 @@ def setup_environment(check_deps=False): | |
18 | from utils.logs import setUpLogger | |
19 | @@ -36,31 +36,31 @@ def setup_environment(check_deps=False): | |
20 | 20 | # Configuration files generation |
21 | 21 | server.config.copy_default_config_to_local() |
22 | 22 | |
68 | 68 | # Web configuration file generation |
69 | 69 | server.config.gen_web_config() |
70 | 70 | |
71 | @@ -152,7 +152,7 @@ def main(): | |
71 | @@ -153,7 +153,7 @@ def main(): | |
72 | 72 | parser.add_argument('--start', action='store_true', help='run Faraday Server in background') |
73 | 73 | parser.add_argument('--stop', action='store_true', help='stop Faraday Server') |
74 | 74 | parser.add_argument('--restart', action='store_true', help='Restart Faraday Server') |
77 | 77 | parser.add_argument('--no-setup', action='store_true', help=argparse.SUPPRESS) |
78 | 78 | parser.add_argument('--port', help='Overides server.ini port configuration') |
79 | 79 | parser.add_argument('--websocket_port', help='Overides server.ini websocket port configuration') |
80 | @@ -205,7 +205,7 @@ def main(): | |
80 | @@ -207,7 +207,7 @@ def main(): | |
81 | 81 | server.config.ssl.enabled = 'true' |
82 | 82 | |
83 | 83 | if not args.no_setup: |