Commit Graph

311 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
bc0d64b926
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

(cherry picked from commit 981a11cee1)
2016-11-19 02:26:30 +01:00
Rusty Bird
858c4c289a
qrexec-client: Also allow the bell character
(cherry picked from commit c7ad14320f)
2016-11-19 02:25:55 +01:00
Rusty Bird
16fc1fc489
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").

(cherry picked from commit e005836286)
2016-11-19 02:25:51 +01:00
Marek Marczykowski-Górecki
f5ad47b73f
version 3.1.12 2016-06-25 15:48:44 +02:00
Marek Marczykowski-Górecki
1591885e04
dom0-updates: whitespace fixes
(cherry picked from commit d9b37eec6c)
Fixes QubesOS/qubes-issues#2061
2016-06-25 15:42:28 +02:00
ttasket
4af2b02106
Fixes
Moved create private.img before yum.
Shutdown templatevm first -- don't want to query possibly compromised vm running old private.img.
Issue #2061
(cherry picked from commit fbb58918af)
2016-06-25 15:42:02 +02:00
ttasket
fbb90e3078
Re-create private.img if missing
This restores the netvm setting and also re-creates private.img if older rpm scriptlet doesn't create it.
Issue #2061
(cherry picked from commit ef1ab34234)
2016-06-25 15:42:01 +02:00
ttasket
7a14278a97
Try to handle private.img (fail)
mv and rm private.img like root.img, but this results in no private.img after reinstall.
do not use.
(cherry picked from commit 577944c8fb)
2016-06-25 15:42:01 +02:00
ttasket
428ff4e503
Fix syntax
@marmarek This works on my system.
(cherry picked from commit 457b275800)
2016-06-25 15:42:01 +02:00
ttasket
4563035b0c
Backup root.img
Just in case template %post scriptlet doesn't unlink during reinstall, or if reinstall fails.
Also preserves Netvm prefs setting.
(cherry picked from commit 32a4269f4a)
2016-06-25 15:42:00 +02:00
ttasket
cf6b475bcd
Update qubes-dom0-update
(cherry picked from commit d316624f61)
2016-06-25 15:42:00 +02:00
ttasket
9fb5f430fb
Backup root.img
Just in case template %post scriptlet doesn't unlink during reinstall, or if reinstall fails. Fixed PKGS test.
(cherry picked from commit 8c7a225070)
2016-06-25 15:42:00 +02:00
ttasket
fb61b3995d
Backup root.img
Just in case template %post scriptlet doesn't unlink during reinstall, or if reinstall fails.
(cherry picked from commit 6c7c25d9e7)
2016-06-25 15:42:00 +02:00
ttasket
f001a983e4
Support in-place template reinstalls - for testing
This doesn't yet prevent appvms from starting with invalid template during the reinstall, and doesn't deal with the Netvm setting problem.
For issue #2061
(cherry picked from commit 17627cdf3c)
2016-06-25 15:41:59 +02:00
ttasket
6c1cbaedc4
Add template reinstall support
Issue #2061
Simple implementation checks for --action=reinstall but adds no sanity checks.
(cherry picked from commit 6b315b1dad)
2016-06-25 15:41:59 +02:00
Marek Marczykowski-Górecki
7c8f2c3d6d
kernel-install: do not add kernel entry if already present
The entry may be already present for example when reinstalling package,
or calling the script multiple times (which apparently is the case
during system installation).

(cherry picked from commit 4d4e7cc5e9)
2016-06-21 04:27:34 +02:00
Marek Marczykowski-Górecki
c3cfafd265
qrexec: execute RPC service directly (without a shell) if it has executable bit set
This will allow to use some different shell/language for a service (for
example python).

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
(cherry picked from commit f8d23d0d64)
2016-06-21 04:27:09 +02:00
Marek Marczykowski-Górecki
d2dbcaa8dc
qrexec: do not leak FDs to logger process
This would prevent qrexec from detecting EOF.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
(cherry picked from commit 7b582e0339)
2016-06-21 04:26:55 +02:00
Marek Marczykowski-Górecki
58c3f2221f
version 3.1.11 2016-05-17 23:59:00 +02:00
Marek Marczykowski-Górecki
06be754e9e
kernel-install: don't fail on kernel removal in non-EFI installs
In non-EFI installation /boot/efi/EFI/qubes may not exists. In this case
do not try to touch (non-existing) files there.

Fixes QubesOS/qubes-issues#1829

(cherry picked from commit f7eaa7bec2)
2016-05-17 23:58:53 +02:00
Marek Marczykowski-Górecki
fd529f2c7d
appmenus: force changing appicons when VM label is changed
Fixes QubesOS/qubes-issues#1606

(cherry picked from commit 4694f5f52f)
2016-05-17 23:58:44 +02:00
M. Vefa Bicakci
5b1008540a
dracut: Omit network and kernel-network-modules
(cherry picked from commit fdc00ad678)
2016-05-17 23:58:26 +02:00
Marek Marczykowski-Górecki
a7910fab71
qrexec: deny spaces in service domain name
Fixes QubesOS/qubes-issues#1877

(cherry picked from commit ad28f4df62)
2016-05-17 23:58:03 +02:00
Galland
a0a2af3d0f
Add colon (:) to trusted characters (for "Code::Blocks" appmenu)
After installing "codeblocks" app in TemplateVM it doesn't appear in Qubes VM Manager's available app shortcuts.
If I run in a Dom0 Terminal: /usr/libexec/qubes-appmenus/qubes-receive-appmenus fedora-23
I get this: "Warning: ignoring key 'Name' of codeblocks.desktop"
The "Name" key in that file has value "Code::Blocks"

The problem comes from line 168, because of the colons in the app Name.

By adding the colon ":" to the std_re used to match valid characters for "Name", the app is correctly parsed and I can add the shortcut to AppVMs
(cherry picked from commit 3acfb8e4b3)
Notes from origin:
    Fixes QubesOS/qubes-issues#1852
2016-05-17 23:57:35 +02:00
Marek Marczykowski-Górecki
f44b268299
version 3.1.10 2016-03-15 23:51:21 +01:00
Marek Marczykowski-Górecki
e0c875a367
pm-utils: call qubes.SuspendPreAll/qubes.SuspendPostAll services
Host suspend notification may be useful not only to driver domains. For
example Whonix needs to resync time after suspend.

Thanks @adrelanos for help.

Fixes QubesOS/qubes-issues#1663
2016-03-15 23:13:48 +01:00
Marek Marczykowski-Górecki
6c7443223b
dom0-update: remove cached metadata when --clean is used
Fixes QubesOS/qubes-issues#1748
2016-03-11 15:10:28 +01:00
Marek Marczykowski-Górecki
c87d6c5cb7
version 3.1.9 2016-03-07 03:55:51 +01:00
Marek Marczykowski-Górecki
b19ba4dc2d
pm-utils: do not leave background tasks - will be killed by systemd
qvm-sync-clock running in background is killed as soon as
qubes-suspend.service is terminated.
Additionally restore --verbose option, which was the case (implicitly)
in previous qvm-run based code.

Fixes QubesOS/qubes-issues#1795
2016-02-29 13:31:25 +01:00
Marek Marczykowski-Górecki
01833c698c
version 3.1.8 2016-02-23 16:22:49 +01:00
Marek Marczykowski-Górecki
199d12636b
Merge remote-tracking branch 'qubesos/pr/5'
* qubesos/pr/5:
  Use #!/bin/bash and && in qvm-move-to-vm
  qvm-copy-to-vm: Fix running with multiple file arguments
  qvm-move-to-vm: Remove duplicated code
2016-02-23 03:53:27 +01:00
Marek Marczykowski-Górecki
ee3950a3aa
pm-utils: use qvm-sync-clock --force instead of manual qvm-run
After suspend VMs clocks are desynchronized in most cases (because VMs
were paused). Since directly after suspent there may be no network
access, normal `qvm-sync-clock` call isn't good (it aborts if NTP call
fails). But with new `qvm-sync-clock --force` switch, it sync VMs even
if NTP is unreachable.

QubesOS/qubes-issues#1728
2016-02-22 22:24:04 +01:00
Marek Marczykowski-Górecki
f8d8368b10
qrexec: add timeout for data vchan connection
When qrexec-agent crashes for any reason (for example
QubesOS/qubes-issues#1389), it will never connect back and qrexec-client
will wait forever. In worst case it may happen while holding qubes.xml
write lock (in case of DispVM startup) effectively locking the whole
system.

Fixes QubesOS/qubes-issues#1636
2016-02-22 22:24:04 +01:00
Rusty Bird
6e4d39c7b3
Use #!/bin/bash and && in qvm-move-to-vm
#!/bin/bash because qvm-move-to-vm sources qvm-copy-to-vm, which has
a bashism (-o pipefail).

&& is safer in case qvm-*copy*-to-vm is ever changed to call 'set +e'.
2016-02-16 08:33:54 +00:00
Rusty Bird
c177ae2c7a
qvm-copy-to-vm: Fix running with multiple file arguments 2016-02-13 15:21:39 +00:00
Rusty Bird
bc29af7c0c
qvm-move-to-vm: Remove duplicated code 2016-02-13 15:21:38 +00:00
Marek Marczykowski-Górecki
466acad6fb
version 3.1.7 2016-02-08 05:03:18 +01:00
Marek Marczykowski-Górecki
8c0643092b
Use qubes.SetDateTime instead of direct call in post-suspend time sync
Fixes QubesOS/qubes-issues#1728
2016-02-08 04:49:14 +01:00
Marek Marczykowski-Górecki
2198986d5c
dom0-update: do not output scary messagge about missing repomd.xml
... when no updates are available.

Fixes QubesOS/qubes-issues#1685
2016-02-03 16:46:58 +01:00
Marek Marczykowski-Górecki
fc2e8264d4
Merge remote-tracking branch 'qubesos/pr/4'
* qubesos/pr/4:
  Add qvm-appmenu-replace tool.
2016-01-17 04:34:10 +01:00
Marek Marczykowski-Górecki
74afb8a7cc
version 3.1.6 2015-12-31 02:58:00 +01:00
Marek Marczykowski-Górecki
fa8ebeb42d Fix typo in "d9d48e8 qrexec: use tray notification when..."
Fixes QubesOS/qubes-issues#1446

Thanks HW42 for the report.
2015-12-28 00:59:45 +01:00
Marek Marczykowski-Górecki
ae0cad589e
version 3.1.5 2015-12-26 15:29:27 +01:00
Marek Marczykowski-Górecki
d9d48e8948
qrexec: use tray notification when VM needs to be started
For both successful start and the failed one

Fixes QubesOS/qubes-issues#1446
2015-12-26 02:09:06 +01:00
Marek Marczykowski-Górecki
f66be6c943
dracut: include all USB controllers drivers
dracut in Fedora 20 doesn't know about *-pci modules (which were split
of *-hcd). So add them manually, in all flavors (ehci, ohci, xhci).

Fixes QubesOS/qubes-issues#1517
2015-12-24 03:26:36 +01:00
Marek Marczykowski-Górecki
6921400a7a
dom0-updates: remove "updates pending" flag also when no actual updates were found
This allows to clear the flag when for some reason it wasn't cleared
immediately after installing updates.

Fixes QubesOS/qubes-issues#1511
2015-12-13 02:11:56 +01:00
Marek Marczykowski-Górecki
cb6a52a652
dom0-updates: wait for apper to finish, then remove "updates pending" flag
Unfortunate side effect (to be solved at Qubes Manager side): it will
block Qubes Manager until all updates are installed (not only updater
launched).

Fixes QubesOS/qubes-issues#1511
2015-12-13 02:08:05 +01:00
Marek Marczykowski-Górecki
4a556dcab1
dom0-updates: ensure proper permissions on "updates pending" flag
QubesOS/qubes-issues#1511
2015-12-13 02:07:01 +01:00
Marek Marczykowski-Górecki
d9a2a66073
dom0-updates: remove unused code from cron job 2015-12-13 02:06:36 +01:00
Marek Marczykowski-Górecki
55f67d602e
version 3.1.4 2015-12-06 14:37:56 +01:00