Red Hat Bugzilla – Bug 1351272
show name if ask is specified for 802.1x connections
Last modified: 2016-11-03 15:23:29 EDT
Description of problem: as stated here: https://bugzilla.redhat.com/show_bug.cgi?id=1141947#c9 it would be nice to see Username (802-1x.identity) [vbenes]: if connecting to two factor secured 802.1x network. Enter is accepted as identity was stored and can be used. Version-Release number of selected component (if applicable): 1.3 How reproducible: Steps to Reproduce: 1. store 802.1x network identity to some profile and set always ask password 2. connect to it via nmcli -a con up $con Actual results: no name shown even if it's stored Expected results: name should be shown as it can be used Additional info:
The identity is actually pre-filled, but it is not displayed because, when asking for passwords, echoing was off. The echo can be switched on with "-s" option: nmcli -a -s con up $con
Created attachment 1183369 [details] [PATCH] cli: display pre-filled values when the value asked for is not a real password
(In reply to Blueowl from comment #2) > Created attachment 1183369 [details] > [PATCH] cli: display pre-filled values when the value asked for is not a > real password LGTM
Pushed upstream: master: c9f6309 cli: show pre-filled readline input if it is not a real password (rh #1351272) nm-1-2: cbc5ffe cli: show pre-filled readline input if it is not a real password (rh #1351272)
this is fixed just partially. [root@walderon NetworkManager]# nmcli connection add type ethernet ifname eth1 con-name connie 802-1x.identity jdoe 802-1x.eap leap [root@walderon NetworkManager]# nmcli -a con up connie (null) Network name (connection.id): connie (null) Username (802-1x.identity): jdoe (null) Password (802-1x.password): (null) Network name (connection.id): connie (null) Username (802-1x.identity): jdoe (null) Password (802-1x.password): (null) Network name (connection.id): connie (null) Username (802-1x.identity): jdoe (null) Password (802-1x.password): (null) Network name (connection.id): connie (null) Username (802-1x.identity): jdoe (null) Password (802-1x.password): (null) Network name (connection.id): connie (null) Username (802-1x.identity): jdoe (null) Password (802-1x.password): Error: Connection activation failed. this (null) is ugly and whatmore I think connection should have been hidden if provided via cli. back to assigned.
even better after this: [root@walderon NetworkManager]# nmcli connection up id testeth0 (null) Warning: password for 'connection.id' not given in 'passwd-file' and nmcli cannot ask without '--ask' option. Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6) this is normal not 802.1x protected connection
Fix for the "(null)" messages in branch bg/clients-agent-message-rh1351272. (In reply to Vladimir Benes from comment #7) > [root@walderon NetworkManager]# nmcli connection up id testeth0 > (null) > Warning: password for 'connection.id' not given in 'passwd-file' and nmcli > cannot ask without '--ask' option. > Connection successfully activated (D-Bus active path: > /org/freedesktop/NetworkManager/ActiveConnection/6) > > this is normal not 802.1x protected connection Strange, can you paste the output of "nmcli connection show testeth0" ?
bg/clients-agent-message-rh1351272 lgtm
Pushed 2 more commits to bg/clients-agent-message-rh1351272 to fix the issue reported in comment 7: 1e901ab clients: handle secret requests only for current connection 0ce6dd5 clients: fix matching of connection path
1e901ab clients: handle secret requests only for current connection 0ce6dd5 clients: fix matching of connection path why does this even use g_str_has_prefix() and not nm_streq0()? That's not clear, can you add a code comment as to why that is? (or fix it). in request_secrets_from_ui(), let's move "gs_free_error GError *error = NULL;" inside the if-block? Rest lgtm
(In reply to Thomas Haller from comment #13) > 1e901ab clients: handle secret requests only for current connection > 0ce6dd5 clients: fix matching of connection path > > why does this even use g_str_has_prefix() and not nm_streq0()? That's not > clear, can you add a code comment as to why that is? (or fix it). Because the request_id is created as "${CONNECTION_PATH}/${SETTING}". Added a comment. > in request_secrets_from_ui(), let's move "gs_free_error GError *error = > NULL;" inside the if-block? Ok.
branch bg/clients-agent-message-rh1351272 looks good to me
LGTM
I can see name when connecting with ask option enabled.
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-2581.html