Commit Graph

95 Commits

Author SHA1 Message Date
Jason Mehring
6836420c3c
Removed nautilus-actions depend and replaced with nautilus-python
nautilus-actions was orphaned in fc21, so all nautilus context menus have
been re-written as nautilus-python extensions
2015-02-27 00:52:17 -05:00
Jason Mehring
53fc7955f9
Switched qvm-move-to-vm.{gnome,kde} scripts to use bash not sh
Both these scripts contain `pipefail` which is a bash option and will
fail in dash
2015-02-27 00:47:33 -05:00
Marek Marczykowski-Górecki
fda293f09a Fix "backup: fix qubes.Restore service - do not send garbage as backup data" 2015-02-22 14:36:11 +01:00
Marek Marczykowski-Górecki
b560596f1b backup: fix qubes.Restore service - do not send garbage as backup data
Do not send 'which' command output to stdout, as it will mess real
backup data.
This fixes regression introduced by this commit:
commit dad5bfbd18
Author: HW42 <hw42@ipsumj.de>
Date:   Thu Feb 5 03:14:41 2015 +0100

    remove 'bashisms' or explicit use bash
2015-02-18 22:37:36 +01:00
Matt McCutchen
b37d391f91 Make qvm-run bidirectional and document its limitations. 2015-02-09 06:37:32 +01:00
HW42
dad5bfbd18 remove 'bashisms' or explicit use bash 2015-02-05 05:42:08 +01:00
Marek Marczykowski-Górecki
9f51c82666 filecopy: fallback to "open(..., 000)" method when /proc inaccessible
/proc is needed to link files opened with O_TMPFILE to the filesystem.
If not available, fallback to using permissions to block file access,
instead of failing the whole file copy.
2015-01-30 00:48:56 +01:00
HW42
13bca3d05f don't ignore asprintf() return value 2015-01-30 00:45:05 +01:00
Marek Marczykowski-Górecki
efc7d4d1f2 filecopy: prevent files/dirs movement outside incoming directory during transfer
Otherwise, when the user moves directory, which is still in transfer,
somewhere else, it could allow malicious source domain to escape chroot
and place a file in arbitrary location.

It looks like bind mount is just enough - simple rename fails with
EXDEV, so tools are forced to perform copy+delete, which is enough to
keep unpacker process away from new file location.

One inconvenient detail is that we must clean the mount after transfer
finishes, so root perms cannot be dropped completely. We keep separate
process for only that reason.
2015-01-30 00:45:04 +01:00
Marek Marczykowski-Górecki
e0d2424d5e suspend: do not disable network frontend devices 2014-10-27 15:07:06 +01:00
Marek Marczykowski-Górecki
0613a58961 Improve handling of .desktop files
Instead of directly using Exec= line, parse the file (at the launch
time) with Gio library. The main reason for this change is to handle
Terminal= option, but generally this approach should be more
bulletproof, especially when some fancy options are present in desktop
files.
2014-10-27 12:25:45 +01:00
Marek Marczykowski-Górecki
7339dd1ece Introduce qubes.SetDateTime service for time synchronization
It would be called by qvm-sync-clock instead of 'date' directly. This
gives a lot of flexibility - VM can control whether it want to sync time
this way. For now slight corrections (+-2sec) are ignored to not cause
problems by frequent time changes. But it can be easily extended to
refuse time sync when some other mechanism is used.
2014-10-01 05:40:23 +02:00
Marek Marczykowski-Górecki
64e8eedcb0 qrexec: check for setuid() error when calling zenity/kdialog
Mostly to mute compiler warning - only emit log message but still
continue.
2014-09-29 21:05:32 +02:00
Marek Marczykowski-Górecki
4bd9971006 gui-fatal: do not run as root
GTK+ refuses to initialize.
2014-09-20 01:20:11 +02:00
Marek Marczykowski-Górecki
84957e78da Add --dispvm to qvm-run documentation 2014-05-25 00:54:55 +02:00
Vincent Penquerc'h
b21ee1fc42 vm-file-editor: remove temporary file on exit
This allows editing the same file more than once on the
same (non disposable) VM, as well as keeping /tmp from
ballooning indefinitely.
2014-05-10 12:42:13 +02:00
Marek Marczykowski-Górecki
969122cf4f suspend: fix dbus-send invocation 2014-05-01 01:10:57 +02:00
Marek Marczykowski-Górecki
bd6ba19407 Enable compiler optimization. 2014-04-22 00:57:36 +02:00
Marek Marczykowski-Górecki
8018b9d3ee Fix compiler warnings.
Mostly harmless cases of warn_unused_result.
2014-04-22 00:56:52 +02:00
Marek Marczykowski-Górecki
fe64539789 Implement "Move to VM" action (#725) 2014-03-24 05:19:16 +01:00
Marek Marczykowski-Górecki
0d3ed747b4 suspend-prepare: call NM D-Bus interface directly
nmcli doesn't seem to have stable API, especially "nmcli nm sleep"
doesn't work anymore in Fedora 20.
2014-02-21 18:42:12 +01:00
Marek Marczykowski-Górecki
c632f0d067 Add -Wextra -Werror to all C code 2014-02-16 11:34:22 +01:00
Marek Marczykowski-Górecki
3cc9d0f329 Merge branch 'appicons'
Conflicts:
	rpm_spec/core-vm.spec
2014-02-07 05:50:07 +01:00
Marek Marczykowski-Górecki
c0c914faab Merge remote-tracking branch 'woju/master' into appicons 2014-02-07 05:48:18 +01:00
Marek Marczykowski-Górecki
75b1e24bab qubes-rpc, qrexec: register callbacks for qrexec-lib
Now qrexec-lib do not use exported symbols of particular names, but
explicitly registered callbacks.
2014-02-07 05:36:15 +01:00
Marek Marczykowski-Górecki
7953af970d backups: fix buffer overflow in tar2qfile
Buffer for directory headers history was too small. This can be
exploitable by some attacker capable of controlling backup stream, but
it isn't any security problem. We don't assume this part of backup
system to be trusted, the attacker can at most prevent user from
restoring some data, but will neither gain access to them, or compromise
any other Qubes component. This is equivalent to bug in any other tool
used in backup vm (like FTP client) and the Qubes backup system is
designed specifically to minimize impact of such bugs.
2014-02-05 15:16:42 +01:00
Wojciech Zygmunt Porczyk
27632a0b3b qubes.GetImageRGBA: bugfixes
- when icon is not found in hicolor theme, search for in in other themes
- added -follow to find
2014-02-04 00:36:30 +01:00
Marek Marczykowski-Górecki
39eca94200 backups: fix timestamp in backup filename (once again...) 2014-02-02 13:36:59 +01:00
Marek Marczykowski-Górecki
1e291bbdc6 backups: fix timestamp in backup filename (once again...) 2014-02-02 12:17:43 +01:00
Marek Marczykowski-Górecki
cac25cbe60 Merge remote-tracking branch 'woju/master' into appicons
Conflicts:
	Makefile
	rpm_spec/core-vm.spec
2014-01-31 02:12:06 +01:00
Wojciech Zygmunt Porczyk
453ab0f22c qubes.GetImageRGBA for appicons 2014-01-30 16:30:17 +01:00
Marek Marczykowski-Górecki
66ef7696ac backups: change data/time delimiter in filename according to ISO 8601 2014-01-15 04:33:18 +01:00
Marek Marczykowski-Górecki
2b80dfef17 backups: fix backup timestamp 2014-01-13 05:08:05 +01:00
Marek Marczykowski-Górecki
361ab0b266 qubes-rpc: introduce services for browsing VM filesystem
For now used to select system backup inside of VM.
2014-01-13 05:07:23 +01:00
Marek Marczykowski-Górecki
6e599567e0 tar2qfile: retry if lseek() returns EAGAIN
... even though it shouldn't. Apparently it is happening. See #764
comments for details.
2014-01-10 03:33:55 +01:00
Marek Marczykowski-Górecki
92aac6a92e Remove copy of ioall.c - use the one from linux-utils 2014-01-06 18:32:13 +01:00
Vincent Penquerc'h
df7c431d0b qfile-utils: do not write a random extra byte
readlink(2) does not write a terminating NUL, and the read side
will already place a NUL after whatever it receives.
While it seems odd that this would be buggy (ie, synlinks on
the ohter side would be pointing to the wrong filename, though
I guess if we're lucky and the stack had a 0 byte at the right
place, symlink(2) would do what was expected), my reading of
the code tells me this patch is right. Needs testing to double
check.
2014-01-06 17:57:43 +01:00
Vincent Penquerc'h
960c85587f gui-fatal: fix message leak, since the dialog may not be fatal 2014-01-06 17:57:43 +01:00
Vincent Penquerc'h
3e8c0372c2 gui-fatal: use fully qualified paths to kdialog/zenity 2014-01-06 17:57:42 +01:00
Vincent Penquerc'h
73adfc88e3 gui-fatal: add \n to message on stderr 2014-01-06 17:57:42 +01:00
Vincent Penquerc'h
393553c7bb vm-file-editor: #include <sys/time.h> for gettimeofday 2014-01-06 17:57:42 +01:00
Vincent Penquerc'h
c171f47ba8 vm-file-editor: put temporary files in per domain subdirectories
This avoids the possibility that incoming files may match
an existing file in /tmp (whether from the target VM, or a
third VM that's also sent a file for editing), as well as
possible file leaks between domains.
2014-01-06 17:57:42 +01:00
Vincent Penquerc'h
9a4b1efa61 core-agent-linux: misc const/void fixups 2014-01-06 17:57:42 +01:00
Vincent Penquerc'h
214365e272 vm-file-editor: hide | in filename 2014-01-06 17:57:42 +01:00
Vincent Penquerc'h
47c657b123 vm-file-editor: close output when done writing 2014-01-06 17:57:41 +01:00
Vincent Penquerc'h
81e9f967be vm-file-editor: do not overwite an existing file
Either a housekeeping file from that VM, or a similarly named
one being edited from a third VM.
2014-01-06 17:57:41 +01:00
Vincent Penquerc'h
11b8f9be20 vm-file-editor: fix potential buffer overflow
If we're being sent something without a zero byte, we
could happily read off the end of the buffer. Interestingly,
the write part was checking for the max bound.
2014-01-06 17:57:41 +01:00
Vincent Penquerc'h
c9a25b8915 vm-file-editor: fix incorrect time display
It's used only for display, and never parsed, but still.
2014-01-06 17:57:41 +01:00
Vincent Penquerc'h
a4b3a0c955 qopen-in-vm: ensure we can't mistake a non empty file for an empty one
st_size is off_t, which may be larger than int.
2014-01-06 17:57:41 +01:00
Vincent Penquerc'h
38c0ea3128 qopen-in-vm: fix read overflow
That one would also send more data to the other VM that what we
intended: the start of the env var data (which in similar code
on my host includes the GPG agent socket path, XDG session cookie,
and more.

The other side expects a fixed size though, so pad with NULs.

Interestingly, the original code was not vulnerable as it was
callocing enough space.
2014-01-06 17:57:40 +01:00