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

'qvm-run -u root' environment missing PATH, DISPLAY, etc. after QSB #38 updates #3615

Closed
rustybird opened this Issue Feb 20, 2018 · 18 comments

Comments

@rustybird

rustybird commented Feb 20, 2018

Qubes OS version:

R4.0 rc4 (latest current-testing/security-testing in dom0)

Affected TemplateVMs:

e.g. fedora-26


Steps to reproduce the behavior:

qvm-run -u root -p fedora-26-current-vm          env | sort >before
qvm-run -u root -p fedora-26-security-testing-vm env | sort >after
diff -u before after

Expected behavior:

No significant environment differences

Actual behavior:

Some environment variables have vanished:

  • DISPLAY
  • HISTCONTROL
  • HISTSIZE
  • HOSTNAME
  • LANG
  • MAIL
  • PATH
  • XDG_DATA_DIRS

General notes:

The root user's shell is the default, Bash.

@tasket

This comment has been minimized.

Show comment
Hide comment
@tasket

tasket Feb 21, 2018

debian-9 appears partly affected. The following are not defined:

  • DISPLAY
  • HISTSIZE
  • HOSTNAME
  • MAIL
  • PATH
    But XDG_DATA_DIRS looks like it might not be normally set on Debian.

Some of the above like PATH are still available as set variables even though they aren't in env.


On f26 I get the same results as rustybird.

tasket commented Feb 21, 2018

debian-9 appears partly affected. The following are not defined:

  • DISPLAY
  • HISTSIZE
  • HOSTNAME
  • MAIL
  • PATH
    But XDG_DATA_DIRS looks like it might not be normally set on Debian.

Some of the above like PATH are still available as set variables even though they aren't in env.


On f26 I get the same results as rustybird.

@rustybird

This comment has been minimized.

Show comment
Hide comment
@rustybird

rustybird Feb 21, 2018

This breaks built-in services like qubes.ResizeDisk:

$ qvm-volume extend fedora-26-security-testing-vm:private $(( 10 * 1024**3 ))
Online resize of volume appvms/fedora-26-security-testing-vm/private failed (you need to resize filesystem manually): /etc/qubes-rpc/qubes.ResizeDisk: line 11: resize2fs: command not found

Probably also qubes.SuspendPre and qubes.SuspendPost, because modprobe is in /sbin.

This breaks built-in services like qubes.ResizeDisk:

$ qvm-volume extend fedora-26-security-testing-vm:private $(( 10 * 1024**3 ))
Online resize of volume appvms/fedora-26-security-testing-vm/private failed (you need to resize filesystem manually): /etc/qubes-rpc/qubes.ResizeDisk: line 11: resize2fs: command not found

Probably also qubes.SuspendPre and qubes.SuspendPost, because modprobe is in /sbin.

rustybird added a commit to rustybird/qubes-split-dm-crypt that referenced this issue Feb 21, 2018

@marmarek marmarek self-assigned this Feb 21, 2018

@marmarek marmarek referenced this issue in QubesOS/qubes-core-agent-linux Feb 21, 2018

Merged

qrexec: launch services in login shell #98

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Feb 22, 2018

Member

@rustybird @tasket See linked PR. I've verified that missing environment variables are restored. But I don't want to make it worse - can you verify if the fix works for you?
The one side effect I'm aware of, is for normal user (user) the startup scripts are loaded twice. But it should be harmless...

Member

marmarek commented Feb 22, 2018

@rustybird @tasket See linked PR. I've verified that missing environment variables are restored. But I don't want to make it worse - can you verify if the fix works for you?
The one side effect I'm aware of, is for normal user (user) the startup scripts are loaded twice. But it should be harmless...

@donob4n

This comment has been minimized.

Show comment
Hide comment
@donob4n

donob4n Feb 22, 2018

It restored VM updates from Qubes Manager on 3.2

donob4n commented Feb 22, 2018

It restored VM updates from Qubes Manager on 3.2

@rustybird rustybird closed this Feb 22, 2018

@rustybird rustybird reopened this Feb 22, 2018

marmarek added a commit to QubesOS/qubes-core-agent-linux that referenced this issue Feb 22, 2018

qrexec: launch services in login shell
Previously the script was called through shell as:
    execl(shell, "-sh", "-c", "/usr/lib/qubes/qubes-rpc-multiplexer
            ...", 0);
This tells the shell to load login scripts, including /etc/profile.
Since 5512e4e this is no longer the
case and the script is called directly. Since most services do expect
proper user session initialized (/etc/profile loaded etc), adjust the
script's shebang to behave like a login shell and load those startup
scripts.

Fixes QubesOS/qubes-issues#3615

(cherry picked from commit f0b0574)
@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Feb 22, 2018

Automated announcement from builder-github

The package qubes-core-agent_3.2.25-1+deb10u1 has been pushed to the r3.2 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing buster-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-agent_3.2.25-1+deb10u1 has been pushed to the r3.2 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing buster-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Feb 22, 2018

Automated announcement from builder-github

The package qubes-core-agent_3.2.25-1+deb9u1 has been pushed to the r3.2 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-agent_3.2.25-1+deb9u1 has been pushed to the r3.2 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Feb 22, 2018

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-3.2.25-1.fc26) has been pushed to the r3.2 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r3.2-current-testing

Changes included in this update

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-3.2.25-1.fc26) has been pushed to the r3.2 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r3.2-current-testing

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Feb 22, 2018

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.0 testing repository for the CentOS centos7 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.0 testing repository for the CentOS centos7 template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@qubesos-bot qubesos-bot referenced this issue in QubesOS/updates-status Feb 22, 2018

Closed

core-agent-linux v4.0.23 (r4.0) #426

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Feb 22, 2018

Automated announcement from builder-github

The package qubes-core-agent_4.0.23-1+deb10u1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing buster-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-agent_4.0.23-1+deb10u1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing buster-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Feb 22, 2018

Automated announcement from builder-github

The package qubes-core-agent_4.0.23-1+deb9u1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-agent_4.0.23-1+deb9u1 has been pushed to the r4.0 testing repository for the Debian template.
To test this update, first enable the testing repository in /etc/apt/sources.list.d/qubes-*.list by uncommenting the line containing stretch-testing (or appropriate equivalent for your template version), then use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Feb 22, 2018

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-4.0.23-1.fc26) has been pushed to the r4.0 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-4.0.23-1.fc26) has been pushed to the r4.0 testing repository for the Fedora template.
To test this update, please install it with the following command:

sudo yum update --enablerepo=qubes-vm-r4.0-current-testing

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Mar 12, 2018

Automated announcement from builder-github

The package qubes-core-agent_3.2.25-1+deb10u1 has been pushed to the r3.2 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-agent_3.2.25-1+deb10u1 has been pushed to the r3.2 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Mar 12, 2018

Automated announcement from builder-github

The package qubes-core-agent_3.2.25-1+deb9u1 has been pushed to the r3.2 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-agent_3.2.25-1+deb9u1 has been pushed to the r3.2 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Mar 12, 2018

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-3.2.25-1.fc26) has been pushed to the r3.2 stable repository for the Fedora template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-3.2.25-1.fc26) has been pushed to the r3.2 stable repository for the Fedora template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Mar 12, 2018

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.0 stable repository for the Fedora centos7 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

Automated announcement from builder-github

The package core-agent-linux has been pushed to the r4.0 stable repository for the Fedora centos7 template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Mar 12, 2018

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-4.0.24-1.fc26) has been pushed to the r4.0 stable repository for the Fedora template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

Automated announcement from builder-github

The component core-agent-linux (including package python2-dnf-plugins-qubes-hooks-4.0.24-1.fc26) has been pushed to the r4.0 stable repository for the Fedora template.
To install this update, please use the standard update command:

sudo yum update

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Mar 12, 2018

Automated announcement from builder-github

The package qubes-core-agent_4.0.24-1+deb10u1 has been pushed to the r4.0 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-agent_4.0.24-1+deb10u1 has been pushed to the r4.0 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

@qubesos-bot

This comment has been minimized.

Show comment
Hide comment
@qubesos-bot

qubesos-bot Mar 12, 2018

Automated announcement from builder-github

The package qubes-core-agent_4.0.24-1+deb9u1 has been pushed to the r4.0 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Automated announcement from builder-github

The package qubes-core-agent_4.0.24-1+deb9u1 has been pushed to the r4.0 stable repository for the Debian template.
To install this update, please use the standard update command:

sudo apt-get update && sudo apt-get dist-upgrade

Changes included in this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment