Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
The config path output by save_config is not right as created
Version-Release number of selected component (if applicable):
$ rpm -q libvirt libvirt-sandbox
libvirt-1.1.1-10.el7.x86_64
libvirt-sandbox-0.5.0-5.el7.x86_64
How reproducible:
always
Steps to Reproduce:
1.enable local user wayne for libvirt management permissions
add compatible polkit pkla file:
# cat /etc/polkit-1/localauthority/50-local.d/test.pkla
[Allow fred libvirt management permissions]
Identity=unix-user:wayne
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes
2. create a generic container
# su - wayne
$ virt-sandbox-service create --network source=default,address=192.168.122.101/24,route=192.168.122.255/24%192.168.122.1 -p /home/wayne/test --username wayne -G 1000 userbox3 -- /bin/bash -v
Created sandbox container dir /home/wayne/test/userbox3
Created sandbox config /etc/libvirt-sandbox/services/userbox3/config/sandbox.cfg
3. check sandbox.cfg
$ cat /etc/libvirt-sandbox/services/userbox3/config/sandbox.cfg
cat: /etc/libvirt-sandbox/services/userbox3/config/sandbox.cfg: No such file or directory
The right config path should be:
$ cat /home/wayne/.config/libvirt-sandbox/services/userbox3/config/sandbox.cfg
the mount point in container xml is right so the container can be started. Only the config path mismatched between virt-sandbox-service output and actual path.
Actual results:
output not right
Expected results:
output the right path
Additional info:
This is invalid usage. The tools must be run as root.
Upstream we now explicitly block this
commit 09987232e72cc88b1eb5c67c875ead3f5f9bd272
Author: Daniel P. Berrange <berrange>
Date: Wed Nov 27 17:21:27 2013 +0000
Prevent use of virt-sandbox-service as non-root
The lxc:/// driver is only supported when running as root,
since we need elevated privileges to create various files.
Explicitly prevent it running as uid == 0.
Signed-off-by: Daniel P. Berrange <berrange>
Verfied with libvirt-sandbox-0.5.0-7.el7.x86_64
1.enable local user wayne for libvirt management permissions
add compatible polkit pkla file:
# cat /etc/polkit-1/localauthority/50-local.d/test.pkla
[Allow fred libvirt management permissions]
Identity=unix-user:timesu
Action=org.libvirt.unix.manage
ResultAny=yes
ResultInactive=yes
ResultActive=yes
2. create a generic container
# su - timesu
$ virt-sandbox-service create --network source=default,address=192.168.122.101/24,route=192.168.122.255/24%192.168.122.1 -p /home/timesu --username timesu -G 1000 userbox3 -- /bin/bash -v
/usr/bin/virt-sandbox-service: lxc:/// URIs are only supported when run as root
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.