Commit Graph

23 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
52a1fee533 qrexec: do not show message about missing fork-sever - it isn't an error 2015-05-24 20:47:34 +02:00
Marek Marczykowski-Górecki
731ee3e09a qrexec: do not reset umask to 077 for every started process
This umask will be inherited by any process started directly by qrexec
(i.e. without help of fork-server).
2015-04-10 18:07:32 +02:00
Marek Marczykowski-Górecki
74490b0b94 qrexec: try to recover from fork-server communication error
Simply forget about that connection, instead of waiting for further
messages. If that connection is no longer available, select would return
EBADF, which would cause qrexec-agent termination.
2015-03-29 15:43:21 +02:00
Marek Marczykowski-Górecki
9fe45aeae5 qrexec: fix compile warning 2015-03-20 03:05:05 +01:00
Marek Marczykowski-Górecki
16c27fc409 qrexec: minor readability fix 2015-03-16 21:41:36 +01:00
Marek Marczykowski-Górecki
1aa05ebc36 qrexec: handle data vchan directly from qrexec-client-vm
This way qrexec-client-vm will have much more information, at least:
 - will know whether the service call was accepted or refused
 - potentially will know remote process exit code
This commit implements the first point - the local process will not be
started if service call was refused.
2015-03-16 21:10:25 +01:00
Marek Marczykowski-Górecki
700c240d37 qrexec: add simple "fork server" to spawn new processes inside user session
This process should be started from user session (most likely
qubes-session). New processes (of that user) will be created as
children of that session making logind and such crap happy. This should
also solve problems with EOF transmission (no additional "su" process)
and prevent loading all the environment multiple times.
2015-02-17 04:18:34 +01:00
Marek Marczykowski-Górecki
4b5960daa3 qrexec: reorganise code for upcoming change
Move (qrexec-agent version of) do_exec to qrexec-agent.c, move
handle_handshake to qrexec-agent-data.c (common to all agent binaries).
Fix indentation (tabs -> spaces).
2015-02-17 04:06:19 +01:00
Marek Marczykowski-Górecki
48685938ff qrexec: register exec function
Update for shared libqrexec.so API (instead of statically linked one).
2014-11-19 15:34:34 +01:00
Marek Marczykowski-Górecki
b13844afe1 qrexec: new protocol - direct data vchan connections 2014-11-19 15:34:34 +01:00
Marek Marczykowski-Górecki
d84381b87f code style: replace tabs with spaces 2014-11-19 15:34:34 +01:00
Marek Marczykowski
95839ddab5 Update for new vchan API 2014-11-19 15:34:32 +01:00
Marek Marczykowski-Górecki
f0f82fc7e5 qrexec: fix loop bounds 2014-07-26 02:14:56 +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
f8b1a6c562 qrexec: use proper unsigned type instead of muting compiler warning 2014-02-19 20:53:54 +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
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
Vincent Penquerc'h
511b614f56 qrexec-agent: catch failure to deliver signal 2014-01-06 17:57:40 +01:00
Vincent Penquerc'h
1dfd1d0e70 qrexec-agent: fix array read underflow 2014-01-06 17:57:40 +01:00
Vincent Penquerc'h
b2e84900a3 qrexec-agent: fix file leak on read error 2014-01-06 17:57:40 +01:00
Vincent Penquerc'h
c14f810067 qrexec-agent: pass an int pointer to sscanf to match %d
and check for 16 bit unsigned range after that.
2014-01-06 17:57:40 +01:00
Vincent Penquerc'h
475421b2e2 core-agent-linux: misc const fixups 2014-01-06 17:57:40 +01:00
Marek Marczykowski
44fab139f4 Add qrexec back, use qubes-utils libraries for common code 2013-03-20 06:23:44 +01:00