mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-22 10:46:59 +00:00
cli: do not require a password when setting a PK
It results in a rather confusing behavior: # nmcli c modify wifi \ 802-1x.private-key /etc/pki/themostsecret.key \ 802-1x.private-key-password verystrong Error: failed to modify 802-1x.private-key: private key password not provided. Moreover, the user might have a good reason for not specifying it on a command liue and it's not strictly required anyway -- we'll do fine if we don't verify a private key at addition time.
This commit is contained in:
parent
5209c034f2
commit
afd2811028
|
@ -3643,19 +3643,12 @@ DEFINE_ALLOWED_VAL_FUNC (nmc_property_connection_allowed_lldp, lldp_valid_values
|
|||
password = strv[1]; \
|
||||
else \
|
||||
password = pwd_func (NM_SETTING_802_1X (setting)); \
|
||||
if (password) { \
|
||||
char *tmp_pwd = g_strdup (password); \
|
||||
success = set_func (NM_SETTING_802_1X (setting), \
|
||||
path, \
|
||||
tmp_pwd, \
|
||||
NM_SETTING_802_1X_CK_SCHEME_PATH, \
|
||||
NULL, \
|
||||
error); \
|
||||
g_free (tmp_pwd); \
|
||||
} else { \
|
||||
success = FALSE; \
|
||||
g_set_error_literal (error, 1, 0, _("private key password not provided")); \
|
||||
} \
|
||||
success = set_func (NM_SETTING_802_1X (setting), \
|
||||
path, \
|
||||
password, \
|
||||
NM_SETTING_802_1X_CK_SCHEME_PATH, \
|
||||
NULL, \
|
||||
error); \
|
||||
g_free (val_strip); \
|
||||
g_strfreev (strv); \
|
||||
return success; \
|
||||
|
|
Loading…
Reference in a new issue