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.
Bug 1361948 - SASL info is missing in the output of "virt-admin client-info"
Summary: SASL info is missing in the output of "virt-admin client-info"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Erik Skultety
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-01 03:15 UTC by Fangge Jin
Modified: 2016-11-03 18:51 UTC (History)
7 users (show)

Fixed In Version: libvirt-2.0.0-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:51:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Fangge Jin 2016-08-01 03:15:08 UTC
Description of problem:
There is no sasl info the the output of "virt-admin client-info"

Version-Release number of selected component (if applicable):
libvirt-2.0.0-3.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Set unix rw socket authentication to sasl in /etc/libvirt/libvirtd.conf
auth_unix_rw = "sasl"

2.# systemctl restart libvirtd

3.create a sasl user and set passwd
# saslpasswd2 -a libvirt -c fred
Password:
Again (for verification): 

4.Connect a virsh client:
# virsh -q -c  qemu:///system
Please enter your authentication name: fred
Please enter your password: 
virsh # 

5.
# virt-admin srv-clients-list libvirtd
 Id    Transport       Connected since
--------------------------------------------------
 2     unix            2016-08-01 11:10:18+0800

6.
# virt-admin client-info libvirtd 2
id             : 2
connection_time: 2016-08-01 11:10:18+0800
transport      : unix
readonly       : no
unix_user_id   : 0
unix_user_name : root
unix_group_id  : 0
unix_group_name: root
unix_process_id: 30849
selinux_context: unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023


Actual results:
As in step6, no sasl info is outputted

Expected results:
Sasl username can be outputted

Comment 2 Erik Skultety 2016-08-02 07:03:14 UTC
Fixed upstream by:

commit 5289e21f31be226fd22bc3b512b8cc233fa24046
Author:     Erik Skultety <eskultet>
AuthorDate: Thu Jul 28 16:42:04 2016 +0200
Commit:     Erik Skultety <eskultet>
CommitDate: Tue Aug 2 08:25:42 2016 +0200

    daemon: sasl: Don't forget to save SASL username to client's identity
    
    Once the SASL authentication process has successfully passed, we should also
    save the SASL username used to client's identity, so that when a client like
    virt-admin tries to obtain it, the server will actually format the username to
    the response data.
    
    Signed-off-by: Erik Skultety <eskultet>

v2.1.0-rc1-24-g5289e21

Comment 5 Yanqiu Zhang 2016-08-10 06:18:23 UTC
Reproduce this bug on libvirt-2.0.0-2.el7.x86_64
Steps to reproduce:
1.Set unix rw socket authentication to sasl in /etc/libvirt/libvirtd.conf
auth_unix_rw = "sasl"

2.# systemctl restart libvirtd

3.create a sasl user and set passwd
# saslpasswd2 -a libvirt -c fred
Password:
Again (for verification): 

4.Connect a virsh client:
# virsh -q -c  qemu:///system
Please enter your authentication name: fred
Please enter your password: 
virsh # 


5.Open another terminal:
# virt-admin srv-clients-list libvirtd
 Id    Transport       Connected since
--------------------------------------------------
 1     unix            2016-08-10 11:29:10+0800

6.
# virt-admin client-info libvirtd 1
id             : 1
connection_time: 2016-08-10 11:29:10+0800
transport      : unix
readonly       : no
unix_user_id   : 0
unix_user_name : root
unix_group_id  : 0
unix_group_name: root
unix_process_id: 18831
selinux_context: unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
(no sasl username outputted)

Verify this bug on libvirt-2.0.0-4.el7.x86_64
Steps to verify:
1.Set unix rw socket authentication to sasl in /etc/libvirt/libvirtd.conf
auth_unix_rw = "sasl"

2.# systemctl restart libvirtd

3.create a sasl user and set passwd
# saslpasswd2 -a libvirt -c fred
Password:
Again (for verification): 

4.Connect a virsh client:
# virsh -q -c  qemu:///system
Please enter your authentication name: fred
Please enter your password: 
virsh #

5.Open another terminal:
# virt-admin srv-clients-list libvirtd
 Id    Transport       Connected since
--------------------------------------------------
 3     unix            2016-08-10 11:10:08+0800

6.
# virt-admin client-info libvirtd 3
id             : 3
connection_time: 2016-08-10 11:10:08+0800
transport      : unix
readonly       : no
sasl_user_name : fred     ===> There is the sasl username outputted.
unix_user_id   : 0
unix_user_name : root
unix_group_id  : 0
unix_group_name: root
unix_process_id: 15350
selinux_context: unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

Since the result is as expected, mark this bug as verified.

Comment 7 errata-xmlrpc 2016-11-03 18:51:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2577.html


Note You need to log in before you can comment on or make changes to this bug.