Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/153'
Browse files Browse the repository at this point in the history
* origin/pr/153:
  change restrip to rstrip
  Move rstrip before split
  remove trailing \x00 The trailing \x00 in the request header make the domain name as follow (domain\x00). Which cause a bug when listing domains using qubesadminapi. This bug occured when the icon-receiver is running on guivm other than dom0.
  Update guivm service name

Pull request description:

- Update `guivm-gui-agent` to `guivm`
- When the `icon-reciever` running on guivm other than dom0 the header received is as follow:
  Request coming from appvm to dom0
  ```
  service vm-name keyword adminvm\x00
  ```
  Request coming from appvm to guivm
  ```
  service vm-name\x00
  ```
  The trailing `\x00` cause a bug when trying to get the color of the vm using `qubesadminapi`.
  • Loading branch information
marmarek committed Nov 21, 2024
2 parents 2af808a + 8e3e502 commit ed101ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions window-icon-updater/icon-receiver
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ class IconReceiver(object):
try:
# Parse header from qrexec
header = await reader.readuntil(b'\0')
header_parts = header.decode('ascii').split(' ')
header_parts = header.decode('ascii').rstrip('\x00').split(' ')
assert len(header_parts) >= 2, header_parts

service_name = header_parts[0]
Expand Down Expand Up @@ -388,7 +388,7 @@ def main():
args = parser.parse_args()

if not args.force:
if (not os.path.exists('/var/run/qubes-service/guivm-gui-agent') and
if (not os.path.exists('/var/run/qubes-service/guivm') and
not os.path.exists('/etc/qubes-release')):

print('Not in GuiVM or dom0, exiting '
Expand Down

0 comments on commit ed101ff

Please sign in to comment.