Skip to content
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

qubes-mgmt-salt-vm-connector fails to list dependencies on qubes-core-agent-passwordless-root and socat #6229

Closed
DemiMarie opened this issue Nov 24, 2020 · 11 comments
Assignees
Labels
C: mgmt P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.

Comments

@DemiMarie
Copy link

Qubes OS version

Qubes release 4.0 (R4.0)

Affected component(s) or functionality

qubes-mgmt-salt-vm-connector packaging

Brief summary

qubes-mgmt-salt-vm-connector should depend on qubes-core-agent-passwordless-root but does not.

How Reproducible

100%

To Reproduce

Steps to reproduce the behavior:

  1. Install qubes-template-fedora-32-minimal in dom0
  2. Install qubes-mgmt-salt-vm-connector in fedora-32-minimal
  3. Create a DispVM template (such as fedora-mgmt-dvm) with fedora-32-minimal as its template.
  4. Set the management_dispvm property of fedora-32-minimal to fedora-mgmt-dvm
  5. Try to update fedora-32-minimal using Salt, or run qvm-console-dispvm on a VM based on fedora-32-minimal.

Expected behavior

Updates and qvm-console-dispvm work.

Actual behavior

Updates and qvm-console-dispvm fail.

Screenshots

Additional context

Solutions you've tried

Relevant documentation you've consulted

Related, non-duplicate issues

@DemiMarie DemiMarie added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Nov 24, 2020
@DemiMarie DemiMarie self-assigned this Nov 24, 2020
@marmarek
Copy link
Member

I'm not sure about socat, but it should be possible to make it work without qubes-core-agent-passwordless-root. Perhaps as simple as adding user='root' argument at dispvm.run_service call

@marmarek
Copy link
Member

TBH, I think what user is a service running as should be configurable (also? only?) at the target VM, not dom0 (either in policy, or call argument when call originates from dom0).

@DemiMarie
Copy link
Author

socat isn’t needed for Salt, but is needed for qvm-console-dispvm. Since installing qubes-mgmt-salt-vm-connector indicates that one is likely to be using that qube as a management DispVM, it should probably have Recommends: socat.

@marmarek
Copy link
Member

/etc/qubes-rpc/qubes.ShowInTerminal belongs to qubes-core-agent - so, this package should have dependency on socat.

@DemiMarie
Copy link
Author

TBH, I think what user is a service running as should be configurable (also? only?) at the target VM, not dom0 (either in policy, or call argument when call originates from dom0).

That’s already possible if the service is run as root ― it can drop privileges to any user it chooses.

@marmarek
Copy link
Member

That’s already possible if the service is run as root ― it can drop privileges to any user it chooses.

Yes, but currently services by default are started as user (which makes sense in most cases).

@DemiMarie
Copy link
Author

I could add another service configuration option.

@marmarek
Copy link
Member

That would be perfect. Something like force-user, which override username sent from dom0? Otherwise we'd likely need a protocol change, because currently default user is resolved in dom0 and qrexec-agent has no way to distinguish whether user uesr is there because it is default, or because it was explicitly requested.
Such property would also allow for less hacky qubes.VMRootShell service (currently if you forget to add user=root in the policy, it isn't really a root shell).

Technically, it seems to require a minor refactor, because service config is loaded only within wait_for_session_maybe function.
Anyway, priority-wise, that sounds rather like R4.2 material.

@DemiMarie
Copy link
Author

I agree, although once it is implemented I see no reason not to backport it to R4.1.

@marmarek
Copy link
Member

marmarek commented Nov 25, 2020 via email

@andrewdavidwong andrewdavidwong added this to the Release 4.2 milestone Nov 25, 2020
@andrewdavidwong andrewdavidwong added C: mgmt T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality. and removed T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. labels Nov 25, 2020
@DemiMarie
Copy link
Author

Closing, since this has been fixed. The qrexec enhancement is tracked as #6354.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: mgmt P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: enhancement Type: enhancement. A new feature that does not yet exist or improvement of existing functionality.
Projects
None yet
Development

No branches or pull requests

3 participants