-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stop using qubes-rpc-multiplexer #141
Conversation
189d832
to
b4a2de9
Compare
3de2f4b
to
39f909f
Compare
39f909f
to
2291280
Compare
9f69888
to
a4de39f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #141 +/- ##
==========================================
- Coverage 79.17% 78.85% -0.32%
==========================================
Files 54 55 +1
Lines 9953 10145 +192
==========================================
+ Hits 7880 8000 +120
- Misses 2073 2145 +72 ☔ View full report in Codecov by Sentry. |
b7502bc
to
b4d7ed6
Compare
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025020121-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2024111705-4.3&flavor=update
Failed tests8 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/119126#dependencies 3 fixed
Unstable tests |
Ugh, upgrade will require a bit more care. Right now, just after upgrading dom0, qrexec calls (to dom0) fails for currently running VMs:
Release upgrade script will need to handle this case. |
Maybe keep the script in repo, and remove only later (R4.4?) ? |
51460e6
to
62f2de4
Compare
I fixed the bug in #187 but |
Now indeed sys-gui tests are green :) |
* origin/pr/647: tests: add qrexec performance tests Pull request description: Add simple connection latency, and throughput tests. Run them with different type of services (scripts, socket, via fork-server or not). They print a test run time for comparison - the lower the better. QubesOS/qubes-issues#5740 This will be especially useful to measure impact of QubesOS/qubes-core-qrexec#141 and similar changes.
Why actually doing it? Is it intended to remove some specific variable(s)? |
The intent is to ensure that with the exception of |
The way you described it may suggest various For testing, you don't need to modify release behavior to avoid those variables - simply exclude them in tests when calling various qrexec tools. Anyway, I'm not strongly against this change, as it feels harmless (if not useful), but it needs better description. But also, would it be feasible to add some logging when excluding a variable that isn't going to be set a moment later (so, a variable that would be "leaked" to the service)? That would help finding unintended effects of this change. |
17be9de
to
7316fdc
Compare
7316fdc
to
72689b1
Compare
72689b1
to
b760f57
Compare
Instead, directly execute the command from C. Environment variables with names beginning with QREXEC are stripped from the environment, except for QREXEC_SERVICE_PATH and QREXEC_AGENT_PID. This stripping happens before qrexec-specific environment variables are set, so the following variables are still set as before: - QREXEC_SERVICE_FULL_NAME - QREXEC_REMOTE_DOMAIN - QREXEC_SERVICE_ARGUMENT - QREXEC_REQUESTED_TARGET_TYPE - QREXEC_REQUESTED_TARGET (dom0 only) - QREXEC_REQUESTED_TARGET_KEYWORD (dom0 only) This is a backwards-incompatible change to exec_qubes_rpc_if_requested(), which now takes an extra argument. Therefore, it cannot be backported to R4.2. It also requires changing the SELinux policy so that the labels on /etc/qubes-rpc/ and /usr/local/etc/qubes-rpc/ (and their contents) are correct. qubes-rpc-multiplexer is still present because it has legacy uses in Python code and for compatibility. Fixes: QubesOS/qubes-issues#9062
Instead, just use qrexec-client, as with any other service call.
It carries no information, and various parts of the code must strip it. Just omit it from the command entirely. Whether a command is an RPC command should be determined by the service descriptor being non-NULL. Review with "git diff --ignore-space-change".
The previous two changes were ABI breaks.
b760f57
to
68a427f
Compare
Instead, directly execute the command from C.
The command’s environment inherits all environment variables from the
calling process except for those that start with
QREXEC
. Environmentvariables that start with
QREXEC
are not inherited, except forQREXEC_SERVICE_PATH
andQREXEC_AGENT_PID
, but the following are setexplicitly:
QREXEC_SERVICE_FULL_NAME
QREXEC_REMOTE_DOMAIN
QREXEC_SERVICE_ARGUMENT
if the service argument is present and non-empty.QREXEC_AGENT_PID
is set for calls to a VM that do not useMSG_JUST_EXEC
.Its handling in other cases is inconsistent, so such services should avoid it.
When the request is made to dom0, the following are also set:
QREXEC_REQUESTED_TARGET_TYPE
is set toname
if the requested target does not start withQREXEC_REQUESTED_TARGET
for services in dom0 if the target does not start with@
.QREXEC_REQUESTED_TARGET_KEYWORD
for services in dom0 if the target does start with@
.The leading
@
is removed, but subsequent@
are left unchanged.This is a backwards-incompatible change to libqrexec. Therefore, it cannot be backported to R4.2.
Fixes: QubesOS/qubes-issues#9062