Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1361948 - SASL info is missing in the output of "virt-admin client-info"
SASL info is missing in the output of "virt-admin client-info"
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.3
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Erik Skultety
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-31 23:15 EDT by Fangge Jin
Modified: 2016-11-03 14:51 EDT (History)
7 users (show)

See Also:
Fixed In Version: libvirt-2.0.0-4.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 14:51:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 08:07:06 EDT

  None (edit)
Description Fangge Jin 2016-07-31 23:15:08 EDT
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 03:03:14 EDT
Fixed upstream by:

commit 5289e21f31be226fd22bc3b512b8cc233fa24046
Author:     Erik Skultety <eskultet@redhat.com>
AuthorDate: Thu Jul 28 16:42:04 2016 +0200
Commit:     Erik Skultety <eskultet@redhat.com>
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@redhat.com>

v2.1.0-rc1-24-g5289e21
Comment 5 yanqzhan@redhat.com 2016-08-10 02:18:23 EDT
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 14:51:09 EDT
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.