Commit Graph

251 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
fee8f6cfef
Merge remote-tracking branch 'origin/pr/246'
* origin/pr/246:
  Advertise apparmor support
2020-09-17 02:57:27 +02:00
herypt
9271763a6f
Advertise apparmor support 2020-09-02 14:37:25 +02:00
Artur Puzio
21864ab563
Skip IGD when unbinding device drivers on suspend 2020-08-25 17:08:38 +02:00
Marek Marczykowski-Górecki
8066129445
Add services for paranoid backup restore mode
Add a pair of services:
1. qubes.RegisterBackupLocation - called by dom0, registers what backup
location (including both file and command options) can be accessed.
Registered location gets an ID returned to the caller. The location (and
its ID) is valid as long as the service call remains open.

2. qubes.RestoreById - called by restoring DispVM to retrieve the backup
content. The service expects location ID as an argument, and then list
of files/directories (separated with spaces) on the first line of stdin.
This is very similar to qubes.Restore service, with exception for the
archive location control.

QubesOS/qubes-issues#5310
2020-08-03 03:43:09 +02:00
Marek Marczykowski-Górecki
7c261f45da
qfile-unpacker: add option (-w) to wait for disk space before extracting
Add -w MARGIN option to always leave at least MARGIN bytes of free
space.

QubesOS/qubes-issues#4791
2020-08-03 03:25:37 +02:00
Marek Marczykowski-Górecki
13eef467bf
tar2qfile: fix argument parser
There is only one input, other arguments are files/directories to
extract. There is no need for a loop.
2020-08-03 03:25:36 +02:00
Marek Marczykowski-Górecki
cee32d4f90
qfile-unpacker: add option for custom user and target directory
QubesOS/qubes-issues#930
2020-08-03 03:25:36 +02:00
Marta Marczykowska-Górecka
6e724f76f0
fixed qubes.GetAppmenus ignoring some correct .desktop files
.desktop files can have spaces around '=' symbols; previously
GetAppmenus discarded such files.

references QubesOS/qubes-issues#5692
2020-06-03 18:27:34 +02:00
Marek Marczykowski-Górecki
707d4cad8b
qubes.ShowInTerminal needs a graphical session running
This specifically fixes qvm-console-dispvm tool, which uses
qubes.ShowInTerminal to show the actual console. This service uses
xterm, so it needs X session running already.

Fixes QubesOS/qubes-issues#5805
2020-05-09 05:13:14 +02:00
Rusty Bird
25b304ccf3
qvm-run-vm: fix comment
While stderr isn't connected to the local_program argument (qrun-in-vm)
of qrexec-client-vm, it *is* connected (by qrexec-client-vm itself) to
the command the user passed to *to qvm-run-vm*.
2020-05-06 14:46:15 +00:00
Rusty Bird
ce3c1cfb7c
qvm-run-vm: translate --dispvm to modern @dispvm syntax 2020-05-06 14:46:14 +00:00
Rusty Bird
5c7d06b46e
qvm-run-vm: add +WaitForSession for modern @dispvm syntax too 2020-05-06 14:46:13 +00:00
Rusty Bird
cd3d870fd0
qubes.Restore: remove bashism found by new ShellCheck 2020-02-26 18:47:44 +00:00
Saswat Padhi
f96c00d975
signed 2020-02-08 04:01:48 -08:00
Saswat Padhi
600df100df qubes.GetAppmenus: skip unreadable .desktop files 2020-02-08 10:13:41 +00:00
Amadeusz Piotr Żołnowski
4de377bc3b
Split items in misc directory by topic 2020-02-04 23:59:09 +00:00
Pawel Marczewski
9db6e4e2cc
Advertise qubes.VMExec support as a feature 2020-01-24 18:45:17 +01:00
Pawel Marczewski
738548a8e4
Add qubes.VMExec call, for running a single command
With a VMExecGUI variant that waits for a session.

See QubesOS/qubes-issues#4850.
2020-01-24 18:44:45 +01:00
Marek Marczykowski-Górecki
d2087c5abf
Merge remote-tracking branch 'origin/pr/203'
* origin/pr/203:
  Added "QubesIncoming" shortcut to Nautilus
2020-01-16 04:24:07 +01:00
Marta Marczykowska-Górecka
fd6e551ebe
Added "QubesIncoming" shortcut to Nautilus
A small script will add the QubesIncoming shortcut to Nautilus file pane
on the first use of qvm-copy to a given VM. The shortcut will not be recreated if
deleted.

fixes QubesOS/qubes-issues#2229
2020-01-13 16:45:41 +01:00
Marek Marczykowski-Górecki
cc68f165bc
Merge remote-tracking branch 'origin/pr/199'
* origin/pr/199:
  qubes.GetAppmenus: handle home directory properly in case of sudo
  Silence shellcheck
  GetAppmenus: ensure right app directories
2020-01-09 01:38:12 +01:00
Pawel Marczewski
418a5ec6e3
qubes.GetAppmenus: handle home directory properly in case of sudo 2020-01-08 17:05:32 +01:00
Pawel Marczewski
2df17a4790
Silence shellcheck
See https://github.com/koalaman/shellcheck/wiki/SC1090
2020-01-08 10:29:36 +01:00
Marek Marczykowski-Górecki
cf2c91bc79
Merge remote-tracking branch 'origin/pr/200'
* origin/pr/200:
  Make the file copy operation respect default_user
2020-01-08 02:21:59 +01:00
Pawel Marczewski
e78edba725
Make the file copy operation respect default_user
Previously, both file path and username were hardcoded.

Fixes QubesOS/qubes-issues#5385.
2020-01-07 16:54:19 +01:00
Pawel Marczewski
552b6de862
GetAppmenus: ensure right app directories
The script depends on XDG_DATA_DIRS environment variable
being set up correctly, which is not the case when it is
running under sudo. As a result, a post-install trigger
for apt could remove application entries from other sources
(Snap, Flatpak).

Fixes QubesOS/qubes-issues#5477.
2020-01-07 15:45:05 +01:00
Pawel Marczewski
03621e5792
StartApp: remove workaround for .desktop suffix
The workaround is no longer necessary, and it breaks when
the app name itself contains .desktop (such as org.telegram.desktop).

Fixes QubesOS/qubes-issues#5408.
2020-01-07 13:06:57 +01:00
Frédéric Pierret (fepitre)
71ef524dec
vm-file-editor: drop old wait-for-session mechanism 2019-11-11 16:08:28 +01:00
Frédéric Pierret (fepitre)
a44e73900e
qubes.WaitForSession: refactor by waiting for qrexec-fork-server socket 2019-11-02 23:11:32 +01:00
Amadeusz Piotr Żołnowski
c104d73a85
Don't clean tilda files in qubes-rpc
These are not created by build system, but by some editors. Developers
should deal with extra files created by theirs editors outside of build
files.
2019-10-21 22:45:36 +01:00
Marek Marczykowski-Górecki
e43e262b2d
Merge remote-tracking branch 'origin/pr/188'
* origin/pr/188:
  Use built-in rules in qubes-rpc makefile
  Ignore build result: tar2qfile
  Remove no longer needed xorg-preload-apps.conf
  Move qubes-rpc installation from the root Makefile to qubes-rpc Makefile
2019-10-21 00:45:47 +02:00
Amadeusz Piotr Żołnowski
863c7e130f
Use built-in rules in qubes-rpc makefile
That allows a build system to customize compiler and linker and pass
extra flags to these.

Remove `-g` as default flag and enable it only when `DEBUG` variable is
set.
2019-10-20 09:12:08 +01:00
Amadeusz Piotr Żołnowski
e98d9332fa
Ignore build result: tar2qfile 2019-10-20 09:12:08 +01:00
Amadeusz Piotr Żołnowski
3152c609a9
Move qubes-rpc installation from the root Makefile to qubes-rpc Makefile
qubes-rpc has its own Makefile that's responsible for building some
executables. The root Makefile was installing qubes-rpc files. To make
qubes-rpc a bit more indepdent from core-agent root Makefile and to ease
potential maintainer work on packaging qubes-rpc separately, the
installation has been moved to qubes-rpc Makefile. Moreover that should
make the Makefiles easier to read and maintain.
2019-10-20 09:12:07 +01:00
Marek Marczykowski-Górecki
3c47a7890f
Merge branch 'fc31'
* fc31:
  rpm: switch deps to python3-setuptools on CentOS too
  debian: switch to python3
  Use spaces in xdg-icon script
  Convert other scripts to python3
  Convert qubesagent module to python3
  Minor codestyle fix in qubesadmin/firewall.py
  Require python setuptools
  Update python2 dependencies to python3 and clean deprecated requirements
2019-10-06 07:00:10 +02:00
Marek Marczykowski-Górecki
274c950af7
Use spaces in xdg-icon script 2019-09-19 04:57:55 +02:00
Marek Marczykowski-Górecki
5c9903db46
Convert other scripts to python3
QubesOS/qubes-issues#5289
2019-09-19 04:57:55 +02:00
Marta Marczykowska-Górecka
dffe0b2f1a
Make qvm-copy/move[-to-vm] one script
Instead of two scripts calling one another, now it's
only one script, with added variable names inside for clarity.
Also hopefully finally fixes the help messages for good.

fixes QubesOS/qubes-issues#4058
2019-09-09 22:03:48 +02:00
Frédéric Pierret (fepitre)
e27296da3c
Allow creating TCP sockets between qubes
QubesOS/qubes-issues#2148
2019-08-08 15:48:37 +02:00
Marek Marczykowski-Górecki
ec32be73ed
Specify expected shell in su calls
When calling su with a specific script, specify /bin/sh shell to be sure
to use posix compliant shell. User shell may not be a one (like fish).

Fixes QubesOS/qubes-issues#5135
2019-07-05 20:38:04 +02:00
Marek Marczykowski-Górecki
08a853b960
Merge branch 'remove-qrexec'
* remove-qrexec:
  travis: update for R4.1
  Remove qrexec-agent related files
2019-06-06 23:20:11 +02:00
Frédéric Pierret (fepitre)
0c3421cfa8
qubes.ShowInTerminal: simply exit if mktemp generate " character 2019-05-11 11:54:24 +02:00
Frédéric Pierret (fepitre)
2b2752f936
Rename and fix from Marek's comments 2019-05-07 15:01:34 +02:00
Frédéric Pierret (fepitre)
4324dc1564
Add admin.vm.TerminalDispVM qubes-rpc 2019-05-05 17:59:44 +02:00
Marek Marczykowski-Górecki
20285bc6c2
Remove qrexec-agent related files
Move it to the core-qrexec repository.

QubesOS/qubes-issues#4955
2019-04-08 18:22:38 +02:00
Marek Marczykowski-Górecki
b47a61adcf
Make shellcheck happy 2018-12-15 23:45:34 +01:00
Marek Marczykowski-Górecki
3b0f80e19f
Make shebang explicit /usr/bin/python2 where it's still there
Both Archlinux and Fedora 29 have guidelines to point explicitly at
/usr/bin/python2 where it expect python2.

Also, do not use env.

Fixes QubesOS/qubes-issues#4027
2018-10-24 00:24:50 +02:00
Marek Marczykowski-Górecki
d1f55ffeb8
appmenus: send only persistent appmenus entries, use $XDG_DATA_*
It may be useful to create AppVM-specific menu entries in AppVM itself.
It may be an application installed there (in /usr/local, or using snap
QubesOS/qubes-issues#2766), but it may be also some user custom
shortcut.
To support this, dom0 will accept menu entries also from
TemplateBasedVMs. But to avoid duplicates, qubes.GetAppmenus service
should send only menu entries actually stored in that VM, not inherited
from its template. To distingush them, first check what type of
persistence this VM has (from qubesdb-read /qubes-vm-persistence). If
it's rw-only, send only entries stored on /rw.

To make it more robust, use $XDG_DATA_DIRS and $XDG_DATA_HOME to
discover directories, instead of looking only for
/usr/{,local/}share/applications. This makes snap and flatpak handled
for free.

Fixes QubesOS/qubes-issues#4152
2018-10-09 06:06:58 +02:00
Rusty Bird
ff77c78ecc
Unify qvm-{copy,move}-to-vm.{gnome,kde} and fix some bugs
- Symlink the other three tools to qvm-copy-to-vm.gnome, use the same
  code where possible, and select differing behavior based on invoked
  name (like the CLI tools). This brings qvm-move-to-vm.kde up to date
  for R4.0 (bugfix on 89183e9).

- Get rid of a window focus race between zenity/kdialog and the
  qubes.Filecopy dom0 permission dialog: Only launch the GUI after the
  first line has been read from qfile-agent.

- Avoid visual glitches (e.g. for a non-existing file) by special-casing
  a no-op progress function for $SIZE == 0.

- Pass -- separator between 'rm -rf' and the files to be removed, in
  case someone or something ever invokes the tool on relative file names
  starting with a dash.

- Pass -b (implies --apparent-size) and -s to du, to simplify percentage
  calculation and to avoid unnecessary output.
2018-07-25 12:44:53 +00:00
Rusty Bird
8da7c7af60
qfile-agent.c: exit on EPIPE after gui progress write
The qvm-{copy,move}-to-vm.{gnome,kde} cancel buttons didn't actually
cancel, because qfile-agent ignored EPIPE and - via qfile_pack_init() -
SIGPIPE. So it never noticed when the local PROGRESS_TYPE=gui reader had
shut down.
2018-07-25 12:44:52 +00:00