Commit Graph

443 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
eb12a8cfc6
version 3.2.12 2017-03-13 03:32:25 +01:00
Marek Marczykowski-Górecki
dad208a0d5
qrexec: fix pending requests cleanup code
There was a logic error in pending requests cleanup code, causing
policy_pending_max being set to 0, even if there were more pending
requests. This effectively limited maximum pending requests to 1, after
some system uptime, because policy_pending_max set to 0 makes the code
looks only at the first pending request slot.

While at it, remove outdated FIXME comment, actually this bug is in the
code implementing this FIXME.

Fixes QubesOS/qubes-issues#2699
2017-03-13 03:17:27 +01:00
Marek Marczykowski-Górecki
723d32b8b7
qrexec: fix pending requests cleanup code
There was a logic error in pending requests cleanup code, causing
policy_pending_max being set to 0, even if there were more pending
requests. This effectively limited maximum pending requests to 1, after
some system uptime, because policy_pending_max set to 0 makes the code
looks only at the first pending request slot.

While at it, remove outdated FIXME comment, actually this bug is in the
code implementing this FIXME.

Fixes QubesOS/qubes-issues#2699
2017-03-13 03:16:34 +01:00
tasket
05b57f4960 Merge pull request #4 from QubesOS/master
Update from original
2017-03-07 02:15:00 -05:00
Marek Marczykowski-Górecki
452b6c4ae2
dom0-updates: code style fixes 2017-02-27 00:15:40 +01:00
Marek Marczykowski-Górecki
514c27d681
dom0-updates: update qubes-receive-updates to python3 2017-02-27 00:15:39 +01:00
Marek Marczykowski-Górecki
b253fdba33
qrexec: update qrexec-policy to python3 2017-02-22 12:14:50 +01:00
Marek Marczykowski-Górecki
b370eea13c
travis: drop debootstrap workaround
Move to qubes-builder

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
2017-01-10 12:15:47 +01:00
Marek Marczykowski-Górecki
4f0878ccbf
version 3.2.11 2016-12-06 01:55:11 +01:00
Marek Marczykowski-Górecki
97c13e15f0
travis: remove debootstrap workaround
Moved to qubes-builder
2016-12-06 01:55:06 +01:00
Rusty Bird
4d18800bc0
v2: (dom0) qvm-move-to-vm: don't "rm -rf" vm name argument
Fixes QubesOS/qubes-issues#2472 from commit
bc29af7c0c
2016-12-04 16:52:18 +00:00
Jean-Philippe Ouellet
c6e1f0536c
Move qvm-xkill to new tools/ dir 2016-11-28 03:56:45 -05:00
Jean-Philippe Ouellet
e59c863c23
Fix a typo
Thanks rustybird for catching it.
2016-11-26 23:50:47 -05:00
Jean-Philippe Ouellet
be1d984364
Mitigate GUI DoS (part 2: qvm-xkill)
Can close windows of a VM while it's paused, and can not accidentally
harm dom0 by errant clicking.

Discussion in https://github.com/QubesOS/qubes-issues/issues/881

Thanks to rustybird for suggested implementation.
2016-11-26 21:59:16 -05:00
Marek Marczykowski-Górecki
73ba5f805b
version 3.2.10 2016-11-18 03:17:29 +01:00
Marek Marczykowski-Górecki
981a11cee1
qrexec: really do not match 'dom0' at '$anyvm', as documented
Design documentation says:
'note string dom0 does not match the $anyvm pattern; all other names do'

This behaviour was broken, because 'is not' in python isn't the same as
string comparison. In theory this could result in some service
erroneously allowed to execute in dom0, but in practice such services are
not installed in dom0 at all, so the only impact was misleading error
message.

Fixes QubesOS/qubes-issues#2031
Reported by @Jeeppler
2016-11-18 02:51:25 +01:00
Jean-Philippe Ouellet
9b7667c3a5
Ignore EFI boot args when parsing for filename
I need to set some flags in order to boot as described here:
https://www.qubes-os.org/doc/uefi-troubleshooting/

My settings look like this:
    $ efibootmgr -v
    BootCurrent: 0000
    Boot0000* Qubes HD(...)/File(\EFI\qubes\xen.efi)p.l.a.c.e.h.o...

which causes awk to get confused and think my $EFI_DIR should be:
    /EFI/qubesp.l.a.c.e.h.o.l.d.e.r. ./.m.a.p.b.s. ./.n.o.e.x.i.t.b.o.o.t.

This causes the script to later bail:
    if [ ! -d "$EFI_DIR" ]; then
        # non-EFI system
        exit 0;
    fi

So my xen.cfg did not get new entries when installing dom0 kernel packages.
2016-11-11 16:22:23 -05:00
Marek Marczykowski-Górecki
c73dcd2786
Merge remote-tracking branch 'qubesos/pr/12'
* qubesos/pr/12:
  Keep Makefile DRY
2016-11-11 14:24:48 +01:00
Jean-Philippe Ouellet
e24f3535ff
Keep Makefile DRY 2016-11-10 06:42:39 -05:00
Marek Marczykowski-Górecki
4efedd2951
appmenus: retrieve appmenus during template installation
Hardcoded call to qvm-sync-appmenus in template post-install is no
longer used, handle appropriate event.

QubesOS/qubes-issues#2412
2016-11-02 23:29:55 +01:00
Marek Marczykowski-Górecki
90b18a1ec1
appmenus: add qvm-sync-appmenus --regenerate-only
This is especially useful when something goes wrong (like accidentally
removing entries).
2016-11-02 23:27:06 +01:00
Marek Marczykowski-Górecki
ef47bda417
appmenus: add few docstrings 2016-11-02 23:26:11 +01:00
Marek Marczykowski-Górecki
85b509cedc
appmenus: fix handling VM name on command line
QubesOS/qubes-issues#2412
2016-11-02 06:36:09 +01:00
Marek Marczykowski-Górecki
35d32aa3d7
version 3.2.9 2016-10-31 14:18:21 +01:00
Marek Marczykowski-Górecki
610902a5c1
Revert "qrexec: fix "yes to all" for qrexec calls with custom argument"
Do not copy policy file at arbitrary time.
This reverts commit 1dff6361b7.
2016-10-31 14:17:54 +01:00
Marek Marczykowski-Górecki
c15841c828
version 3.2.8 2016-10-30 21:32:21 +01:00
Marek Marczykowski-Górecki
1dff6361b7
qrexec: fix "yes to all" for qrexec calls with custom argument
If argument-specific policy file do not exists, create one based on
generic one.

Fixes QubesOS/qubes-issues#2403
Reported by @Rudd-O
2016-10-28 13:28:04 +02:00
Marek Marczykowski-Górecki
2768b22494
version 3.2.7 2016-10-03 11:50:07 +02:00
Marek Marczykowski-Górecki
875866c3c0
Merge remote-tracking branch 'qubesos/pr/11'
* qubesos/pr/11:
  qubes-dom0-update: Show sync and download progress
2016-10-03 11:49:43 +02:00
Marek Marczykowski-Górecki
34ed18527b
Merge branch 'bug1676'
* bug1676:
  install-kernel: handle custom EFI directory
2016-10-03 11:48:19 +02:00
Rusty Bird
be30203d81
qubes-dom0-update: Show sync and download progress
Use "script" (part of util-linux) to fake a dumb terminal in the
updatevm, so dnf will show sync and download progress indicators.
2016-09-05 13:57:07 +00:00
Marek Marczykowski-Górecki
40b139ab82
qrexec-policy: fix handling special target VM names
Function validate_target should return either valid QubesVM object or
None in case of success. And throw an exception in case of failure.
2016-09-05 14:38:47 +02:00
Marek Marczykowski-Górecki
a513b33da3
appmenus: skip VMs without own directory
For example Dom0, or VM not created on disk (mostly while running
tests).
2016-09-05 14:38:46 +02:00
Marek Marczykowski-Górecki
a72d53ae1b
qrexec-policy: fix confirmation dialog call 2016-09-05 14:38:46 +02:00
Marek Marczykowski-Górecki
cce22c9517
qrexec-policy: new DispVM handling - $dispvm:DISP_VM keyword
Add support for `$dispvm:DISP_VM` syntax in target specification. At the
same time update the code for core3 API for handling DispVMs.

QubesOS/qubes-issues#2253
2016-09-05 14:38:46 +02:00
Marek Marczykowski-Górecki
009e2e6adb
qrexec-policy: prefer using VM objects
Pass VM object instead of just name - it will make extending much
easier. For example new DispVM handling.

QubesOS/qubes-issues#2253
2016-09-05 14:38:46 +02:00
Marek Marczykowski-Górecki
1cee27275e
version 3.2.6 2016-08-31 13:14:55 +02:00
Rusty Bird
c7ad14320f
qrexec-client: Also allow the bell character 2016-08-17 13:10:13 +00:00
Rusty Bird
e005836286
qrexec-client: Filter terminal output much more strictly
qrexec-client -t/-T (and therefore, qvm-run --pass-io) only handled the
escape character, \033. Everything else, such as Unicode and obscure
control characters, was passed through from the VM to the dom0 terminal.

Instead, replace all bytes except for a benign subset of ASCII. That's
still enough to allow progress bars to be drawn (tested using
"wget --progress=bar:force" and "pv --force").
2016-08-17 02:41:38 +02:00
Marek Marczykowski-Górecki
849b295384
qrexec: add option to wait for VM-VM connection termination
Normally when qrexec-client setup VM-VM connection it exits
immediatelly. But it may be useful to wait for the connection to
terminate - for example to cleanup DispVM.

qrexec-daemon (the one that allocated vchan port) do receive such
notification, so expose such option to qrexec-client.

QubesOS/qubes-issues#2253
2016-08-17 02:41:22 +02:00
Marek Marczykowski-Górecki
9192bb0d44
qrexec: don't call exit directly from qrexec-policy main
Use `return` instead. This makes possible to implement unit tests on
this function. And also makes static analysis a little happier.
2016-08-17 02:41:22 +02:00
Marek Marczykowski-Górecki
9a5bd57d1b
qrexec: switch to ArgumentParser in qrexec-policy 2016-08-17 02:41:22 +02:00
Marek Marczykowski-Górecki
8a780cb7f5
qrexec: reformat qrexec-policy
No functional change, just make it slightly less painful to read...
2016-08-16 02:58:04 +02:00
Marek Marczykowski-Górecki
92c3ba578a
appmenus: register event handlers on QubesVM, not BaseVM
It is critical to call rename-related events in the right order related
to those in QubesVM, because handler at QubesVM renames VM directory.

After "qubes/events: fix event handlers ordering" in qubes-core-admin it
is (again) possible to deterministically order event handler from
extension in relation to those from the class itself. But since ordering
on object class have higher priority (first from base class), those
handlers needs to be attached to the same class.
2016-08-15 23:53:11 +02:00
Marek Marczykowski-Górecki
da9205c78a
tests/appmenus: fix template cloning code
create_on_disk no longer handle cloning files.
2016-08-15 23:52:35 +02:00
Marek Marczykowski-Górecki
3abee97e13
appmenus: adjust for QubesArgumentParser API change 2016-08-15 23:52:13 +02:00
Marek Marczykowski-Górecki
86ef6906ad
appmenus: don't crash on VM without files on disk
Such VM can still trigger some appmenus-related action, for example
label change. This may happen during tests, or backup restore. And
probably some other cases.
2016-08-15 23:49:59 +02:00
Marek Marczykowski-Górecki
fe209dfd24
appmenus: clone default whitelists for VM type
Don't bother with checking whether it is a template or not - when
cloning VM disk files, copy those files anyway (if exist of course).
2016-08-08 14:38:50 +02:00
Marek Marczykowski-Górecki
daf1fd4759
systemd: enable xen-init-dom0.service
This is the right upstream service to init dom0 entries. Instead of our
own script.
2016-08-08 01:15:56 +02:00
Marek Marczykowski-Górecki
c34427e264
rpm: make sure /usr/bin/python (not /bin/python) is used
Otherwise rpm will fail to resolve dependencies (no package provides
/bin/python).
2016-08-08 00:51:50 +02:00