Commit Graph

158 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
7da4ed7d64
Switch qubes.UpdatesProxy to socat
- there are many netcat versions (openbsd, nmap, ...), which behave
 differently - especially while handling EOF
 - Debian jessie doesn't have nmap-ncat (which handle EOFs sufficiently
   good)

QubesOS/qubes-issues#1854
2017-06-10 23:11:01 +02:00
Marek Marczykowski-Górecki
ce63d31a2e
Make all scripts in qubes-rpc executable
Don't rely on legacy feature of interpreting non-executable files as
scripts there.
2017-06-09 23:09:58 +02:00
Marek Marczykowski-Górecki
422f03e9ac
Add qubes.VMRootShell service
It is the same as qubes.VMShell - the actual difference is in qrexec
policy, which contains 'user=root' option.

QubesOS/qubes-issues#2572
2017-06-09 23:06:09 +02:00
Marek Marczykowski-Górecki
22002a34f3
Do not report spurious failure of qubes.WaitForSession service
It is expected to be killed by a signal. Exit with returncode 0 anyway.
While at it, adjust it for current service format (executable, with
proper shebang).
2017-06-08 22:11:36 +02:00
Marek Marczykowski-Górecki
8694931665
Implement qubes.PostInstall service
This is meant to notify dom0 about features supported by just-installed
template. This service is called by dom0 just after template
installation.

Fixes QubesOS/qubes-issues#1637
Documentation pending: QubesOS/qubes-issues#2829
2017-05-26 05:25:30 +02:00
Marek Marczykowski-Górecki
b49ae50ad5
Implement qrexec-based connection to updates proxy
Configure package manager to use 127.0.0.1:8082 as proxy instead of
"magic" IP intercepted later. The listen on this port and whenever
new connection arrives, spawn qubes.UpdatesProxy service call (to
default target domain - subject to configuration in dom0) and connect
its stdin/out to the local TCP connection. This part use systemd.socket
unit in case of systemd, and ncat --exec otherwise.

On the other end - in target domain - simply pass stdin/out to updates
proxy (tinyproxy) running locally.

It's important to _not_ configure the same VM to both be updates proxy and
use it. In practice such configuration makes little sense - if VM can
access network (which is required to run updates proxy), package manager
can use it directly. Even if this network access is through some
VPN/Tor. If a single VM would be configured as both proxy provider and
proxy user, connection would loop back to itself. Because of this, proxy
connection redirection (to qrexec service) is disabled when the same VM
also run updates proxy.

Fixes QubesOS/qubes-issues#1854
2017-05-26 05:25:29 +02:00
Marek Marczykowski-Górecki
f9d6ff89bc
Rename qvm-run to qvm-run-vm
Avoid conflict with qvm-run from qubes-core-admin-client package.
2017-05-23 02:55:31 +02:00
Marek Marczykowski-Górecki
89183e9944
Ask for target VM for file-copy in dom0
This way:
 - VM prompt do know VM list, the list may be filtered based on policy
 - source VM don't learn name of target VM

Fixes QubesOS/qubes-issues#910
2017-05-20 15:53:03 +02:00
Marek Marczykowski-Górecki
ce70887a57
Merge branch 'core3-devel' 2017-05-20 14:43:53 +02:00
Marek Marczykowski-Górecki
22e261f909
Add qubes.StartApp service
A simple service to start application described in .desktop file.
This way, dom0 can completely ignore VM-originated Exec= entry.
2017-05-20 03:48:02 +02:00
Marek Marczykowski-Górecki
eef6bbe360
qvm-copy-to-vm: fix handling empty target VM
This means "default" in Qubes 4.0.

QubesOS/qubes-issues#910
2017-05-17 14:22:10 +02:00
Lorenzo
f4af5f320a
Shut down after update only if it's a template.
As per discussion in
https://github.com/QubesOS/qubes-issues/issues/2555#issuecomment-271415169

Signed-off-by: Lorenzo <lorenzo.grespan@gmail.com>
2017-01-14 22:20:51 +00:00
Rusty Bird
0d243250f2
v2: (vm) qvm-move-to-vm: don't "rm -rf" vm name argument
Fixes QubesOS/qubes-issues#2472 from commit
3f600d03fa
2016-12-04 16:50:59 +00:00
Marek Marczykowski-Górecki
3050852cbb
Prefer powerpill to update Archlinux VM
This is the recommended way to connect through update proxy.
2016-11-12 22:30:37 +01:00
Marek Marczykowski-Górecki
6ba1d2ff78
Ask to shutdown the template after performing update
Fixes QubesOS/qubes-issues#2431
2016-11-12 22:27:20 +01:00
Marek Marczykowski-Górecki
7fa4115aba
Refactor qubes.InstallUpdatesGUI to reduce code duplication
QubesOS/qubes-issues#2431
2016-11-12 22:21:42 +01:00
Manuel Amador (Rudd-O)
59aec8e5eb Clean up early initialization and setup of /rw 2016-10-23 20:19:51 +00:00
Marek Marczykowski-Górecki
b50cba3f2c
Add qubes.ResizeDisk service to adjust filesystem size
Do this using qubes rpc service, instead of calling resize2fs directly
by dom0.
2016-08-17 21:47:22 +02:00
Marek Marczykowski-Górecki
be2c9313a4
Merge remote-tracking branch 'qubesos/pr/15'
* qubesos/pr/15:
  Fall back to gnome utilities if kdialog not present

Fixes QubesOS/qubes-issue#1429
2016-06-01 22:56:24 +02:00
Marek Marczykowski-Górecki
520894e623
Prefer 'dnf' over 'yum' for template update
QubesOS/qubes-issues#1282
2016-06-01 05:10:40 +02:00
unman
8471605e6d Fall back to gnome utilities if kdialog not present 2016-06-01 02:55:25 +01:00
Marek Marczykowski-Górecki
19921274e1
Implement qubes.OpenURL service instead of wrapping URLs in HTML
This have many advantages:
 - prevent XSS (QubesOS/qubes-issues#1462)
 - use default browser instead of default HTML viewer
 - better qrexec policy control
 - easier to control where are opened files vs URLs

For now allow only http(s):// and ftp:// addresses (especially prevent
file://). But this list can be easily extended.

QubesOS/qubes-issues#1462
Fixes QubesOS/qubes-issues#1487
2016-05-18 01:32:54 +02:00
Marek Marczykowski-Górecki
ff2678d2f5
qvm-open-in-vm: escape URL when wrapping it in HTML
Thanks @v6ak for the report and solution.

Fixes QubesOS/qubes-issues#1462
2016-05-17 22:06:41 +02:00
Patrick Schleizer
69780ef762 fixed sh syntax error
https://forums.whonix.org/t/qvm-run-fails-in-whonix-vms

Thanks to entr0py for the bug report!
2016-05-01 14:03:21 +02:00
Marek Marczykowski-Górecki
4d015432ce
Remove obsolete policy files
Qrexec policy is really stored in core-admin repo.
2016-04-27 19:32:00 +02:00
Marek Marczykowski-Górecki
7b5f2b77d1
qubes-rpc: fix SVG icon scaling
rsvg-convert doesn't scale the image. Do it with convert, only when
really needed. Don't upscale the icon after converting to raster
version.

Fixes QubesOS/qubes-issues#1884
2016-03-29 17:25:31 +02:00
Rusty Bird
428d8f09bf
Remove exec in last line of qvm-copy-to-vm 2016-03-21 11:51:29 +00:00
Marek Marczykowski-Górecki
7301a898a1
qubes.SuspendPreAll and qubes.SuspendPostAll services
Those services are called just before/after host suspend.

Thanks @adrelanos for help.
Fixes QubesOS/qubes-issues#1663
2016-03-15 23:33:11 +01:00
Marek Marczykowski-Górecki
f7d7c6125e
Merge remote-tracking branch 'qubesos/pr/11'
* qubesos/pr/11:
  Properly handle case of empty domain name.
  Use proper quoting around variables.
  Move usage information printing to separate function, and print usage to stderr; also added some spacing.
  Use proper space-expanded tabs, as per the coding guidelines.
2016-03-14 16:19:28 +01:00
Marek Marczykowski-Górecki
d4b637e29d
Merge remote-tracking branch 'qubesos/pr/10'
* qubesos/pr/10:
  Use && in qvm-move-to-vm
  qvm-move-to-vm: Use '--' before file arguments
  qvm-move-to-vm: Remove duplicated code
2016-03-14 16:18:41 +01:00
Marek Marczykowski-Górecki
7c45985331
qrexec: hide timing debug messages in vm-file-editor
Those are currently barely useful, since starting the application isn't
the biggest bottleneck of DispVM. And since stderr is now visible on
qvm-open-in-dvm output, not scare the user with it.
2016-03-05 12:51:07 +01:00
Andrew
bc73cf1fe3 Properly handle case of empty domain name. 2016-02-19 18:19:59 +01:00
Andrew
561f588d1d Use proper quoting around variables. 2016-02-19 18:19:02 +01:00
Andrew
17d274ef48 Move usage information printing to separate function, and print usage to stderr; also added some spacing. 2016-02-19 18:17:40 +01:00
Andrew
63f3392ff5 Use proper space-expanded tabs, as per the coding guidelines. 2016-02-19 16:54:25 +01:00
Rusty Bird
c730340039
Use && in qvm-move-to-vm
&& is safer in case qvm-*copy*-to-vm is ever changed to call 'set +e'.
2016-02-16 08:34:06 +00:00
Rusty Bird
160b05756b
qvm-move-to-vm: Use '--' before file arguments 2016-02-13 15:22:35 +00:00
Rusty Bird
3f600d03fa
qvm-move-to-vm: Remove duplicated code 2016-02-13 15:22:34 +00:00
Marek Marczykowski-Górecki
a8d609704a
Merge remote-tracking branch 'origin/pr/61'
* origin/pr/61:
  update-proxy: use curl instead of wget in archlinux in order to limit additional dependencies
  archlinux: properly add qubes markers in pacman.conf
  archlinux: add Qubes Markers in pacman.conf so that changes done by qubes scripts are not inserted at the end of pacman.conf
  implement update proxy support for archlinux
  archlinux: add gcc and make as make dependencies
  update qubes.InstallUpdateGUI to support archlinux
2016-02-02 23:29:28 +01:00
Marek Marczykowski-Górecki
dca5265958
qubes-open: switch from mimeopen to xdg-open
xdg-open is more robust in choosing default application for particular
file type: it supports fallback if the preferred application isn't
working, and most importantly it support system-wide defaults
(/usr/share/applications/defaults.list,
 /usr/share/applications/mimeapps.list), so no "random" application is
chosen.

By default xdg-open tries to use environment-specific tool, like
gvfs-open - which isn't good for us, because many such tools do not wait
for editor/viewer termination. That would mean that DisposableVM would
be destroyed just after opening the file.
To avoid such effect, we set DE=generic.

Fixes QubesOS/qubes-issues#1621
2016-02-02 03:28:34 +01:00
Marek Marczykowski-Górecki
0211ea5d1d
Move opening file viewer/editor into separate shell script
No functional change.

This will make it easier to switch the tool (without recompiling
vm-file-editor), or even use differrent tools depending on some
conditions.

QubesOS/qubes-issues#1621
2016-02-01 12:17:15 +01:00
adrianx64
d3966b0f6c Proposed solution for issue #1657
qvm-sync-appmenus fails when a shortcut have spaces in the file name #1657
2016-01-18 23:02:30 -06:00
Olivier MEDOC
b06c29c6dc update qubes.InstallUpdateGUI to support archlinux 2016-01-16 11:52:49 +01:00
Marek Marczykowski-Górecki
cb5c457fba
Do not try to signal NetworkManager before suspend if it isn't running
Sending dbus calls to a service which isn't running _and is blocked to
not be started_ would result in timeout, which would delay the whole
system suspend.

Fixes QubesOS/qubes-issues#1419
2016-01-11 19:40:32 +01:00
Marek Marczykowski-Górecki
0e062ff31e
Fix time sync service
It is expected to not output anything on stdout. Especially remote end
may be already terminated, so writing there would result in EPIPE.

Fixes QubesOS/qubes-issues#1592
2016-01-07 05:06:39 +01:00
Marek Marczykowski-Górecki
169c389339
open-in-vm: Fix path to mimeinfo database
There was missing "/mime" in entry for user home.

QubesOS/qubes-issues#1490
2015-12-05 13:49:25 +01:00
Marek Marczykowski-Górecki
5157d9822e
backup: Use 'type' instead of 'which' to prevent unnecessary dependency
This fixes using minimal-template based VMs to store/retrieve backup.
2015-11-27 12:31:33 +01:00
Marek Marczykowski-Górecki
f0de6c5b16
Implement qubes.InstallUpdatesGUI qrexec service
It should be up to the VM what GUI tool is used for installing updates.
For now stick with console tools in xterm...

Fixes QubesOS/qubes-issues#1249
2015-11-13 05:32:44 +01:00
Marek Marczykowski-Górecki
e2ab963a27
Minor improvements to packaging (based on rpmlint)
There is much more to fix, but lets start with low hanging fruits.
2015-11-11 15:19:43 +01:00
yaqu
c63a9f6566
Replacing "sleep 365d" with "sleep inf"
To get endless sleep, `sleep inf` (or `sleep infinity`) can be used
instead of `sleep 365d`. Coreutils' sleep accepts any floating-point
number as an argument, which may be 'infinity', according to
`man strtod`.
2015-11-03 14:00:00 +01:00