Commit Graph

13 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
c4abf9626a
Add build-time assert for filename buffer size
Suggested by @cfcs

(cherry picked from commit b5a9d9bf8e)
2018-07-26 23:08:19 +02:00
Marek Marczykowski-Górecki
b2fe97099b
qvm-open-in-vm: mark file as read-only if opened with --view-only
This will cause most applications to disallow changing the file and also
add some visual indication about the view being read only. This will
avoid making the changes that would be discarded later.

QubesOS/qubes-issues#1118

(cherry picked from commit 42b1355957)
2018-07-26 23:08:09 +02:00
Marek Marczykowski-Górecki
06b6276c1c
qvm-open-in-vm: implement --view-only option
Implement option to disallow (ignore in fact) modifications of file
opened in another VM (including DispVM).
This commit implements actual services part and handling in wrapping scripts.

Fixes QubesOS/qubes-issues#1118

(cherry picked from commit ef557ca460)
2018-07-26 23:06:36 +02:00
Marek Marczykowski-Górecki
bdbce98394
qubes-rpc: fix code style - indent with spaces
(cherry picked from commit 5deac1802f)
2018-07-26 18:23:15 +02:00
Frédéric Pierret
b65339b932
Fix GCC8 warnings
(cherry picked from commit c43c4df7b9)
2018-05-05 17:25:44 +02:00
Patrick Schleizer
2eb0ed2be1
removed trailing spaces 2015-10-15 04:34:55 +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
92aac6a92e Remove copy of ioall.c - use the one from linux-utils 2014-01-06 18:32:13 +01:00
Vincent Penquerc'h
9a4b1efa61 core-agent-linux: misc const/void fixups 2014-01-06 17:57:42 +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
Vincent Penquerc'h
5af6f0ff7f qopen-in-vm: close output when we're done writing to it 2014-01-06 17:57:40 +01:00
Marek Marczykowski
7686fd5d92 The Underscores Revolution: RPC services 2013-03-14 04:25:31 +01:00