Commit Graph

21 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
b25cf4b085
Add explanation why admin.vm.volume.Import is a custom script
Cc @rootkovska
2017-07-25 05:20:38 +02:00
Marek Marczykowski-Górecki
28737d16ce
Migrate qubes.NotifyTools, qubes.FeaturesRequest, qubes.NotifyUpdates
Make them call into qubesd. Create separate socket for "misc" calls - VM
accessible, but not part of Admin API.
2017-06-06 03:33:30 +02:00
Marek Marczykowski-Górecki
866d908b6d
qubesd-query-fast: fix compile warnings, enable -Werror 2017-06-05 23:33:58 +02:00
Wojtek Porczyk
0fdcbfc237 qubes-rpc/admin.vm.volume.Import: fix dd flags
QubesOS/qubes-issues#2622
2017-05-29 17:34:15 +02:00
Marek Marczykowski-Górecki
3cacf290bb
admin: implement admin.vm.volume.Import
Implement this in two parts:
1. Permissions checks, getting a path from appropriate storage pool
2. Actual data import

The first part is done by qubesd in a standard way, but then, instead of
accepting all the data (which may be several GB), return a path to which
a shell script (in practice: `dd` command) will write the data.
Then the script call back to qubesd again to report success/failure and
qubesd response from that call is actually returned to the user.

This way we do not pass all the data through qubesd, but still can
control the process from there in a meaningful way. Note that the last
part (second call to qubesd) may perform all kind of verification (like
a signature check on the data, or so) and can also prevent VM from
starting (hooking also domain-pre-start event) from not verified image.

QubesOS/qubes-issues#2622
2017-05-26 15:08:14 +02:00
Marek Marczykowski-Górecki
f42cd28901
admin-api: create and install actual Admin API RPC endpoints
Install files in /etc/qubes-rpc for all methods defined in API
documentation, even if not yet implemented (qubesd will handle it
raising appropriate exception).
Use minimal program written in C (qubesd-query-fast), instead of
qubesd-query in python for performance reasons:
 - a single qubesd-query run: ~300ms
 - equivalent in shell (echo | nc -U): ~40ms
 - qubesd-query-fast: ~20ms

Many tools makes multiple API calls, so performance here do matter. For
example qvm-ls (from VM) currently takes about 60s on a system with 24
VMs.

Also make use of `$include:` directive in policy file, to make it easier
defining a VM with full Admin API access.

QubesOS/qubes-issues#853
2017-05-23 03:24:15 +02:00
Wojtek Porczyk
e757444c35 qubes/tools/qvm-features: add tool for managing qvm-features
QubesOS/qubes-issues#1637
2016-05-19 03:02:24 +02:00
Patrick Schleizer
524888d2fd
use shuf rather than od because it is more readable
Thanks to @marmarek for the suggestion!

https://github.com/QubesOS/qubes-core-admin/pull/23/files#r55930643
2016-03-13 01:52:03 +00:00
Patrick Schleizer
e33b958bdd
implemented dom0 qubes.GetRandomizedTime
Required for fixing 'sys-whonix doesn't connect to Tor after system suspend'.

https://github.com/QubesOS/qubes-issues/issues/1764
2016-03-13 01:15:46 +00:00
Patrick Schleizer
c2b5630637 typo 2015-10-21 20:57:30 +00:00
Marek Marczykowski-Górecki
063b436b03
notify-updates: ignore chown error
If running as normal user, chown will fail. This isn't a problem,
because the file is probably already owned by the correct user. The
whole point about this chown is to give access to the file for normal
user, so if the write succeeded, it isn't needed.
2015-10-10 05:22:43 +02:00
Marek Marczykowski-Górecki
e3ae3cdf34
hvm: update appmenus only on the first qubes.NotifyTools call
Or more precisely - only when qrexec_installed value is changed from
False to True.
Previously it was called at each VM startup.
2015-08-09 21:21:47 +02:00
Marek Marczykowski-Górecki
6d19a9c2cc Do not hold the lock while retrieving application icons (qubes.NotifyTools)
This can take quite a long time, so do not block the whole system.
2015-07-01 07:03:52 +02:00
Marek Marczykowski-Górecki
df509cb780 Fix qubes.NotifyTools service (not import xenstore) 2015-07-01 04:47:52 +02:00
Marek Marczykowski-Górecki
df20a67a6c Convert qubes.NotifyTools service to use qubesdb 2015-06-23 00:14:57 +02:00
Marek Marczykowski-Górecki
72e415a807 move qubes-notify-* to libexec 2014-11-19 12:50:25 +01:00
Wojciech Zygmunt Porczyk
45318ecb43 regexp fixes and validation (#829) 2014-05-16 18:35:59 +02:00
Marek Marczykowski-Górecki
3891913d1b hvm: fetch and recreate appmenus when VM reports tools presence (#56 pro) 2013-12-04 03:02:39 +01:00
Marek Marczykowski-Górecki
8200b15c61 NotifyTools: handle default user setting
If the VM provides 'default-user' setting - save it to the VM settings.
2013-11-01 02:32:32 +01:00
Marek Marczykowski-Górecki
e2c43d2292 Allow HVM to notify dom0 about tools installation
HVM can set some xenstore entries (in qubes-tools/ subtree) to pass
informations about installed tools to dom0. qubes.NotifyTools service
triggers update of VM properties (like qrexec_installed).
This way, after installation of Qubes Windows Tools, the user doesn't need
to change any VM settings to use the tools.
2013-10-28 05:09:54 +01:00
Marek Marczykowski
a84886db07 Move all files one level up 2013-03-16 19:56:51 +01:00