clients: fix assertion when requesting gsm pin secret

[root@gsm-r5s4-01 ~]# nmcli  connection up id gsm
  **
  libnmc:ERROR:clients/common/nm-secret-agent-simple.c:171:_secret_real_new_plain: assertion failed: ((secret_type == NM_SECRET_AGENT_SECRET_TYPE_SECRET) == nm_setting_get_secret_flags (setting, property, ((void *)0), ((void *)0)))
  Aborted (core dumped)

The pin is a secret property.

https://bugzilla.redhat.com/show_bug.cgi?id=1698495
(cherry picked from commit a94ccc9acc)
This commit is contained in:
Beniamino Galvani 2019-04-10 16:02:31 +02:00
parent ce6b7cc824
commit eee2eda4b5

View file

@ -889,7 +889,7 @@ request_secrets_from_ui (RequestData *request)
title = _("PIN code required");
msg = g_strdup (_("PIN code is needed for the mobile broadband device"));
secret = _secret_real_new_plain (NM_SECRET_AGENT_SECRET_TYPE_PROPERTY,
secret = _secret_real_new_plain (NM_SECRET_AGENT_SECRET_TYPE_SECRET,
_("PIN"),
NM_SETTING (s_gsm),
NM_SETTING_GSM_PIN);