diff --git a/qrexec/tests/qrexec_policy_daemon.py b/qrexec/tests/qrexec_policy_daemon.py index 502b09fd..874999ef 100644 --- a/qrexec/tests/qrexec_policy_daemon.py +++ b/qrexec/tests/qrexec_policy_daemon.py @@ -83,7 +83,7 @@ async def test_simple_request(self, mock_request, async_server, tmp_path): domain_id='a', source='b', intended_target='c', service_and_arg='d', process_ident='1 9', log=unittest.mock.ANY, policy_cache=unittest.mock.ANY, - allow_resolution_type=qrexec_policy_daemon.DaemonResolution, + allow_resolution_type=qrexec_policy_daemon.DaemonAllowResolution, origin_writer=unittest.mock.ANY) @pytest.mark.asyncio @@ -104,7 +104,7 @@ async def test_complex_request(self, mock_request, async_server, tmp_path): service_and_arg='d', process_ident='9', log=unittest.mock.ANY, assume_yes_for_ask=True, just_evaluate=True, policy_cache=unittest.mock.ANY, - allow_resolution_type=qrexec_policy_daemon.DaemonResolution, + allow_resolution_type=qrexec_policy_daemon.DaemonAllowResolution, origin_writer=unittest.mock.ANY) @pytest.mark.asyncio @@ -125,7 +125,7 @@ async def test_complex_request2(self, mock_request, async_server, tmp_path): service_and_arg='d', process_ident='9', log=unittest.mock.ANY, assume_yes_for_ask=False, just_evaluate=False, policy_cache=unittest.mock.ANY, - allow_resolution_type=qrexec_policy_daemon.DaemonResolution, + allow_resolution_type=qrexec_policy_daemon.DaemonAllowResolution, origin_writer=unittest.mock.ANY) @pytest.mark.asyncio @@ -176,7 +176,7 @@ async def test_duplicate_arg(self, mock_request, async_server, tmp_path): @pytest.mark.asyncio async def test_wrong_arg(self, mock_request, async_server, tmp_path): - data = b'domains_id=a\n' \ + data = b'tremendous_domain_id=a\n' \ b'source=b\n' \ b'intended_target=c\n' \ b'service_and_arg=d\n' \ diff --git a/qrexec/tools/qrexec_policy_daemon.py b/qrexec/tools/qrexec_policy_daemon.py index dc42a74c..49afdbd6 100644 --- a/qrexec/tools/qrexec_policy_daemon.py +++ b/qrexec/tools/qrexec_policy_daemon.py @@ -48,7 +48,7 @@ OPTIONAL_REQUEST_ARGUMENTS -class DaemonResolution(AllowResolution): +class DaemonAllowResolution(AllowResolution): async def execute(self, caller_ident): log_prefix = 'qrexec: {request.service}+{request.argument}: ' \ @@ -62,7 +62,7 @@ async def execute(self, caller_ident): self.request.origin_writer.write(b"result=allow\n") await self.request.origin_writer.drain() - await super(DaemonResolution, self).execute(caller_ident) + await super(DaemonAllowResolution, self).execute(caller_ident) async def handle_client_connection(log, policy_cache, @@ -108,7 +108,7 @@ async def handle_client_connection(log, policy_cache, 'error parsing policy request: required argument missing') return - resolution_handler = DaemonResolution + resolution_handler = DaemonAllowResolution result = await handle_request(**args, log=log, allow_resolution_type=resolution_handler,