mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 11:50:18 +01:00
cli: complete 802.1x certificate file names
(cherry picked from commit ec4a12ecdb)
This commit is contained in:
parent
09f9831fc6
commit
3d3fac55e3
1 changed files with 21 additions and 0 deletions
|
|
@ -2307,6 +2307,26 @@ _set_fcn_cert_8021x (ARGS_SET_FCN)
|
|||
}
|
||||
}
|
||||
|
||||
static const char *const*
|
||||
_complete_fcn_cert_8021x (ARGS_COMPLETE_FCN)
|
||||
{
|
||||
const NMSetting8021xSchemeVtable *vtable;
|
||||
|
||||
vtable = &nm_setting_8021x_scheme_vtable[property_info->property_typ_data->subtype.cert_8021x.scheme_type];
|
||||
|
||||
if (vtable->is_secret) {
|
||||
gs_free const char **strv = NULL;
|
||||
|
||||
strv = nm_utils_escaped_tokens_split (text, NM_ASCII_SPACES);
|
||||
/* don't try to complete the password */
|
||||
if (NM_PTRARRAY_LEN (strv) > 1)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
NM_SET_OUT (out_complete_filename, TRUE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static gconstpointer
|
||||
_get_fcn_gobject_bytes (ARGS_GET_FCN)
|
||||
{
|
||||
|
|
@ -4466,6 +4486,7 @@ static const NMMetaPropertyType _pt_dcb = {
|
|||
static const NMMetaPropertyType _pt_cert_8021x = {
|
||||
.get_fcn = _get_fcn_cert_8021x,
|
||||
.set_fcn = _set_fcn_cert_8021x,
|
||||
.complete_fcn = _complete_fcn_cert_8021x,
|
||||
};
|
||||
|
||||
static const NMMetaPropertyType _pt_ethtool = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue