Skip to content

Commit 7e694d7

Browse files
committed
Log PermissionDenied and return exc to caller
1 parent b9290fc commit 7e694d7

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

qubes/api/__init__.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ async def respond(self, src, meth, dest, arg, *, untrusted_payload):
403403
if self.transport is None:
404404
return
405405

406-
except (PermissionDenied, ProtocolError) as untrusted_exc:
406+
except ProtocolError as untrusted_exc:
407407
exc_name = untrusted_exc.__class__.__name__
408408
self.app.log.warning(
409409
exc_fmt,
@@ -418,6 +418,20 @@ async def respond(self, src, meth, dest, arg, *, untrusted_payload):
418418
self.send_exception(untrusted_exc)
419419
self.transport.write_eof()
420420

421+
except PermissionDenied as exc:
422+
self.app.log.warning(
423+
exc_fmt,
424+
meth,
425+
arg,
426+
src,
427+
dest,
428+
len(untrusted_payload),
429+
exc_name,
430+
)
431+
if self.transport is not None:
432+
self.send_exception(exc)
433+
self.transport.write_eof()
434+
421435
except qubes.exc.QubesException as exc:
422436
if self.debug:
423437
self.app.log.debug(

0 commit comments

Comments
 (0)